Skip to content

Commit 3e8596c

Browse files
committed
Merge branch 'develop' into yus/ci_petsc
2 parents ed10076 + d50b976 commit 3e8596c

32 files changed

+4618
-132
lines changed

.github/actions/install-repo/action.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,28 @@ runs:
1616
using: "composite"
1717
steps:
1818

19-
- name: Check Cache
20-
if: ${{ inputs.cache == 'true'}}
21-
uses: actions/cache@v3
22-
id: check-cache
23-
with:
24-
key: build-${{ inputs.repo-name }}-${{ inputs.repo-ref}}
25-
path: ${{ runner.temp }}/build-${{ inputs.repo-name }}
26-
2719
- name: Checkout Repo
2820
uses: actions/checkout@v3
2921
with:
3022
repository: ${{inputs.repo-path }}
3123
ref: ${{ inputs.repo-ref }}
3224
path: ${{ inputs.repo-name }}
3325

26+
- name: Get commit hash
27+
id: get-hash
28+
shell: bash
29+
run: |
30+
cd $GITHUB_WORKSPACE/${{ inputs.repo-name }}
31+
echo "commit-hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
32+
33+
- name: Check Cache
34+
if: ${{ inputs.cache == 'true'}}
35+
uses: actions/cache@v3
36+
id: check-cache
37+
with:
38+
key: build-${{ inputs.repo-name }}-${{ steps.get-hash.outputs.commit-hash }}
39+
path: ${{ runner.temp }}/build-${{ inputs.repo-name }}
40+
3441
- name: Configure CMake
3542
if: ${{ !steps.check-cache.outputs.cache-hit }}
3643
shell: bash

.github/workflows/clang-tidy.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
with:
8383
repo-name: 'omega_h-openmpi'
8484
repo-path: 'SCOREC/omega_h'
85-
repo-ref: 'scorec-v11.0.0'
85+
repo-ref: '1765836a00b9a64b8b3791f1442ac52f147e43b2'
8686
cache: true
8787
options: '-DCMAKE_CXX_COMPILER=`which mpicxx`
8888
-DCMAKE_C_COMPILER=`which mpicc`
@@ -98,7 +98,7 @@ jobs:
9898
with:
9999
repo-name: 'meshFields-openmpi'
100100
repo-path: 'SCOREC/meshFields'
101-
repo-ref: ''
101+
repo-ref: 'b1482bbba288df210784b2345eae08e34faabdc4'
102102
cache: true
103103
options: '-DCMAKE_CXX_COMPILER=`which mpicxx`
104104
-DCMAKE_C_COMPILER=`which mpicc`
@@ -140,20 +140,26 @@ jobs:
140140
cache: true
141141
options: '-DADIOS2_USE_CUDA=OFF'
142142

143+
- name: clone petsc
144+
id: clone-petsc
145+
run: |
146+
cd ${{ runner.temp }}
147+
git clone -b v3.24.2 https://gitlab.com/petsc/petsc.git petsc-openmpi
148+
cd petsc-openmpi
149+
echo "petsc-commit-hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
150+
143151
- name: Cache PETSc
144152
id: cache-petsc
145153
uses: actions/cache@v3
146154
with:
147155
path: ${{ runner.temp }}/petsc-openmpi
148-
key: build-petsc-openmpi
156+
key: build-petsc-openmpi-${{ steps.clone-petsc.outputs.petsc-commit-hash }}
149157

150158
# PETSc check is removed due to a PETSc test failure using openmpi
151159
- name: build petsc
152160
if: steps.cache-petsc.outputs.cache-hit != 'true'
153161
run: |
154-
cd ${{ runner.temp }}
155-
git clone -b v3.24.2 https://gitlab.com/petsc/petsc.git petsc-openmpi
156-
cd petsc-openmpi
162+
cd ${{ runner.temp }}/petsc-openmpi
157163
./configure \
158164
PETSC_ARCH=ubuntu-kokkos \
159165
--with-kokkos-dir="${{ runner.temp }}/build-kokkos-openmpi/install/" \
@@ -168,7 +174,7 @@ jobs:
168174
with:
169175
repo-name: 'redev-openmpi'
170176
repo-path: 'SCOREC/redev'
171-
repo-ref: 'v4.3.1'
177+
repo-ref: '1452ec290dc6f8638019e342758325611e16ad77'
172178
cache: true
173179
options: '-DCMAKE_CXX_COMPILER=`which mpicxx`
174180
-DMPIEXEC_EXECUTABLE=`which mpirun`

