Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
217 commits
Select commit Hold shift + click to select a range
49027c7
Add OpenPMD as external lib
pgrete Jan 8, 2024
4525e86
Add OpenPMD skeleto
pgrete Jan 11, 2024
4de250c
WIP more Open PMD
pgrete Jan 11, 2024
b906af7
WIP OpenPMD use file id
pgrete Jan 12, 2024
108fc7a
Merge branch 'develop' into pgrete/pmd-output
pgrete Feb 29, 2024
79660a2
Write blocks
pgrete Feb 29, 2024
372b585
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Mar 8, 2024
8d40c91
Centralize getting var info for output
pgrete Mar 8, 2024
4f20c26
WIP openpmd, chunks don't work yet plus check dimensionality
pgrete Mar 8, 2024
4dde705
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Mar 14, 2024
f29e8d1
Fix chunk extents
pgrete Mar 14, 2024
a501a5d
Write Attributes
pgrete Mar 15, 2024
c0be75c
Rename restart to restart_hdf5
pgrete Mar 15, 2024
7f03528
WIP abstract RestartReader
pgrete Mar 18, 2024
56795f2
WIP separating RestartReader
pgrete Mar 18, 2024
8587303
Make RestartReader abstract
pgrete Mar 19, 2024
8bf955b
Merge branch 'pgrete/refactor-restart' into pgrete/pmd-output
pgrete Mar 20, 2024
e3ea8d7
Add OpenPMD restart skeleton
pgrete Mar 20, 2024
33b6261
WIP updating loc logic
pgrete Mar 20, 2024
788118c
Merge branch 'develop' into pgrete/pmd-output
pgrete Apr 11, 2024
62e54da
Fix interface from recent changes in develop
pgrete Apr 11, 2024
6309663
Read and Write loc
pgrete Apr 11, 2024
7224f42
Houston, we have a build
pgrete Apr 11, 2024
ae1f241
Added OpenPMD restart ReadBlocks
pgrete Apr 12, 2024
19863d7
Fix loc level
pgrete Apr 12, 2024
e2b2bd1
Make Series persistent and fix rootlevel typo
pgrete Apr 15, 2024
f9373e8
WIP Read/Write Params
pgrete Apr 15, 2024
96a3f4c
Make ReadParams private member
pgrete Apr 15, 2024
61306a0
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Apr 18, 2024
56976a8
Fix root level in output
pgrete Apr 18, 2024
6199843
Move to mesh per record standard for writing
pgrete Apr 22, 2024
9fb9f68
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Apr 23, 2024
684b7ab
Allow for 2D and 3D output. Fix single dataset reset.
pgrete Apr 23, 2024
251c6ea
Fix logical loc
pgrete Apr 23, 2024
03f80c7
Rename opmd files
pgrete Apr 24, 2024
890fffe
Separate common calls to chunks and names
pgrete Apr 24, 2024
04359d3
Reuse shared chunk and name for restarts
pgrete Apr 24, 2024
2b89659
Add regression test
pgrete Apr 24, 2024
804e60d
Somewhat make restarts working
pgrete Apr 24, 2024
a436f55
Fix order of arguments for correct flush
pgrete Apr 26, 2024
6a3a80d
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Apr 26, 2024
28d725d
Fix handling of output variable names
pgrete Apr 26, 2024
a039ea1
Fix reading chunks for sparsely populated output files
pgrete Apr 26, 2024
ae8519f
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Apr 29, 2024
7476641
Dont tell anyone I spent days on this...
pgrete May 3, 2024
39d4b99
Temp disable dumping Views from device
pgrete May 3, 2024
d2ba882
Merge branch 'develop' into pgrete/pmd-output
pgrete May 22, 2024
626303d
Merge branch 'pgrete/fix-hasghost-restart' into pgrete/pmd-output
pgrete Jun 12, 2024
4241198
Dump deref cnt in opmd restart
pgrete Jun 12, 2024
101ebf2
Merge branch 'develop' into pgrete/pmd-output
BenWibking Jun 18, 2024
60a38b2
install openpmd in macOS CI
BenWibking Jun 18, 2024
461eeaa
Merge branch 'develop' into pgrete/pmd-output
BenWibking Jun 21, 2024
cd007d3
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Jun 25, 2024
28020db
Remove extraneous popRegion
pgrete Jun 25, 2024
5324e00
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Jul 11, 2024
af4b966
Fix formatting
pgrete Jul 11, 2024
0e015d1
Make format clang16 compatible
pgrete Jul 11, 2024
5135aea
Fix default backend_config parsing
pgrete Jul 12, 2024
b344291
another attempt
pgrete Jul 12, 2024
7486915
Bump OpenPMD version
pgrete Jul 12, 2024
0e3f758
pmd: Write scalar particle data
pgrete Jul 25, 2024
e39ef61
Code dedup
pgrete Jul 25, 2024
b938511
Allow writing non-scalar particles
pgrete Jul 25, 2024
08d6b41
Make positions standard compliant
pgrete Jul 25, 2024
bf74c7e
Allow for particles restarts (serial works)
pgrete Jul 25, 2024
3b37c26
Support particle restarts in parallel
pgrete Jul 26, 2024
0ca5b6f
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Jul 26, 2024
b30788a
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Aug 6, 2024
5f95466
Add now prefix to pmd outputs
pgrete Aug 6, 2024
6811594
Make linter happy
pgrete Aug 7, 2024
c0d7f11
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Sep 2, 2024
b2d7525
Bump OPMD version and add delim
pgrete Sep 4, 2024
f229274
Merge branch 'develop' into pgrete/pmd-output
pgrete Sep 26, 2024
3283635
Change delim. Is this stupid?
pgrete Sep 26, 2024
d59d573
Merge branch 'develop' into pgrete/pmd-output
pgrete Oct 7, 2024
3f95fc4
Make params IO test more flexible
pgrete Oct 7, 2024
1141ff3
Add test case for opmd params IO
pgrete Oct 7, 2024
e6e4d0b
Reading/writing non-ParArray Params works
pgrete Oct 7, 2024
8230f94
Allow writing ParArray and Views to Params
pgrete Oct 8, 2024
e64ae7e
Read ParArray/View from opmd raw
pgrete Oct 8, 2024
b789711
Make basic parsing of Params work
pgrete Oct 8, 2024
466ecd2
Restore view from opmd params
pgrete Oct 8, 2024
3aa4c78
Fix manual pararray reading
pgrete Oct 8, 2024
4c1c70f
Make linter happy?
pgrete Oct 8, 2024
8a1850b
Make restoring HostViews possible
pgrete Oct 9, 2024
1f02ffa
Make reading host arrays work using the direct interface in the unit …
pgrete Oct 9, 2024
d6565c5
Expands types for read/write to all vec
pgrete Oct 9, 2024
6065213
Remove debug info
pgrete Oct 9, 2024
4bf6a92
Merge branch 'develop' into pgrete/pmd-output
BenWibking Oct 16, 2024
e67f589
Merge branch 'develop' into pgrete/pmd-output
pgrete Nov 9, 2024
503a5b6
Fix bc interface from PR 1177
pgrete Nov 9, 2024
d064f03
Merge branch 'develop' into pgrete/pmd-output
BenWibking Nov 22, 2024
dfbcb27
Merge branch 'develop' into pgrete/pmd-output
pgrete Nov 29, 2024
4769a63
Fix output numbering for triggered opmd outputs
pgrete Nov 29, 2024
543dbf9
Make formatter happy
pgrete Nov 29, 2024
449cd5e
Bump opmd to 0.16.1 stable version (not requiring work around any more)
pgrete May 23, 2025
7f813c0
AMR restarts work and are bitwise identical now
pgrete May 23, 2025
3689e6c
Cross test opmd and rst outputs
pgrete May 23, 2025
2db2db7
Merge branch 'develop' into pgrete/pmd-output
pgrete May 23, 2025
aea0519
Fix merge issues
pgrete May 23, 2025
57b719a
Fix compile issue with std::string dtor of vectypes
pgrete May 23, 2025
9bed0ce
Allow embedded and system opmd build w and wo MPI
pgrete Jun 4, 2025
9ae2fde
Try opmd build in CI
pgrete Jun 5, 2025
0ac42c6
Provide path to openpmd_api
pgrete Jun 5, 2025
d230db9
Update CI containers to be used
pgrete Jun 5, 2025
41c94c5
Disable read/write of string views (not supported by Kokkos)
pgrete Jun 5, 2025
642e23d
Add comments
pgrete Jun 18, 2025
8e089bb
Add opmd dump/load of new uint64 ids
pgrete Jun 18, 2025
1b8b904
Add opmd write support for all field types
pgrete Jun 19, 2025
a1768b0
Fix 2D offsets
pgrete Jun 20, 2025
69fc044
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Jul 2, 2025
3d48016
First stab at opmd restart for non-CC fields
pgrete Jul 2, 2025
2a0cde8
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Jul 2, 2025
301f25b
First attempt at adding/restoring opmd sparseinfo
pgrete Jul 2, 2025
0d5d4d3
Fix misplaced comma
pgrete Jul 2, 2025
207d24b
Add missing int8_t to mpi type map
pgrete Jul 3, 2025
4fe5d63
Only write SparseInfo when sparse fields are present
pgrete Jul 3, 2025
762a9ce
Fix interfaces
pgrete Jul 24, 2025
be68203
Fix doc build
pgrete Jul 24, 2025
5ce4304
Add mutability maybe restart and made it so we can read old restart f…
jonahm-LANL Jul 28, 2025
ce7ef95
Just warn for default restart Params
pgrete Jul 29, 2025
80e3ef7
Update restart logic. Fixes #1235
pgrete Jul 29, 2025
f133962
Only warn about default non-input params
pgrete Jul 29, 2025
fbfd356
Ensure last output is not in the future
pgrete Jul 29, 2025
c7f8ab5
remove pmesh->is_restart for Globals
pgrete Jul 30, 2025
dd94417
Allow writing legacy id fields for particles
pgrete Jul 30, 2025
9d90214
Allow empty restart swarms
pgrete Jul 30, 2025
1988ed2
Unify missing var handling
pgrete Jul 30, 2025
38b1ec5
Add reminder todo to params
pgrete Jul 30, 2025
b3849d4
Add Changelog
pgrete Jul 30, 2025
51f45b7
change check orphans to default to false for restarts
jonahm-LANL Jul 30, 2025
dcc025d
more careful logic
jonahm-LANL Jul 30, 2025
04f0cab
oops added an if
jonahm-LANL Jul 30, 2025
3ab5353
ok try this
jonahm-LANL Jul 30, 2025
11a9884
Fix removing first elemn in linked list
pgrete Jul 31, 2025
43fcf78
Add missing guards
pgrete Jul 31, 2025
be19c0a
Merge branch 'pgrete/backwards-comapt-restarts-v2' into pgrete/pmd-ou…
pgrete Jul 31, 2025
fcc4a5b
Fix interface
pgrete Aug 1, 2025
72412bd
Check pin for opmd out and check vars skel
pgrete Aug 1, 2025
73e445f
Add option for single prec output in openpmd
pgrete Aug 1, 2025
d6936ae
Allow coarsened opmd outputs
pgrete Aug 1, 2025
4924929
Merge branch 'develop' into pgrete/pmd-output
pgrete Aug 18, 2025
cb8997b
Fix logic causing issues for restarts with varying output blocks
pgrete Aug 18, 2025
fa25d69
Fix formatting and test case
pgrete Aug 19, 2025
4f8249e
Merge branch 'pgrete/fix-output-block-restarts' into pgrete/pmd-output
pgrete Aug 19, 2025
6787b42
Fix/cleanup include logic and move format ver to impl
pgrete Aug 19, 2025
0a5df77
Add missing try-catch for opmd params
pgrete Aug 19, 2025
3edc7af
Fix opmd params try catch
pgrete Aug 19, 2025
7cc4040
Add final logic to opmd
pgrete Aug 19, 2025
e671e67
WIP slices
pgrete Aug 19, 2025
6ab9d02
Logic for slices seems to work. Data not.
pgrete Aug 20, 2025
6cd7c39
Fix final logic
pgrete Aug 21, 2025
56081fe
Fix slices
pgrete Aug 21, 2025
dc60f00
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Aug 21, 2025
3267252
Merge branch 'develop' into pgrete/pmd-output
pgrete Aug 25, 2025
505cdb4
Fix regression test
pgrete Aug 28, 2025
c657226
merge
BenWibking Sep 30, 2025
39c2a9a
fix style
BenWibking Sep 30, 2025
dcd576c
Merge branch 'develop' into pgrete/pmd-output
pgrete Oct 7, 2025
beeacba
Impl VariableExists for OpenPMD
pgrete Oct 7, 2025
00d9476
Format
pgrete Oct 7, 2025
4d33816
Merge branch 'develop' into pgrete/pmd-output
pgrete Oct 15, 2025
4efedc1
Use for sizes
pgrete Oct 22, 2025
9b30739
Merge branch 'develop' into pgrete/pmd-output
pgrete Nov 11, 2025
690f465
Merge branch 'develop' into pgrete/pmd-output
pgrete Nov 14, 2025
08e2eb8
Update contianer and requirements
pgrete Nov 21, 2025
1dd2dbf
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Dec 15, 2025
5317f3a
Add openPMD user facing doc
pgrete Dec 17, 2025
f0d0903
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Dec 17, 2025
e719390
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Jan 13, 2026
0effb48
Allow writing subset of variables.
pgrete Jan 13, 2026
c739945
Format
pgrete Jan 13, 2026
95351e8
Use base container
pgrete Jan 13, 2026
aee29d9
Merge branch 'develop' into pgrete/pmd-output
pgrete Jan 30, 2026
246cb62
Update src/pack/pack_utils.hpp
Yurlungur Feb 19, 2026
8530ea2
Merge branch 'develop' into pgrete/size_t-for-size
Yurlungur Feb 19, 2026
254e410
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete Mar 9, 2026
dbc99ff
Merge branch 'develop' into pgrete/size_t-for-size
pgrete Apr 28, 2026
e9b2985
size_t -> std::size_t
pgrete Apr 28, 2026
04903d5
One more oop
pgrete Apr 28, 2026
4563fc3
Merge branch 'develop' into pgrete/size_t-for-size
pgrete Apr 29, 2026
12c28cd
Merge branch 'develop' into pgrete/pmd-output
BenWibking Apr 30, 2026
9f6dd1c
update header names
BenWibking Apr 30, 2026
6af8f5c
build fix
BenWibking Apr 30, 2026
e7d40c3
openPMD bump
BenWibking Apr 30, 2026
9e712fa
Merge remote-tracking branch 'origin/pgrete/size_t-for-size' into pgr…
pgrete May 4, 2026
bdea6d2
Fix typo and size_t
pgrete May 4, 2026
6c67bac
Add include guard for opmd param test
pgrete May 4, 2026
0a1a159
Ensure opmd restart outputs cannot be coarsened
pgrete May 4, 2026
2409e30
Enforce no ghost zones in opmd outputs
pgrete May 4, 2026
51410a7
Fix fillsize logic for arb topolog elements
pgrete May 4, 2026
cf120bf
Build opmd-api for serial builds
pgrete May 4, 2026
72ab3cf
Allow trailing / in bp dir name for restarts
pgrete May 4, 2026
e42273f
Unify DumpOutputMode and SubOutputType
pgrete May 4, 2026
70e7194
Add .pmd file for VisIt and ParaView
pgrete May 4, 2026
5ee9f59
Add basic Partheon provenacne infos to opmd output
pgrete May 4, 2026
2feb3e9
Merge branch 'develop' into pgrete/pmd-output
pgrete May 4, 2026
d78ce0a
Add safety checks for coarsening factor
pgrete May 4, 2026
a648350
Fix include guards in params unit test
pgrete May 4, 2026
7925300
obey desired meshdata container for hdf5 var
pgrete May 4, 2026
9198ff2
Add safety check for standard compliant opmd record names
pgrete May 4, 2026
6efb2e8
Check coarsening factor depending on dimensionality
pgrete May 4, 2026
cd3e9c3
Fix logic...
pgrete May 4, 2026
f8f1ab6
Change default output_type to data
pgrete May 5, 2026
f7285b5
Relax dim requirement for vector output
pgrete May 5, 2026
a28377c
Merge branch 'develop' into pgrete/pmd-output
BenWibking May 15, 2026
a11c740
Merge branch 'develop' into pgrete/pmd-output
Yurlungur May 24, 2026
450a932
Merge branch 'develop' into pgrete/pmd-output
pgrete Jun 4, 2026
1f96116
Disable OpenPMD by default (for now)
pgrete Jun 9, 2026
967114a
Forward sim metadata to opmd
pgrete Jun 9, 2026
e8cfcb9
Remove extra copy for load/store views in openpmd attributes
pgrete Jun 9, 2026
10dae37
Address Luke's comments
pgrete Jun 9, 2026
ace1f7e
Fix vector/tensor component labeling (assisted by Claude)
pgrete Jun 9, 2026
6b4d3b1
Skip blocks not included in slices entirely
pgrete Jun 10, 2026
984a06d
Fix compile
pgrete Jun 10, 2026
d2e2a15
Merge branch 'develop' into pgrete/pmd-output
pgrete Jun 12, 2026
6ba910d
Let cmake figure out compiler and wrappers
pgrete Jun 12, 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
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// devcontainer.json
{
"name": "parthenon-dev",
"image": "ghcr.io/parthenon-hpc-lab/cuda12.8-mpi-hdf5-opmd",
"image": "ghcr.io/parthenon-hpc-lab/cuda12.9-mpi-hdf5-opmd",
// Somehow required to make GPUs work inside docker on the CI machine.
// Just passing the runtime and/or --gpus=all works initially but then
// the GPU disappears in the active container.
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@ jobs:
cache-dependency-path: '**/requirements.txt'
- run: pip install -r requirements.txt

- name: Install dependencies
- name: Install dependencies (Homebrew)
run: |
brew install openmpi hdf5-mpi adios2 || true

- name: Install OpenPMD
run: |
openPMD_USE_MPI=ON python3 -m pip install openpmd-api --no-binary openpmd-api

- name: Install parthenon_tools
run: |
pip install scripts/python/packages/parthenon_tools
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ci-short.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ jobs:
- name: cpplint
run: python3 ./tst/style/cpplint.py --counting=detailed --recursive src example tst
- name: copyright
# using variant mpi because openpmd lib is only installed with mpi support (no serial)
run: |
cmake -DCMAKE_CXX_FLAGS=-Werror -Bbuild-copyright-check
cmake -DCMAKE_CXX_FLAGS=-Werror -Bbuild-copyright-check -DMACHINE_VARIANT=mpi
cmake --build build-copyright-check -t check-copyright
- uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -104,6 +105,7 @@ jobs:
# make sure parthenon tools is in our python path
export PYTHONPATH="$PYTHONPATH:$(python -m site --user-site)"
ctest -R regression_mpi_test:output_hdf5
ctest -R regression_mpi_test:restart_opmd
# Test example with swarms
- name: particle-leapfrog
run: |
Expand Down Expand Up @@ -178,6 +180,7 @@ jobs:
# make sure parthenon tools is in our python path
export PYTHONPATH="$PYTHONPATH:$(python -m site --user-site)"
ctest -R regression_mpi_test:output_hdf5
ctest -R regression_mpi_test:restart_opmd
# Test example with swarms
- name: particle-leapfrog
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
mkdir -p build && cd build
cmake -DPARTHENON_DISABLE_HDF5=ON \
-DPARTHENON_DISABLE_MPI=ON \
-DPARTHENON_DISABLE_OPENPMD=ON \
-DREGRESSION_GOLD_STANDARD_SYNC=OFF \
-DBUILD_TESTING=OFF \
..
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
## Current develop

### Added (new features/APIs/variables/...)
- [[PR 1050]](https://github.com/parthenon-hpc-lab/parthenon/pull/1050) Add support for OpenPMD/ADIOS2 output (incl slices and coarsened dumps)
- [[PR 1271]](https://github.com/parthenon-hpc-lab/parthenon/pull/1271) Add option to set a minimum number of teams for boundary communication kernels
- [[PR 1382]](https://github.com/parthenon-hpc-lab/parthenon/pull/1382) Support Particle AMR
- [[PR 1378]](https://github.com/parthenon-hpc-lab/parthenon/pull/1378) MeshData Swarm Tasks
Expand Down
47 changes: 47 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ option(PARTHENON_DISABLE_MPI "MPI is enabled by default if found, set this to Tr
option(PARTHENON_ENABLE_HOST_COMM_BUFFERS "CUDA/HIP Only: Allocate communication buffers on host (may be slower)" OFF)
option(PARTHENON_DISABLE_HDF5 "HDF5 is enabled by default if found, set this to True to disable HDF5" OFF)
option(PARTHENON_DISABLE_HDF5_COMPRESSION "HDF5 compression is enabled by default, set this to True to disable compression in HDF5 output/restart files" OFF)
option(PARTHENON_DISABLE_OPENPMD "OpenPMD is enabled by default if found, set this to ON to disable OpenPMD" ON)
option(PARTHENON_USE_SYSTEM_OPENPMD "OpenPMD API is downloaded and installed automatically by default. Set this to ON to find and use a version installed on the system." OFF)
Comment thread
pgrete marked this conversation as resolved.
option(PARTHENON_DISABLE_SPARSE "Sparse capability is enabled by default, set this to True to compile-time disable all sparse capability" OFF)
option(PARTHENON_ENABLE_ASCENT "Enable Ascent for in situ visualization and analysis" OFF)
option(PARTHENON_LINT_DEFAULT "Linting is turned off by default, use the \"lint\" target or set \
Expand Down Expand Up @@ -239,6 +241,51 @@ if (NOT PARTHENON_DISABLE_HDF5)
install(TARGETS HDF5_C EXPORT parthenonTargets)
endif()

set(PARTHENON_ENABLE_OPENPMD OFF)
if (NOT PARTHENON_DISABLE_OPENPMD)
if (PARTHENON_USE_SYSTEM_OPENPMD)
# we want to enforce the use of ADIOS2 with this backend
set(PARTHENON_OPENPMD_COMPONENTS "ADIOS2")
if (ENABLE_MPI)
list(APPEND PARTHENON_OPENPMD_COMPONENTS "MPI")
else()
list(APPEND PARTHENON_OPENPMD_COMPONENTS "NOMPI")
endif()
find_package(openPMD 0.16.1 CONFIG COMPONENTS ${PARTHENON_OPENPMD_COMPONENTS})
if (NOT openPMD_FOUND)
message(FATAL_ERROR "OpenPMD API requested to be used from the environment but it was "
"not found. Either append the path to the installed OpenPMD lib via the "
"openPMD_DIR or CMAKE_PREFIX_PATH, or use the version shipped with Parthenon by keeping "
"PARTHENON_USE_SYSTEM_OPENPMD=OFF")
endif()
else()
include(FetchContent)
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
set(openPMD_BUILD_CLI_TOOLS OFF)
set(openPMD_BUILD_EXAMPLES OFF)
set(openPMD_BUILD_TESTING OFF)
set(openPMD_BUILD_SHARED_LIBS OFF)
set(openPMD_INSTALL OFF)
set(openPMD_USE_ADIOS2 ON) # we definitely want ADIOS2
if( NOT Python3_Interpreter_FOUND)
find_package(Python3 REQUIRED COMPONENTS Interpreter)
endif()
# Why not build the python interface for easier testing when Python is available
if(Python3_Interpreter_FOUND)
set(openPMD_USE_PYTHON ON)
else()
set(openPMD_USE_PYTHON OFF)
endif()
FetchContent_Declare(openPMD
GIT_REPOSITORY "https://github.com/openPMD/openPMD-api.git"
GIT_TAG "0.17.0") # Release 0.17.0
FetchContent_MakeAvailable(openPMD)
install(TARGETS openPMD EXPORT parthenonTargets)
endif()

set(PARTHENON_ENABLE_OPENPMD ON)
endif()

# Kokkos recommendatation resulting in not using default GNU extensions
set(CMAKE_CXX_EXTENSIONS OFF)

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Parthenon -- a performance portable block-structured adaptive mesh refinement fr

* MPI
* OpenMP
* OpenPMD and ADIOS2 (for outputs)
* HDF5 (for outputs)
* Ascent (for in situ visualization and analysis)

Expand Down
9 changes: 7 additions & 2 deletions cmake/machinecfg/CI.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#========================================================================================
# Parthenon performance portable AMR framework
# Copyright(C) 2020 The Parthenon collaboration
# Copyright(C) 2020-2026 The Parthenon collaboration
# Licensed under the 3-clause BSD License, see LICENSE file for details
#========================================================================================
# (C) (or copyright) 2020. Triad National Security, LLC. All rights reserved.
Expand All @@ -25,7 +25,6 @@ set(NUM_MPI_PROC_TESTING "4" CACHE STRING "CI runs tests with 4 MPI ranks")
if (${MACHINE_VARIANT} MATCHES "cuda")
set(Kokkos_ARCH_AMPERE80 ON CACHE BOOL "GPU architecture")
set(Kokkos_ENABLE_CUDA ON CACHE BOOL "Enable Cuda")
set(CMAKE_CXX_COMPILER ${CMAKE_CURRENT_SOURCE_DIR}/external/Kokkos/bin/nvcc_wrapper CACHE STRING "Use nvcc_wrapper")
else()
set(CMAKE_CXX_FLAGS "-fopenmp-simd" CACHE STRING "Default opt flags")
endif()
Expand All @@ -34,7 +33,13 @@ if (${MACHINE_VARIANT} MATCHES "mpi")
# not using the following as the default is determined correctly
#set(TEST_MPIEXEC mpiexec CACHE STRING "Command to launch MPI applications")
set(HDF5_ROOT /usr/local/hdf5/parallel CACHE STRING "HDF5 path")
set(PARTHENON_USE_SYSTEM_OPENPMD ON CACHE BOOL "Use API in container")
else()
set(HDF5_ROOT /usr/local/hdf5/serial CACHE STRING "HDF5 path")
set(PARTHENON_DISABLE_MPI ON CACHE BOOL "Disable MPI")
# testing auto fetch and compile
set(PARTHENON_USE_SYSTEM_OPENPMD OFF CACHE BOOL "Use API in container")
endif()

set(PARTHENON_DISABLE_OPENPMD OFF CACHE BOOL "Always use OpenPMD build in CI env")

8 changes: 7 additions & 1 deletion cmake/machinecfg/GitHubActions.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#========================================================================================
# Parthenon performance portable AMR framework
# Copyright(C) 2021 The Parthenon collaboration
# Copyright(C) 2021-2026 The Parthenon collaboration
# Licensed under the 3-clause BSD License, see LICENSE file for details
#========================================================================================
# (C) (or copyright) 2021. Triad National Security, LLC. All rights reserved.
Expand Down Expand Up @@ -45,9 +45,15 @@ if (${MACHINE_VARIANT} MATCHES "mpi")
#set(TEST_MPIEXEC mpiexec CACHE STRING "Command to launch MPI applications")
list(APPEND TEST_MPIOPTS "--allow-run-as-root")
set(HDF5_ROOT /usr/local/hdf5/parallel CACHE STRING "HDF5 path")
set(PARTHENON_USE_SYSTEM_OPENPMD ON CACHE BOOL "Use API in container")

else()
set(HDF5_ROOT /usr/local/hdf5/serial CACHE STRING "HDF5 path")
set(PARTHENON_DISABLE_MPI ON CACHE BOOL "Disable MPI")
# testing auto fetch and compile
set(PARTHENON_USE_SYSTEM_OPENPMD OFF CACHE BOOL "Use API in container")
endif()

set(PARTHENON_DISABLE_OPENPMD OFF CACHE BOOL "Always use OpenPMD build in CI env")

set(CMAKE_CXX_FLAGS "${MACHINE_CXX_FLAGS}" CACHE STRING "Default flags for this config")
2 changes: 2 additions & 0 deletions doc/sphinx/src/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ General list of cmake options:
|| PARTHENON\_SINGLE\_PRECISION || OFF || Option || Enable single precision mode if requested |
|| PARTHENON\_DISABLE\_HDF5 || OFF || Option || HDF5 is enabled by default if found, set this to True to disable HDF5 |
|| PARTHENON\_DISABLE_HDF5\_COMPRESSION || OFF || Option || HDF5 compression is enabled by default, set this to True to disable compression in HDF5 output/restart files |
|| PARTHENON\_DISABLE\_OPENPMD || ON || Option || OpenPMD is disabled by default (to be changed in the future). Set this to `OFF` to enable OpenPMD |
|| PARTHENON\_USE\_SYSTEM\_OPENPMD || OFF || Option || OpenPMD by default is built along Parthenon. To use a system version (e.g., available as `module` set this to `ON`. |
|| PARTHENON\_ENABLE\_ASCENT || OFF || Option || Enable Ascent for in situ visualization and analysis |
|| PARTHENON\_DISABLE\_MPI || OFF || Option || MPI is enabled by default if found, set this to True to disable MPI |
|| PARTHENON\_ENABLE\_HOST\_COMM\_BUFFERS || OFF || Option || MPI communication buffers are by default allocated on the execution device. This options forces allocation in memory accessible directly by the host. |
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx/src/interface/state.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ several useful features and functions.
restart file and updated upon restart. In contrast, ``Mutable``
params not marked ``Restart`` are updated only by user code, not
automatically. Note that not all parameter types can be output to
HDF5 file. However, most common scalar, vector, and ``Kokkos`` view
restart files. However, most common scalar, vector, and ``Kokkos`` view
types are supported. Note also that if the value of a ``Param`` is
different on different MPI ranks, this will result in undefined
behaviour.
Expand Down
Loading
Loading