-
Notifications
You must be signed in to change notification settings - Fork 40
Add OpenPMD support #1050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pgrete
wants to merge
162
commits into
develop
Choose a base branch
from
pgrete/pmd-output
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add OpenPMD support #1050
Changes from all commits
Commits
Show all changes
162 commits
Select commit
Hold shift + click to select a range
49027c7
Add OpenPMD as external lib
pgrete 4525e86
Add OpenPMD skeleto
pgrete 4de250c
WIP more Open PMD
pgrete b906af7
WIP OpenPMD use file id
pgrete 108fc7a
Merge branch 'develop' into pgrete/pmd-output
pgrete 79660a2
Write blocks
pgrete 372b585
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete 8d40c91
Centralize getting var info for output
pgrete 4f20c26
WIP openpmd, chunks don't work yet plus check dimensionality
pgrete 4dde705
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete f29e8d1
Fix chunk extents
pgrete a501a5d
Write Attributes
pgrete c0be75c
Rename restart to restart_hdf5
pgrete 7f03528
WIP abstract RestartReader
pgrete 56795f2
WIP separating RestartReader
pgrete 8587303
Make RestartReader abstract
pgrete 8bf955b
Merge branch 'pgrete/refactor-restart' into pgrete/pmd-output
pgrete e3ea8d7
Add OpenPMD restart skeleton
pgrete 33b6261
WIP updating loc logic
pgrete 788118c
Merge branch 'develop' into pgrete/pmd-output
pgrete 62e54da
Fix interface from recent changes in develop
pgrete 6309663
Read and Write loc
pgrete 7224f42
Houston, we have a build
pgrete ae1f241
Added OpenPMD restart ReadBlocks
pgrete 19863d7
Fix loc level
pgrete e2b2bd1
Make Series persistent and fix rootlevel typo
pgrete f9373e8
WIP Read/Write Params
pgrete 96a3f4c
Make ReadParams private member
pgrete 61306a0
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete 56976a8
Fix root level in output
pgrete 6199843
Move to mesh per record standard for writing
pgrete 9fb9f68
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete 684b7ab
Allow for 2D and 3D output. Fix single dataset reset.
pgrete 251c6ea
Fix logical loc
pgrete 03f80c7
Rename opmd files
pgrete 890fffe
Separate common calls to chunks and names
pgrete 04359d3
Reuse shared chunk and name for restarts
pgrete 2b89659
Add regression test
pgrete 804e60d
Somewhat make restarts working
pgrete a436f55
Fix order of arguments for correct flush
pgrete 6a3a80d
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete 28d725d
Fix handling of output variable names
pgrete a039ea1
Fix reading chunks for sparsely populated output files
pgrete ae8519f
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete 7476641
Dont tell anyone I spent days on this...
pgrete 39d4b99
Temp disable dumping Views from device
pgrete d2ba882
Merge branch 'develop' into pgrete/pmd-output
pgrete 626303d
Merge branch 'pgrete/fix-hasghost-restart' into pgrete/pmd-output
pgrete 4241198
Dump deref cnt in opmd restart
pgrete 101ebf2
Merge branch 'develop' into pgrete/pmd-output
BenWibking 60a38b2
install openpmd in macOS CI
BenWibking 461eeaa
Merge branch 'develop' into pgrete/pmd-output
BenWibking cd007d3
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete 28020db
Remove extraneous popRegion
pgrete 5324e00
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete af4b966
Fix formatting
pgrete 0e015d1
Make format clang16 compatible
pgrete 5135aea
Fix default backend_config parsing
pgrete b344291
another attempt
pgrete 7486915
Bump OpenPMD version
pgrete 0e3f758
pmd: Write scalar particle data
pgrete e39ef61
Code dedup
pgrete b938511
Allow writing non-scalar particles
pgrete 08d6b41
Make positions standard compliant
pgrete bf74c7e
Allow for particles restarts (serial works)
pgrete 3b37c26
Support particle restarts in parallel
pgrete 0ca5b6f
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete b30788a
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete 5f95466
Add now prefix to pmd outputs
pgrete 6811594
Make linter happy
pgrete c0d7f11
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete b2d7525
Bump OPMD version and add delim
pgrete f229274
Merge branch 'develop' into pgrete/pmd-output
pgrete 3283635
Change delim. Is this stupid?
pgrete d59d573
Merge branch 'develop' into pgrete/pmd-output
pgrete 3f95fc4
Make params IO test more flexible
pgrete 1141ff3
Add test case for opmd params IO
pgrete e6e4d0b
Reading/writing non-ParArray Params works
pgrete 8230f94
Allow writing ParArray and Views to Params
pgrete e64ae7e
Read ParArray/View from opmd raw
pgrete b789711
Make basic parsing of Params work
pgrete 466ecd2
Restore view from opmd params
pgrete 3aa4c78
Fix manual pararray reading
pgrete 4c1c70f
Make linter happy?
pgrete 8a1850b
Make restoring HostViews possible
pgrete 1f02ffa
Make reading host arrays work using the direct interface in the unit …
pgrete d6565c5
Expands types for read/write to all vec
pgrete 6065213
Remove debug info
pgrete 4bf6a92
Merge branch 'develop' into pgrete/pmd-output
BenWibking e67f589
Merge branch 'develop' into pgrete/pmd-output
pgrete 503a5b6
Fix bc interface from PR 1177
pgrete d064f03
Merge branch 'develop' into pgrete/pmd-output
BenWibking dfbcb27
Merge branch 'develop' into pgrete/pmd-output
pgrete 4769a63
Fix output numbering for triggered opmd outputs
pgrete 543dbf9
Make formatter happy
pgrete 449cd5e
Bump opmd to 0.16.1 stable version (not requiring work around any more)
pgrete 7f813c0
AMR restarts work and are bitwise identical now
pgrete 3689e6c
Cross test opmd and rst outputs
pgrete 2db2db7
Merge branch 'develop' into pgrete/pmd-output
pgrete aea0519
Fix merge issues
pgrete 57b719a
Fix compile issue with std::string dtor of vectypes
pgrete 9bed0ce
Allow embedded and system opmd build w and wo MPI
pgrete 9ae2fde
Try opmd build in CI
pgrete 0ac42c6
Provide path to openpmd_api
pgrete d230db9
Update CI containers to be used
pgrete 41c94c5
Disable read/write of string views (not supported by Kokkos)
pgrete 642e23d
Add comments
pgrete 8e089bb
Add opmd dump/load of new uint64 ids
pgrete 1b8b904
Add opmd write support for all field types
pgrete a1768b0
Fix 2D offsets
pgrete 69fc044
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete 3d48016
First stab at opmd restart for non-CC fields
pgrete 2a0cde8
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete 301f25b
First attempt at adding/restoring opmd sparseinfo
pgrete 0d5d4d3
Fix misplaced comma
pgrete 207d24b
Add missing int8_t to mpi type map
pgrete 4fe5d63
Only write SparseInfo when sparse fields are present
pgrete 762a9ce
Fix interfaces
pgrete be68203
Fix doc build
pgrete 5ce4304
Add mutability maybe restart and made it so we can read old restart f…
jonahm-LANL ce7ef95
Just warn for default restart Params
pgrete 80e3ef7
Update restart logic. Fixes #1235
pgrete f133962
Only warn about default non-input params
pgrete fbfd356
Ensure last output is not in the future
pgrete c7f8ab5
remove pmesh->is_restart for Globals
pgrete dd94417
Allow writing legacy id fields for particles
pgrete 9d90214
Allow empty restart swarms
pgrete 1988ed2
Unify missing var handling
pgrete 38b1ec5
Add reminder todo to params
pgrete b3849d4
Add Changelog
pgrete 51f45b7
change check orphans to default to false for restarts
jonahm-LANL dcc025d
more careful logic
jonahm-LANL 04f0cab
oops added an if
jonahm-LANL 3ab5353
ok try this
jonahm-LANL 11a9884
Fix removing first elemn in linked list
pgrete 43fcf78
Add missing guards
pgrete be19c0a
Merge branch 'pgrete/backwards-comapt-restarts-v2' into pgrete/pmd-ou…
pgrete fcc4a5b
Fix interface
pgrete 72412bd
Check pin for opmd out and check vars skel
pgrete 73e445f
Add option for single prec output in openpmd
pgrete d6936ae
Allow coarsened opmd outputs
pgrete 4924929
Merge branch 'develop' into pgrete/pmd-output
pgrete cb8997b
Fix logic causing issues for restarts with varying output blocks
pgrete fa25d69
Fix formatting and test case
pgrete 4f8249e
Merge branch 'pgrete/fix-output-block-restarts' into pgrete/pmd-output
pgrete 6787b42
Fix/cleanup include logic and move format ver to impl
pgrete 0a5df77
Add missing try-catch for opmd params
pgrete 3edc7af
Fix opmd params try catch
pgrete 7cc4040
Add final logic to opmd
pgrete e671e67
WIP slices
pgrete 6ab9d02
Logic for slices seems to work. Data not.
pgrete 6cd7c39
Fix final logic
pgrete 56081fe
Fix slices
pgrete dc60f00
Merge remote-tracking branch 'origin/develop' into pgrete/pmd-output
pgrete 3267252
Merge branch 'develop' into pgrete/pmd-output
pgrete 505cdb4
Fix regression test
pgrete c657226
merge
BenWibking 39c2a9a
fix style
BenWibking dcd576c
Merge branch 'develop' into pgrete/pmd-output
pgrete beeacba
Impl VariableExists for OpenPMD
pgrete 00d9476
Format
pgrete 4d33816
Merge branch 'develop' into pgrete/pmd-output
pgrete File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| //======================================================================================== | ||
| // Parthenon performance portable AMR framework | ||
| // Copyright(C) 2023-2024 The Parthenon collaboration | ||
| // Licensed under the 3-clause BSD License, see LICENSE file for details | ||
| //======================================================================================== | ||
| // (C) (or copyright) 2020-2024. Triad National Security, LLC. All rights reserved. | ||
| // | ||
| // This program was produced under U.S. Government contract 89233218CNA000001 for Los | ||
| // Alamos National Laboratory (LANL), which is operated by Triad National Security, LLC | ||
| // for the U.S. Department of Energy/National Nuclear Security Administration. All rights | ||
| // in the program are reserved by Triad National Security, LLC, and the U.S. Department | ||
| // of Energy/National Nuclear Security Administration. The Government is granted for | ||
| // itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide | ||
| // license in this material to reproduce, prepare derivative works, distribute copies to | ||
| // the public, perform publicly and display publicly, and to permit others to do so. | ||
| //======================================================================================== | ||
|
|
||
| #ifndef OUTPUTS_OUTPUT_ATTR_HPP_ | ||
| #define OUTPUTS_OUTPUT_ATTR_HPP_ | ||
|
|
||
| #include <vector> | ||
|
|
||
| // JMM: This could probably be done with template magic but I think | ||
| // using a macro is honestly the simplest and cleanest solution here. | ||
| // Template solution would be to define a variatic class to conain the | ||
| // list of types and then a hierarchy of structs/functions to turn | ||
| // that into function calls. Preprocessor seems easier, given we're | ||
| // not manipulating this list in any way. | ||
| // The following types are the ones we allow to be stored as attributes in outputs | ||
| // (specifically within Params). | ||
| #define PARTHENON_ATTR_VALID_VEC_TYPES(T) \ | ||
| T, std::vector<T>, ParArray1D<T>, ParArray2D<T>, ParArray3D<T>, HostArray1D<T>, \ | ||
| HostArray2D<T>, HostArray3D<T>, Kokkos::View<T *>, Kokkos::View<T **>, \ | ||
| ParArrayND<T>, ParArrayHost<T> | ||
| // JMM: This is the list of template specializations we | ||
| // "pre-instantiate" We only pre-instantiate device memory, not host | ||
| // memory. The reason is that when building with the Kokkos serial | ||
| // backend, DevMemSpace and HostMemSpace are the same and so this | ||
| // resolves to the same type in the macro, which causes problems. | ||
| #define PARTHENON_ATTR_FOREACH_VECTOR_TYPE(T) \ | ||
| PARTHENON_ATTR_APPLY(T); \ | ||
| PARTHENON_ATTR_APPLY(Kokkos::View<T *, LayoutWrapper, DevMemSpace>); \ | ||
| PARTHENON_ATTR_APPLY(Kokkos::View<T **, LayoutWrapper, DevMemSpace>); \ | ||
| PARTHENON_ATTR_APPLY(Kokkos::View<T ***, LayoutWrapper, DevMemSpace>); \ | ||
| PARTHENON_ATTR_APPLY(device_view_t<T>) | ||
|
|
||
| #endif // OUTPUTS_OUTPUT_ATTR_HPP_ |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