.github/workflows/cmake-test.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
with:
8383
repo-name: 'omega_h'
8484
repo-path: 'SCOREC/omega_h'
85-
repo-ref: 'scorec-v11.0.0'
85+
repo-ref: '1765836a00b9a64b8b3791f1442ac52f147e43b2'
8686
cache: true
8787
options: '-DCMAKE_CXX_COMPILER=`which mpicxx`
8888
-DCMAKE_C_COMPILER=`which mpicc`
@@ -98,7 +98,7 @@ jobs:
9898
with:
9999
repo-name: 'meshFields'
100100
repo-path: 'SCOREC/meshFields'
101-
repo-ref: ''
101+
repo-ref: 'b1482bbba288df210784b2345eae08e34faabdc4'
102102
cache: true
103103
options: '-DCMAKE_CXX_COMPILER=`which mpicxx`
104104
-DCMAKE_C_COMPILER=`which mpicc`
@@ -154,19 +154,25 @@ jobs:
154154
-DADIOS2_DIR=${{ runner.temp }}/build-ADIOS2/install/lib/cmake/adios2
155155
-Dperfstubs_DIR=${{ runner.temp }}/build-perfstubs/install/lib/cmake'
156156

157+
- name: clone petsc
158+
id: clone-petsc
159+
run: |
160+
cd ${{ runner.temp }}
161+
git clone -b v3.24.2 https://gitlab.com/petsc/petsc.git petsc
162+
cd petsc
163+
echo "petsc-commit-hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
164+
157165
- name: Cache PETSc
158166
id: cache-petsc
159167
uses: actions/cache@v3
160168
with:
161169
path: ${{ runner.temp }}/petsc
162-
key: build-petsc
170+
key: build-petsc-${{ steps.clone-petsc.outputs.petsc-commit-hash }}
163171

164172
- name: build petsc
165173
if: steps.cache-petsc.outputs.cache-hit != 'true'
166174
run: |
167-
cd ${{ runner.temp }}
168-
git clone -b v3.24.2 https://gitlab.com/petsc/petsc.git petsc
169-
cd petsc
175+
cd ${{ runner.temp }}/petsc
170176
./configure \
171177
PETSC_ARCH=ubuntu-kokkos \
172178
--with-kokkos-dir="${{ runner.temp }}/build-kokkos/install/" \
@@ -221,16 +227,25 @@ jobs:
221227
run: ctest --test-dir ${{ runner.temp }}/build-pcms --output-on-failure
222228

223229
- name: Print Test
230+
if: always()
224231
run: cat ${{ runner.temp }}/build-pcms/Testing/Temporary/LastTest.log
225232

226233
- name: Test PCMS Installation
227234
shell: bash
228235
run: |
229236
# Configure and build the test
230237
# it should only ask for pcms_DIR/ROOT to find all dependencies
238+
ls ${{ runner.temp }}/build-pcms/install/lib/cmake/pcms
239+
echo "-------- PCMS CONFIG -------------"
240+
cat ${{ runner.temp }}/build-pcms/install/lib/cmake/pcms/pcms-config.cmake
241+
echo "-------- PCMS TARGETS -------------"
242+
cat ${{ runner.temp }}/build-pcms/install/lib/cmake/pcms/pcms-targets.cmake
243+
echo "-------- PCMS INTERPOLATOR TARGETS -------------"
244+
cat ${{ runner.temp }}/build-pcms/install/lib/cmake/pcms/pcms_interpolator-targets.cmake
245+
export VERBOSE=1
231246
cmake \
232247
-B ${{github.workspace}}/examples/external-usage-example/build \
233248
-S ${{github.workspace}}/examples/external-usage-example/ \
234249
-Dpcms_DIR=${{ runner.temp }}/build-pcms/install/lib/cmake/pcms \
235-
250+
--debug-output
236251
cmake --build ${{github.workspace}}/examples/external-usage-example/build

