Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
d24f691
add new rbf functions
abhiyan123 Aug 18, 2025
5d3af4e
minor changes
abhiyan123 Oct 9, 2025
d4f6781
add doxygen comment
abhiyan123 Oct 21, 2025
6304092
add mesh intersection files
abhiyan123 Oct 21, 2025
8e07c9a
add doxygen comments
abhiyan123 Oct 21, 2025
23e8434
add doxygen comments
abhiyan123 Oct 21, 2025
83ed8ef
add doxygen comments
abhiyan123 Oct 21, 2025
f712271
add doxygen comments
abhiyan123 Oct 21, 2025
972d38e
minor fixes
abhiyan123 Oct 21, 2025
a2fba6b
update doxygen comments
abhiyan123 Oct 21, 2025
bbef708
update comments
abhiyan123 Oct 21, 2025
5b7e369
update CMakeLists
abhiyan123 Oct 22, 2025
5e5d64f
update CMakeLists
jacobmerson Mar 12, 2026
4d62d5a
update topmost CMakeLists
jacobmerson Mar 12, 2026
ea884ec
update CMakeLists
abhiyan123 Oct 22, 2025
67405f5
add pcms namespace
abhiyan123 Oct 22, 2025
b669fc9
add load vector test
abhiyan123 Oct 22, 2025
4395171
add namespace
abhiyan123 Oct 22, 2025
49a8304
remove main
abhiyan123 Oct 22, 2025
fa56a19
correct the name of petsc variables
abhiyan123 Oct 22, 2025
6bf0bd4
correct the petsc variables name
abhiyan123 Oct 22, 2025
c445cc6
add PCMS_ENABLE_PETSC and PCMS_ENABLE_MESHFIELDS macros
abhiyan123 Oct 22, 2025
aa97504
fix memory space issue
abhiyan123 Oct 22, 2025
c666821
fix petsc variable name
abhiyan123 Oct 22, 2025
bf75141
fix header name
abhiyan123 Oct 22, 2025
175d95e
fix header name
abhiyan123 Oct 22, 2025
620e847
add more rbfs and their use cases
abhiyan123 Oct 22, 2025
819e0cb
fix constructor
abhiyan123 Oct 22, 2025
676ee48
remove semicolon
abhiyan123 Oct 22, 2025
7b837ca
resolve copilot suggestions
jacobmerson Mar 8, 2026
200f635
create a localization target
jacobmerson Dec 22, 2025
a7185da
add pcms namespace to all interpolator files
jacobmerson Mar 8, 2026
c5f026a
fix missing dimension in MLS construction
jacobmerson Mar 8, 2026
a75d2fd
factor our centroid computations
jacobmerson Mar 8, 2026
713630c
extract distance squared helper function
jacobmerson Mar 8, 2026
31882f5
factor out helper function for loading Vector<3> from points array
jacobmerson Mar 8, 2026
6e139a8
remove duplicated helper functions for computing centroids
jacobmerson Mar 8, 2026
db51568
raname interpolator -> transfer
jacobmerson Mar 12, 2026
52e8793
Omega_h R3D no longer support R3D_USE_CUDA option
jacobmerson Mar 8, 2026
159d182
ensure transfer functions are in pcms namespace
jacobmerson Mar 8, 2026
55b5d73
use memory/execution spaces from utility headers
jacobmerson Mar 8, 2026
55377a1
Add FindPETSc.cmake for static+shared builds
jacobmerson Mar 8, 2026
d00ee51
move non-templated code to .cpp files
jacobmerson Mar 8, 2026
fb51a1b
add basic test for mesh intersection based field transfer
jacobmerson Mar 9, 2026
ab861fa
remove duplicate centroid computation
jacobmerson Mar 9, 2026
0ae31c9
factor out helper function to convert petsc vector to Omega_h array
jacobmerson Mar 9, 2026
3b8fbae
factor out for_each_intersection_subtriangle that constructs subtrian…
jacobmerson Mar 9, 2026
8531044
factor out support building code
jacobmerson Mar 9, 2026
a932e42
factor out function for adding support points to search queue
jacobmerson Mar 9, 2026
72facfa
mark debug helpers as [[maybe_unused]] to silence compiler warnings
jacobmerson Mar 9, 2026
7d7f3ff
extract helpers for copying view data to 1D arrays
jacobmerson Mar 9, 2026
ccddb3a
use Omega_h::get_max for computing array max
jacobmerson Mar 9, 2026
4e6f3c1
update header guards for consistency with rest of project
jacobmerson Mar 9, 2026
03dc44e
remove unused support struct creation
jacobmerson Mar 9, 2026
55582cb
update include guards to match project template with PCMS_ prefix and…
jacobmerson Mar 9, 2026
e3bc2d9
factor out matrix /vector construction
jacobmerson Mar 9, 2026
6d758a3
cleanup unused headers
jacobmerson Mar 9, 2026
2d6b6b6
disable perfstubs timers
jacobmerson Mar 12, 2026
6bc97e7
update CI debugging to dump the pcms_interpolator-targets.cmake
jacobmerson Mar 12, 2026
f5ad0ac
update config file file with petsc dependency
jacobmerson Mar 12, 2026
7f9507b
update petsc in external build example
jacobmerson Mar 12, 2026
01c0fae
fix external build
jacobmerson Mar 13, 2026
37c7fb6
change to git PETSC_COMM_WORLD from PETSC_COMM_SELF
abhiyan123 Mar 10, 2026
1ef1aa6
add full conservative transfer test
abhiyan123 Mar 10, 2026
fefb18c
add intersection search test
abhiyan123 Mar 10, 2026
5293a43
add function that remove duplicates nodes and fix links
abhiyan123 Mar 10, 2026
47cbb90
change PETSC_COMM_SELF to PETSC_COMM_WORLD
abhiyan123 Mar 10, 2026
b7f9ccf
delete test_conservative_field_transfer.cpp
abhiyan123 Mar 10, 2026
e886959
add R3D_USE_KOKKOS
abhiyan123 Mar 10, 2026
65f3411
remove order
abhiyan123 Mar 11, 2026
684b78b
remove source_coordinates initialization
abhiyan123 Mar 11, 2026
5d0ea7e
take mesh.coords() out of kernel
abhiyan123 Mar 11, 2026
e0edc83
change the mesh
abhiyan123 Mar 11, 2026
f556c55
remove second r3d test
abhiyan123 Mar 11, 2026
f527840
add petsc default arguments
abhiyan123 Mar 11, 2026
efb6709
add petsc default file
abhiyan123 Mar 11, 2026
a5e7aca
add petsc arguments
abhiyan123 Mar 11, 2026
a5b7d4f
change from .h to .hpp
abhiyan123 Mar 11, 2026
d54b5cc
remove petsc options file
abhiyan123 Mar 12, 2026
8fc43c6
add vec type kokkos
abhiyan123 Mar 12, 2026
a14d8b9
add mat type aijkokkos
abhiyan123 Mar 12, 2026
cbc6419
delete petsc options
abhiyan123 Mar 12, 2026
2078dde
update test
abhiyan123 Mar 12, 2026
43ec10d
remove petsc options header
abhiyan123 Mar 12, 2026
c12de24
fix rbf_interpolation compilation
jacobmerson Mar 14, 2026
05611e8
resolve clang-tidy errors
jacobmerson Mar 14, 2026
0e582f7
resolve clang-format formatting issues
jacobmerson Mar 14, 2026
b3a0b25
resolve localization library path for mesh_fields adapter
jacobmerson Mar 14, 2026
e61ae4d
resolve GPU test crash
jacobmerson Mar 15, 2026
a48d582
factor out array creation code
jacobmerson Mar 15, 2026
0894bff
Merge pull request #281 from jacobmerson/cleanup-mesh-intersection
jacobmerson Mar 15, 2026
79706f9
remove spdlog
jacobmerson Mar 16, 2026
93cdd93
enable building without petsc
jacobmerson Mar 16, 2026
739dbc4
Merge pull request #294 from jacobmerson/petsc-meshfields-gating
jacobmerson Mar 16, 2026
1d17d40
Merge pull request #293 from jacobmerson/remove-spdlog
jacobmerson Mar 16, 2026
5354dd5
default petsc to off
cwsmith Mar 16, 2026
e989dd6
self hosted ci: add build+test with petsc off
cwsmith Mar 16, 2026
4c4dd8e
pass uniform_grid by value
jacobmerson Mar 16, 2026
a3ccc35
frontier: need host/device fn, use kokkos array (#297)
cwsmith Mar 16, 2026
0535172
move pcms build after pcms_testcases clone
cwsmith Mar 16, 2026
9db2aa0
Merge pull request #298 from SCOREC/cws/defaultPetscOff
jacobmerson Mar 17, 2026
1430519
initial phase of field creation refactoring
jacobmerson Mar 17, 2026
63cc19e
swap field creation for factory functions
jacobmerson Mar 17, 2026
e215ba4
add Omega_H default field adapter type for order 0 and 1
jacobmerson Mar 17, 2026
1ae19ff
initial unchecked/untested omega_h adapters
jacobmerson Mar 17, 2026
6edd8af
add Omega_h field backend for centroid and linear fields
jacobmerson Mar 18, 2026
00a688a
store shared_ptr to layout in Field types
jacobmerson Mar 18, 2026
919b781
update targets to use C++ 20
jacobmerson Mar 21, 2026
621312e
PCMS builds without MeshFields
jacobmerson Mar 21, 2026
11a37d0
Add build without petsc to CI
jacobmerson Mar 21, 2026
9b8fba6
use Lagrange factory for uniform grid.
jacobmerson Mar 22, 2026
f16be10
extract serialization from the field definition
jacobmerson Mar 22, 2026
38a793a
initial refactor to extract redev field evaluations
jacobmerson Mar 22, 2026
d73c2e1
Reorganize PCMS to separate field and communication operations
jacobmerson Mar 22, 2026
4fe8957
Implementation of new evaluation style.
jacobmerson Mar 22, 2026
4ed1162
Replace APIs with new "evaluators"
jacobmerson Mar 23, 2026
d310976
Update XGC Adapter to utilize the new interface
jacobmerson Mar 23, 2026
26c96b2
Add an "EmptyLayout" this is a replacement for the dummy field adapter
jacobmerson Mar 23, 2026
6a504c3
add a handle that can be used to send the field
jacobmerson Mar 23, 2026
1636f16
XGC proxy coupling tests running with our new Coupler/Fields.
jacobmerson Mar 23, 2026
fa0c71c
update xgc_n0_server with new Field interfaces
jacobmerson Mar 23, 2026
8d841e4
remove coupler and communicator from pcms.h
jacobmerson Mar 23, 2026
9aa9be8
resolve compiler error with xgc_n0_coupling_server
jacobmerson Mar 23, 2026
afbb2c4
Remove old adapters/communication
jacobmerson Mar 23, 2026
9cfaa37
create Dockerfile
Sichao25 Mar 23, 2026
2f43912
Rename to functionspace
jacobmerson Mar 24, 2026
b22f8ae
Resolve participates.
jacobmerson Mar 24, 2026
7f379bd
XGCFunctionSpace and AddField takes Field<T>
jacobmerson Mar 24, 2026
d55b93a
Add class based copy and move interpolator to transfer
jacobmerson Mar 24, 2026
6aa969d
AddField returns a typed field handle that send/recv and do evaluations
jacobmerson Mar 24, 2026
e9f55f0
Match python API to C++ API
jacobmerson Mar 24, 2026
933758e
update python APIs (currently working state)
jacobmerson Mar 24, 2026
3c7f816
move spline_interpolator to uniform_grid directory
jacobmerson Mar 25, 2026
34fa591
remove extraneous header file
jacobmerson Mar 25, 2026
28e9fab
reorganize files to match updated project structure
jacobmerson Mar 26, 2026
5b38ad1
Add a function space for splines
jacobmerson Mar 26, 2026
9f6ebd5
Update FromUniformGrid on LagrangeFunctionSpace
jacobmerson Mar 26, 2026
8684f82
remove layout from FieldData
jacobmerson Mar 26, 2026
f181493
Update FunctionSpace apis to handle multiple field types
jacobmerson Mar 26, 2026
0b7d418
remove raw Field construction
jacobmerson Mar 26, 2026
e2d5306
Add MLS based functionality as an evaluator to the point cloud
jacobmerson Mar 27, 2026
fd180ff
Add FromMesh to the PonitCloud function space.
jacobmerson Mar 27, 2026
31adbbb
Update python apis to remove layout-driven functionality
jacobmerson Mar 27, 2026
ea3b61b
Add transfer operator base class
jacobmerson Mar 28, 2026
01c8c68
Evaluate APIs take Field<T>
jacobmerson Mar 28, 2026
2fdcb70
Add a discretization type into the class hierarchy.
jacobmerson Mar 29, 2026
c4d35ba
Update C++ APIs to use an EvaluationRequest, not coords
jacobmerson Mar 29, 2026
ffc6741
Update python api to use evaluation request
jacobmerson Mar 29, 2026
03eac62
Add testing / more concrete selection of search path
jacobmerson Mar 29, 2026
71c3ba6
Fix search method selection.
jacobmerson Mar 30, 2026
74f5655
Rename NodalFunctionSpace to PolynomialReconstructionFunctionSpace
jacobmerson Mar 30, 2026
0827588
remove 2 suffix from Coupler/Application/FieldCommunicator
jacobmerson Mar 30, 2026
5a0e4bc
Add TransferOperator interface to the mesh intersections
jacobmerson Mar 30, 2026
7d4de3b
remove unused variables
Sichao25 Mar 31, 2026
566cb13
Merge pull request #307 from Sichao25/yus/debug_gpu_warning
jacobmerson Apr 1, 2026
caeedf1
Merge pull request #306 from Sichao25/yus/ci
jacobmerson Apr 1, 2026
87f008e
debug CUDA build
Sichao25 Apr 2, 2026
e2ed92e
implement CUDA field methods
Sichao25 Apr 3, 2026
6f8938a
switch FieldData to device backend
Sichao25 Apr 7, 2026
5418dca
switch layout to device backend
Sichao25 Apr 9, 2026
da8d087
switch evaluator to device side
Sichao25 Apr 9, 2026
5cd2bf2
use device memory in evaluation request
Sichao25 Apr 10, 2026
ac9b9c0
add coordinateview conversion helper
Sichao25 Apr 10, 2026
35f3ed2
use device memory in localization factory and interpolator
Sichao25 Apr 10, 2026
0f66976
remove layout GetDOFHolderCoordinatesHost and host side evaluation
Sichao25 Apr 10, 2026
c1c3e79
rename GetDOFHolderCoordinatesDevice to GetDOFHolderCoordinates
Sichao25 Apr 10, 2026
b585d73
use device memory for uniform grid
Sichao25 Apr 13, 2026
8a942ca
resolve compiler warnings
Sichao25 Apr 14, 2026
a1bd999
correct kokkos view layout
Sichao25 Apr 15, 2026
f66a166
template kokkos layout in View
Sichao25 Apr 16, 2026
9085226
add branch management in MAINTAINER.md
Sichao25 Apr 17, 2026
346825d
debug petsc shared build in ci
Sichao25 Apr 17, 2026
386eddc
add mdspan helper for omega_h read
Sichao25 Apr 17, 2026
2cb8a26
switch discretization to device backend
Sichao25 Apr 21, 2026
609e3bd
name layout host methods explicitly
Sichao25 Apr 21, 2026
614797a
create OverlapMask class
Sichao25 Apr 22, 2026
1f2afdd
Merge pull request #313 from Sichao25/yus/ci_petsc_test
jacobmerson Apr 23, 2026
dd387a5
debug pythonapi life time issue in evaluation request
Sichao25 Apr 23, 2026
e173156
create view from omega_h array with helper
Sichao25 Apr 23, 2026
3dad792
use mdspan as ouput for overlap mask
Sichao25 Apr 24, 2026
fe540ed
Merge branch 'develop' into evaluation-library
Sichao25 Apr 24, 2026
486e037
reformat
Sichao25 Apr 24, 2026
c5e8afe
guard meshfield dependent headers
Sichao25 Apr 24, 2026
342b9ab
debug headers enabled w meshfield wo petsc
Sichao25 Apr 24, 2026
419e23c
add missing target to config.cmake.in
Sichao25 Apr 25, 2026
9987eb7
debug clang-tidy issues
Sichao25 Apr 27, 2026
6eaf892
bump version to 0.4.0
Sichao25 May 1, 2026
65aa318
Merge pull request #316 from Sichao25/evaluation-library
jacobmerson May 2, 2026
f657d3d
remove kokkos only test case
Sichao25 May 8, 2026
d9a6800
Merge pull request #317 from Sichao25/yus/debug_gpu_build
jacobmerson May 8, 2026
37647ff
Merge pull request #312 from Sichao25/yus/ci
jacobmerson May 10, 2026
95b049b
Initial addition of MFEM adapter
jacobmerson Jun 17, 2026
5979f51
WORKING STATE: some initial testing with adding mfem layout/adapter
jacobmerson Jun 17, 2026
91dd41f
Make the concept of a FunctionSpace more clear
jacobmerson Jun 18, 2026
014fb7f
hacky WORKING state fix to resolve overlap region bug.
jacobmerson Jun 21, 2026
41ee1bb
overlap_edits
hgangwar Jul 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
repo-path: 'kokkos/kokkos'
repo-ref: '4.6.01'
cache: true
options: '-DCMAKE_CXX_STANDARD=17
options: '-DCMAKE_CXX_STANDARD=20
-DBUILD_SHARED_LIBS=OFF
-DKokkos_ENABLE_SERIAL=ON
-DKokkos_ENABLE_OPENMP=OFF
Expand All @@ -78,7 +78,7 @@ jobs:
repo-path: 'kokkos/kokkos-kernels'
repo-ref: '4.6.01'
cache: true
options: '-DCMAKE_CXX_STANDARD=17
options: '-DCMAKE_CXX_STANDARD=20
-DBUILD_SHARED_LIBS=OFF
-DKokkos_DIR=${{ runner.temp }}/build-kokkos-openmpi/install/lib/cmake/Kokkos'

Expand Down Expand Up @@ -189,10 +189,10 @@ jobs:
-DCMAKE_CXX_COMPILER=mpicxx \
-DCMAKE_Fortran_COMPILER=mpifort \
-DPCMS_ENABLE_PETSC=ON \
-DPETSC_LINK_STATIC=ON \
-DPETSC_DIR=${{ runner.temp }}/petsc-openmpi \
-DPETSC_ARCH=ubuntu-kokkos \
-DPCMS_TIMEOUT=10 \
-DPCMS_ENABLE_SPDLOG=OFF \
-DCatch2_DIR=${{ runner.temp }}/build-Catch2-openmpi/install/lib/cmake/Catch2 \
-DOmega_h_DIR=${{ runner.temp }}/build-omega_h-openmpi/install/lib/cmake/Omega_h \
-Dmeshfields_DIR=${{ runner.temp }}/build-meshFields-openmpi/install/lib/cmake/meshfields \
Expand Down
72 changes: 57 additions & 15 deletions .github/workflows/cmake-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,23 @@ jobs:
compiler: [g++]
language: ['cpp']
python_api: [OFF, ON]
meshfields: [ON]
petsc: [ON]
include:
- build_type: Release
memory_test: OFF
compiler: g++
language: 'cpp'
python_api: OFF
meshfields: OFF
petsc: ON
- build_type: Release
memory_test: OFF
compiler: g++
language: 'cpp'
python_api: OFF
meshfields: ON
petsc: OFF
exclude:
- build_type: Release
memory_test: ON
Expand Down Expand Up @@ -68,7 +85,7 @@ jobs:
repo-ref: '4.6.01'
cache: true
cache-suffix: ${{ matrix.python_api == 'ON' && '-shared' || '' }}
options: '-DCMAKE_CXX_STANDARD=17
options: '-DCMAKE_CXX_STANDARD=20
-DBUILD_SHARED_LIBS=${{ matrix.python_api }}
-DKokkos_ENABLE_SERIAL=ON
-DKokkos_ENABLE_OPENMP=OFF
Expand All @@ -84,7 +101,7 @@ jobs:
repo-ref: '4.6.01'
cache: true
cache-suffix: ${{ matrix.python_api == 'ON' && '-shared' || '' }}
options: '-DCMAKE_CXX_STANDARD=17
options: '-DCMAKE_CXX_STANDARD=20
-DBUILD_SHARED_LIBS=${{ matrix.python_api }}
-DKokkos_DIR=${{ runner.temp }}/build-kokkos/install/lib/cmake/Kokkos'

Expand All @@ -106,6 +123,7 @@ jobs:
-DKokkos_DIR=${{ runner.temp }}/build-kokkos/install/lib/cmake/Kokkos'

- name: build meshFields
if: matrix.meshfields == 'ON'
uses: ./.github/actions/install-repo
with:
repo-name: 'meshFields'
Expand Down Expand Up @@ -153,7 +171,17 @@ jobs:
-DADIOS2_DIR=${{ runner.temp }}/build-ADIOS2/install/lib/cmake/adios2
-Dperfstubs_DIR=${{ runner.temp }}/build-perfstubs/install/lib/cmake'

- name: Set LD_LIBRARY_PATH for shared libraries
if: matrix.python_api == 'ON'
run: |
meshfields_lib=""
if [ "${{ matrix.meshfields }}" = "ON" ]; then
meshfields_lib="${{ runner.temp }}/build-meshFields/install/lib:"
fi
echo "LD_LIBRARY_PATH=${{ runner.temp }}/build-kokkos/install/lib:${{ runner.temp }}/build-omega_h/install/lib:${meshfields_lib}${{ runner.temp }}/build-redev/install/lib:${{ runner.temp }}/build-ADIOS2/install/lib:${{ runner.temp }}/build-perfstubs/install/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV

- name: clone petsc
if: matrix.petsc == 'ON'
id: clone-petsc
run: |
cd ${{ runner.temp }}
Expand All @@ -162,25 +190,35 @@ jobs:
echo "petsc-commit-hash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT

- name: Cache PETSc
if: matrix.petsc == 'ON'
id: cache-petsc
uses: actions/cache@v3
with:
path: ${{ runner.temp }}/petsc
key: build-petsc-${{ steps.clone-petsc.outputs.petsc-commit-hash }}
key: build-petsc-${{ steps.clone-petsc.outputs.petsc-commit-hash }}-${{ matrix.python_api }}

- name: build petsc
if: steps.cache-petsc.outputs.cache-hit != 'true'
if: matrix.petsc == 'ON' && steps.cache-petsc.outputs.cache-hit != 'true'
run: |
cd ${{ runner.temp }}/petsc
./configure \
PETSC_ARCH=ubuntu-kokkos \
--with-kokkos-dir="${{ runner.temp }}/build-kokkos/install/" \
--with-kokkos-kernels-dir="${{ runner.temp }}/build-kokkos-kernels/install/" \
--with-cuda=0 \
--with-shared-libraries=0 \
--with-shared-libraries=${{ matrix.python_api == 'ON' && '1' || '0' }} \
--download-fblaslapack
make all check

- name: Set PCMS PETSc options
run: |
echo "PCMS_ENABLE_PETSC=-DPCMS_ENABLE_PETSC=${{ matrix.petsc }}" >> $GITHUB_ENV
if [ "${{ matrix.petsc }}" = "ON" ]; then
echo "PCMS_PETSC_OPTIONS=-DPETSC_LINK_STATIC=ON -DPETSC_DIR=${{ runner.temp }}/petsc -DPETSC_ARCH=ubuntu-kokkos" >> $GITHUB_ENV
else
echo "PCMS_PETSC_OPTIONS=" >> $GITHUB_ENV
fi

- name: checkout pcms_testcases
uses: actions/checkout@v3
with:
Expand All @@ -190,10 +228,14 @@ jobs:
- name: Install fftw3
run: sudo apt-get install -yq libfftw3-dev pkg-config

- name: Set LD_LIBRARY_PATH for shared libraries
if: matrix.python_api == 'ON'
- name: Set PCMS MeshFields options
run: |
echo "LD_LIBRARY_PATH=${{ runner.temp }}/build-kokkos/install/lib:${{ runner.temp }}/build-omega_h/install/lib:${{ runner.temp }}/build-meshFields/install/lib:${{ runner.temp }}/build-redev/install/lib:${{ runner.temp }}/build-ADIOS2/install/lib:${{ runner.temp }}/build-perfstubs/install/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PCMS_ENABLE_MESHFIELDS=-DPCMS_ENABLE_MESHFIELDS=${{ matrix.meshfields }}" >> $GITHUB_ENV
if [ "${{ matrix.meshfields }}" = "ON" ]; then
echo "PCMS_MESHFIELDS_DIR=-Dmeshfields_DIR=${{ runner.temp }}/build-meshFields/install/lib/cmake/meshfields" >> $GITHUB_ENV
else
echo "PCMS_MESHFIELDS_DIR=" >> $GITHUB_ENV
fi

- name: build pcms
uses: ./.github/actions/install-repo
Expand All @@ -207,15 +249,14 @@ jobs:
-DCMAKE_CXX_COMPILER=`which mpicxx`
-DCMAKE_Fortran_COMPILER=`which mpifort`
-DMPIEXEC_PREFLAGS="--oversubscribe"
-DPCMS_ENABLE_PETSC=ON
-DPETSC_DIR=${{ runner.temp }}/petsc
-DPETSC_ARCH=ubuntu-kokkos
${{ env.PCMS_ENABLE_MESHFIELDS }}
${{ env.PCMS_ENABLE_PETSC }}
${{ env.PCMS_PETSC_OPTIONS }}
-DPCMS_TIMEOUT=10
-DPCMS_ENABLE_SPDLOG=OFF
-DPCMS_ENABLE_Python=${{ matrix.python_api }}
-DCatch2_DIR=${{ runner.temp }}/build-Catch2/install/lib/cmake/Catch2
-DOmega_h_DIR=${{ runner.temp }}/build-omega_h/install/lib/cmake/Omega_h
-Dmeshfields_DIR=${{ runner.temp }}/build-meshFields/install/lib/cmake/meshfields
${{ env.PCMS_MESHFIELDS_DIR }}
-Dredev_DIR=${{ runner.temp }}/build-redev/install/lib/cmake/redev
-DMPIEXEC_EXECUTABLE=`which mpirun`
-DADIOS2_DIR=${{ runner.temp }}/build-ADIOS2/install/lib/cmake/adios2
Expand Down Expand Up @@ -256,12 +297,13 @@ jobs:
cat ${{ runner.temp }}/build-pcms/install/lib/cmake/pcms/pcms-config.cmake
echo "-------- PCMS TARGETS -------------"
cat ${{ runner.temp }}/build-pcms/install/lib/cmake/pcms/pcms-targets.cmake
echo "-------- PCMS INTERPOLATOR TARGETS -------------"
cat ${{ runner.temp }}/build-pcms/install/lib/cmake/pcms/pcms_interpolator-targets.cmake
echo "-------- PCMS TRANSFER TARGETS -------------"
cat ${{ runner.temp }}/build-pcms/install/lib/cmake/pcms/pcms_transfer-targets.cmake
export VERBOSE=1
cmake \
-B ${{github.workspace}}/examples/external-usage-example/build \
-S ${{github.workspace}}/examples/external-usage-example/ \
-Dpcms_DIR=${{ runner.temp }}/build-pcms/install/lib/cmake/pcms \
${{ matrix.petsc == 'ON' && format('-DPETSC_LINK_STATIC=ON -DPETSC_DIR={0}/petsc -DPETSC_ARCH=ubuntu-kokkos', runner.temp) || '' }} \
--debug-output
cmake --build ${{github.workspace}}/examples/external-usage-example/build
4 changes: 2 additions & 2 deletions .github/workflows/perlmutter/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ build-pcms/install
# cmake -S kokkos-kernels -B build-kokkos-kernels \
# -DCMAKE_INSTALL_PREFIX=$PWD/build-kokkos-kernels/install \
# -DCMAKE_CXX_COMPILER=CC \
# -DCMAKE_CXX_STANDARD=17
# -DCMAKE_CXX_STANDARD=20
# cmake --build build-kokkos-kernels -j24 --target install


Expand Down Expand Up @@ -131,4 +131,4 @@ cmake -S pcms -B build-pcms \
-DPCMS_TIMEOUT=100 \
-DCMAKE_CXX_STANDARD=20 \
-DPCMS_TEST_DATA_DIR=$PWD/pcms_testcases
cmake --build build-pcms -j8
cmake --build build-pcms -j8
26 changes: 24 additions & 2 deletions .github/workflows/self-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,37 @@ jobs:

git clone https://github.com/jacobmerson/pcms_testcases.git ${workDir}/pcms_testcases

# pcms - petsc off
bdir=${workDir}/build-pcms-petsc-off
cmake -S ${{github.workspace}}/pcms_${{ github.event.id }} -B $bdir \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpicxx \
-DPCMS_TIMEOUT=20 \
-DPCMS_ENABLE_PETSC=OFF \
-Dredev_DIR=$rdbdir/install/lib64/cmake/redev/ \
-DOmega_h_DIR=$ohbdir/install/lib64/cmake/Omega_h/ \
-Dperfstubs_DIR=$psbdir/install/lib/cmake/ \
-DADIOS2_DIR=$adiosbdir/install/lib64/cmake/adios2/ \
-DCatch2_DIR=$c2bdir/install/lib64/cmake/Catch2/ \
-DKokkos_DIR=$kkbdir/install/lib64/cmake/Kokkos/ \
-DKokkosKernels_DIR=$kkkbdir/install/lib64/cmake/KokkosKernels/ \
-Dmeshfields_DIR=$mfbdir/install/lib64/cmake/meshfields/ \
-DPCMS_TEST_DATA_DIR=${workDir}/pcms_testcases/ \
-DCMAKE_CXX_EXTENSIONS=Off
cmake --build $bdir
ctest --test-dir $bdir --output-on-failure

# pcms
export PETSC_OPTIONS="-use_gpu_aware_mpi 0"
bdir=${workDir}/build-pcms
cmake -S ${{github.workspace}}/pcms_${{ github.event.id }} -B $bdir \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpicxx \
-DPCMS_TIMEOUT=20 \
-DPCMS_ENABLE_SPDLOG=OFF \
-DPCMS_ENABLE_PETSC=ON \
-DPETSC_LINK_STATIC=ON \
-DPETSC_DIR=${workDir}/petsc \
-DPETSC_ARCH=cuda-kokkos \
-Dredev_DIR=$rdbdir/install/lib64/cmake/redev/ \
Expand Down Expand Up @@ -218,4 +240,4 @@ jobs:
if: ${{ !cancelled() }}
run: |
echo "PCMS_WORK_DIR $PCMS_WORK_DIR"
rm -rf $PCMS_WORK_DIR
rm -rf $PCMS_WORK_DIR
27 changes: 22 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,14 @@ option(PCMS_ENABLE_CLIENT "enable the coupling client implementation" ON)

option(PCMS_ENABLE_XGC "enable xgc field adapter" ON)
option(PCMS_ENABLE_OMEGA_H "enable Omega_h field adapter" OFF)
option(PCMS_ENABLE_MFEM "enable MFEM field adapter" OFF)
option(PCMS_ENABLE_C "Enable pcms C api" ON)
option(PCMS_ENABLE_Python "Enable pcms Python api" OFF)

option(PCMS_ENABLE_PRINT "PCMS print statements enabled" ON)
option(PCMS_ENABLE_SPDLOG "use spdlog for logging" ON)

if(PCMS_ENABLE_SPDLOG)
find_package(spdlog REQUIRED)
endif()
option(PETSC_LINK_STATIC "Use pkg-config --static results for PETSc"
${_pcms_link_petsc_static_default})

# find package before fortran enabled, so we don't require the adios2 fortran
# interfaces this is important because adios2 build with clang/gfortran is
Expand Down Expand Up @@ -121,11 +120,29 @@ if(PCMS_ENABLE_OMEGA_H)
message(FATAL_ERROR "Omega_h must be built with MPI enabled.")
endif()
endif()

if(PCMS_ENABLE_MFEM)
find_package(MFEM REQUIRED)
message(STATUS "Found MFEM: ${MFEM_DIR} (found version ${MFEM_VERSION})")
if(NOT MFEM_USE_MPI)
message(FATAL_ERROR "MFEM must be built with MPI enabled.")
endif()
endif()
# adios2 adds C and Fortran depending on how it was built
find_package(ADIOS2 CONFIG 2.10.2 REQUIRED)
find_package(Kokkos CONFIG 4.5 REQUIRED)

find_package(meshfields REQUIRED)
option(PCMS_ENABLE_MESHFIELDS "Enable MeshFields support" ON)
option(PCMS_ENABLE_PETSC "Enable PETSc support" OFF)

if(PCMS_ENABLE_MESHFIELDS)
find_package(meshfields REQUIRED)
message(STATUS "Found MeshFields: ${meshfields_DIR} (found version ${meshfields_VERSION})")
endif()

if(PCMS_ENABLE_PETSC)
find_package(PETSc REQUIRED)
endif()

add_subdirectory(src)

Expand Down
7 changes: 7 additions & 0 deletions MAINTAINER.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ see issue #<###>
6. create the tag `git tag -a v#.#.# -m "pcms version #.#.#"`
7. push the tag `git push origin v#.#.#`

## Branch Management

The `develop` branch is the main development branch where all new features and bug fixes are merged. The `master` branch is the stable release branch that reflects the latest released version of pcms. All changes should be made in the `develop` branch and then merged into `master` when ready for release.

It is generally recommended to use forks for development to keep the main repository clean and to facilitate code review. Contributors can create a fork of the repository, make their changes in a new branch, and then submit a pull request to the `develop` branch of the main repository. Ensure that the pull request includes a clear description of the changes made and references any relevant issues.

When creating a new feature or fixing a bug in main repo, create a new branch from `develop` with a descriptive name (e.g., `feature/new-feature`, `bugfix/issue-123`).

## Maintain CI/CD

Expand Down
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module load cuda/12.1.1-zxa4msk
git clone --branch 4.6.01 --depth 1 git@github.com:kokkos/kokkos.git
cmake -S kokkos -B build-kokkos \
-DCMAKE_INSTALL_PREFIX=build-kokkos/install \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_STANDARD=20 \
-DKokkos_ENABLE_SERIAL=ON \
-DKokkos_ENABLE_OPENMP=OFF \
-DKokkos_ENABLE_CUDA=OFF \
Expand All @@ -44,7 +44,7 @@ cmake --build build-kokkos --target install
git clone --branch 4.6.01 --depth 1 git@github.com:kokkos/kokkos-kernels.git
cmake -S kokkos-kernels -B build-kokkos-kernels \
-DCMAKE_INSTALL_PREFIX=build-kokkos-kernels/install \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_STANDARD=20 \
-DKokkos_ROOT=$PWD/build-kokkos/install/lib64/cmake \
-DBUILD_SHARED_LIBS=OFF
cmake --build build-kokkos-kernels --target install
Expand Down Expand Up @@ -97,7 +97,7 @@ cmake --build build-redev --target install
git clone --branch 4.6.01 --depth 1 git@github.com:kokkos/kokkos.git
cmake -S kokkos -B build-kokkos \
-DCMAKE_INSTALL_PREFIX=build-kokkos/install \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_CXX_COMPILER=$PWD/kokkos/bin/nvcc_wrapper \
-DKokkos_ARCH_AMPERE80=ON \
Expand All @@ -112,7 +112,7 @@ cmake --build build-kokkos --target install
git clone --branch 4.6.01 --depth 1 git@github.com:kokkos/kokkos-kernels.git
cmake -S kokkos-kernels -B build-kokkos-kernels \
-DCMAKE_INSTALL_PREFIX=build-kokkos-kernels/install \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_STANDARD=20 \
-DKokkos_ROOT=$PWD/build-kokkos/install/lib64/cmake \
-DBUILD_SHARED_LIBS=off
cmake --build build-kokkos-kernels --target install
Expand Down Expand Up @@ -248,9 +248,19 @@ If work in SCOREC system, you can directly use the spack-scorec.yaml which conta
Then add the binded python module to your `PYTHONPATH` environment variable. You can find the install prefix with `find $(spack location -i pcms) -name "*.so" | grep -i pcms`.
```console
$ export PYTHONPATH=$<your-path-to-module>:$PYTHONPATH
```
```

Test the python API with `python -c "import pcms; print(pcms.__version__)"`. You should see the version of PCMS printed out without any errors.

Point-evaluator construction in Python uses `EvaluationRequest`, for
example:
```python
request = pcms.EvaluationRequest.from_coordinates(eval_coords)
evaluator = source_space.create_point_evaluator(request)

optimized_request = pcms.EvaluationRequest.from_function_space(target_space)
evaluator = source_space.create_point_evaluator(optimized_request)
```

PS: If you need certain config options for the python API, you can specify them in the spack spec. For example, to build the python API with Exodus support, one compatible config is `pcms+python ^omega-h+trilinos ^trilinos@15.0.0:+exodus ^netcdf-c@4.8.1+mpi`. At this moment, omega-h spack package does not have the exodus support, so you need to manually add `args.append("-Omega_h_USE_SEACASExodus:BOOL=ON")` to the `package.py` file of omega-h in spack before installing pcms with spack.

Expand All @@ -262,3 +272,11 @@ Assign the full path of testdatas to test_dir in the test_init.cc file; Use "mpi

## Creating Archive for Release
`git archive --format=tar.gz -o /tmp/pcms.tar.gz --prefix=pcms/ develop`

## Running clang format on SCOREC
```console
module use /opt/scorec/spack/rhel9/v0222_2/lmod/linux-rhel9-x86_64/Core/
module load clang-format
module load llvm
find . -regex '.*\.\(cpp\|cxx\|cc\|c\|hpp\|h\)' -exec clang-format -style=file -i {} \;
```
Loading