CITATION.cff

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# This CITATION.cff file was generated with cffinit.
2+
# Visit https://bit.ly/cffinit to generate yours today!
3+
4+
cff-version: 1.2.0
5+
title: Parallel Coupler for Multimodel Simulations
6+
message: >-
7+
If you use this software, please cite it using the
8+
metadata from this file.
9+
type: software
10+
authors:
11+
- given-names: Jacob
12+
family-names: Merson
13+
email: mersoj2@rpi.edu
14+
affiliation: Rensselaer Polytechnic Institute
15+
orcid: 'https://orcid.org/0000-0002-6813-6532'
16+
name-particle: S
17+
- given-names: Cameron
18+
name-particle: W
19+
family-names: Smith
20+
affiliation: Rensselaer Polytechnic Institute
21+
- given-names: Mark
22+
name-particle: S
23+
family-names: Shephard
24+
affiliation: Rensselaer Polytechnic Institute
25+
- given-names: Fuad
26+
family-names: Hasan
27+
affiliation: Rensselaer Polytechnic Institute
28+
- given-names: Abhiyan
29+
family-names: Paudel
30+
affiliation: Rensselaer Polytechnic Institute
31+
- given-names: Angel
32+
family-names: Castillo-Crooke
33+
affiliation: Rensselaer Polytechnic Institute
34+
- given-names: Joyal
35+
family-names: Mathew
36+
affiliation: Rensselaer Polytechnic Institute
37+
- given-names: Mohammad
38+
family-names: Elahi
39+
affiliation: Rensselaer Polytechnic Institute
40+
identifiers:
41+
- type: doi
42+
value: 10.48550/arXiv.2510.18838
43+
repository-code: 'https://github.com/SCOREC/pcms'
44+
abstract: >-
45+
PCMS provides infrastructure to couple multiple simulation
46+
codes at scale on exascale systems. It uses scalable
47+
methodologies for transferring data between distributed
48+
applications. PCMS takes a hierarchical approach to field
49+
transfer using as much information as possible, such as
50+
mesh topology, to accommodate conservation and other
51+
physical constraints. In the context of limited
52+
information, alternative strategies, such as radial basis
53+
functions, are used to support field transfer. PCMS has
54+
been demonstrated on coupled fusion simulations that make
55+
use of volume coupling of high-dimensional data and
56+
complex coordinate systems.
57+
keywords:
58+
- HPC
59+
- coupling
60+
- supercomputing
61+
- unstructured-meshes
62+
license: BSD-3-Clause

config.cmake.in

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
include(CMakeFindDependencyMacro)
44
find_dependency(redev CONFIG HINTS @redev_DIR@)
55
find_dependency(Kokkos CONFIG HINTS @Kokkos_DIR@)
6+
find_dependency(KokkosKernels CONFIG HINTS @KokkosKernels_DIR@)
67
find_dependency(meshfields CONFIG HINTS @meshfields_DIR@)
78
find_dependency(ADIOS2 CONFIG HINTS @ADIOS2_DIR@)
89
find_dependency(MPI)
@@ -16,14 +17,20 @@ if(@PCMS_ENABLE_OMEGA_H@)
1617
endif()
1718

1819
include("${CMAKE_CURRENT_LIST_DIR}/pcms_core-targets.cmake")
20+
include("${CMAKE_CURRENT_LIST_DIR}/pcms_interpolator-targets.cmake")
21+
1922
if(@PCMS_ENABLE_C@)
23+
include("${CMAKE_CURRENT_LIST_DIR}/pcms_capi_core-targets.cmake")
24+
include("${CMAKE_CURRENT_LIST_DIR}/pcms_capi_interpolator-targets.cmake")
2025
include("${CMAKE_CURRENT_LIST_DIR}/pcms_capi-targets.cmake")
2126
endif()
27+
2228
if(@PCMS_ENABLE_Fortran@)
29+
include("${CMAKE_CURRENT_LIST_DIR}/pcms_fortranapi_core-targets.cmake")
30+
include("${CMAKE_CURRENT_LIST_DIR}/pcms_fortranapi_interpolator-targets.cmake")
2331
include("${CMAKE_CURRENT_LIST_DIR}/pcms_fortranapi-targets.cmake")
2432
endif()
2533

2634
include("${CMAKE_CURRENT_LIST_DIR}/pcms-targets.cmake")
27-
include("${CMAKE_CURRENT_LIST_DIR}/pcms_interpolator-targets.cmake")
2835
# must be called at the end of the config file
2936
check_required_components(pcms)

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ if(PCMS_ENABLE_Fortran)
148148
endif()
149149

150150
add_subdirectory(pcms/interpolator)
151+
target_link_libraries(pcms_pcms INTERFACE pcms::interpolator)
151152

152153
install(
153154
TARGETS pcms_pcms

src/pcms/capi/CMakeLists.txt

Lines changed: 60 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,45 @@
1-
add_library(pcms_capi client.cpp kokkos.cpp)
2-
add_library(pcms::capi ALIAS pcms_capi)
1+
add_library(pcms_capi_core client.cpp kokkos.cpp)
2+
add_library(pcms::capi::core ALIAS pcms_capi_core)
3+
34
target_link_libraries(
4-
pcms_capi
5+
pcms_capi_core
56
PUBLIC MPI::MPI_C
67
PRIVATE pcms::core)
78

89
target_include_directories(
9-
pcms_capi
10+
pcms_capi_core
1011
PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>" # this makes our
1112
# include path
1213
# pcms/capi
1314
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/pcms/capi>")
1415

15-
set(CAPI_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/client.h
16+
set(CAPI_CORE_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/client.h
1617
${CMAKE_CURRENT_SOURCE_DIR}/kokkos.h)
1718
set_target_properties(
18-
pcms_capi PROPERTIES PUBLIC_HEADER "${CAPI_HEADERS}" OUTPUT_NAME pcmscapi
19-
EXPORT_NAME capi)
19+
pcms_capi_core PROPERTIES PUBLIC_HEADER "${CAPI_CORE_HEADERS}" OUTPUT_NAME pcmscapicore
20+
EXPORT_NAME capi::core)
21+
22+
add_library(pcms_capi_interpolator mesh.cpp interpolator.cpp kokkos.cpp)
23+
add_library(pcms::capi::interpolator ALIAS pcms_capi_interpolator)
24+
target_link_libraries(pcms_capi_interpolator PUBLIC MPI::MPI_C PRIVATE pcms::interpolator)
25+
target_include_directories(pcms_capi_interpolator
26+
PUBLIC
27+
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../..>" # this makes the module path cpms/capi
28+
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/pcms/capi>")
29+
set(CAPI_INTERPOLATOR_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/interpolator.h
30+
${CMAKE_CURRENT_SOURCE_DIR}/mesh.h)
31+
set_target_properties(pcms_capi_interpolator
32+
PROPERTIES PUBLIC_HEADERS "${CAPI_INTERPOLATOR_HEADERS}"
33+
OUTPUT_NAME pcmscapiinterpolator
34+
EXPORT_NAME capi::interpolator)
35+
36+
# high level interface target
37+
add_library(pcms_capi INTERFACE)
38+
add_library(pcms::capi ALIAS pcms_capi)
39+
set_target_properties(pcms_capi PROPERTIES EXPORT_NAME capi)
40+
# link capi libraries to a high level interface library
41+
target_link_libraries(pcms_capi INTERFACE pcms::capi::core)
42+
target_link_libraries(pcms_capi INTERFACE pcms::capi::interpolator)
2043
install(
2144
TARGETS pcms_capi
2245
EXPORT pcms_capi-targets
@@ -25,8 +48,37 @@ install(
2548
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
2649
INCLUDES
2750
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
28-
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pcms/capi/)
51+
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pcms)
2952
install(
3053
EXPORT pcms_capi-targets
3154
NAMESPACE pcms::
3255
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pcms)
56+
57+
# library targets
58+
install(
59+
TARGETS pcms_capi_core
60+
EXPORT pcms_capi_core-targets
61+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
62+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
63+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
64+
INCLUDES
65+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
66+
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pcms/capi/)
67+
install(
68+
EXPORT pcms_capi_core-targets
69+
NAMESPACE pcms::
70+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pcms)
71+
72+
install(
73+
TARGETS pcms_capi_interpolator
74+
EXPORT pcms_capi_interpolator-targets
75+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
76+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
77+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
78+
INCLUDES
79+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
80+
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/pcms/capi/)
81+
install(
82+
EXPORT pcms_capi_interpolator-targets
83+
NAMESPACE pcms::
84+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pcms)

0 commit comments

Comments
 (0)