-
Notifications
You must be signed in to change notification settings - Fork 355
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
added openPMD-api support for I/O #3666
base: development
Are you sure you want to change the base?
Conversation
} | ||
} | ||
|
||
AMReX_PtlCounter m_PtlCounter; |
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.
This would result in multiple definitions if this header is included in more than one translation units.
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.
This eventually is a member variable of class ParticleContainer_impl, as this file is included in "AMReX_ParticleContainer.H".
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.
Instead of plain text including this into another class, which will complicate our transition to C++ modules and is a bit surprising in general, consider making this a C++ mixin class:
https://en.wikipedia.org/wiki/Mixin
Simply derive ParticleContainer_impl
from this.
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.
The extra code in this file is a function that figures out ptl offsets for each processors. I think using mixin possibly will be an overkill, and clients need to change their code when initialing ParticleContainer_impl related classes.
Since this is only used by openPMD-api, I will move this function into the amex::openpmd_api scope. Leave the AMReX_ParticleContainer.H as is.
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.
I actually have more changes to fix various compiler warnings. Do you want me to post as comments or push to your branch?
ed4eb27
to
0bf1636
Compare
Just saw you pushed. Thanks. |
set default axis labels to be "x/y/z" for 1/2/3-Dims other behaviours should be done in application codes removed print statements
m_PtlCounter.m_MPISize = amrex::ParallelDescriptor::NProcs(); | ||
m_PtlCounter.m_MPIRank = amrex::ParallelDescriptor::MyProc(); |
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.
AMReX includes for ParallelDescriptor
, ParallelGather
, <vector>
missing in this file.
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.
This file is currently embedded in AMReX_ParticleContainer.H, which has all the included files declared already.
} | ||
} | ||
|
||
AMReX_PtlCounter m_PtlCounter; |
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.
Instead of plain text including this into another class, which will complicate our transition to C++ modules and is a bit surprising in general, consider making this a C++ mixin class:
https://en.wikipedia.org/wiki/Mixin
Simply derive ParticleContainer_impl
from this.
#ifdef AMREX_USE_OPENPMD_API | ||
#include "AMReX_ParticlesOPENPMD.H" | ||
#endif |
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.
I would prefer if this was used as a mixin class instead of a textual include.
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
remove commented code Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
reduce AMREX_USE_OPENPMD_API to AMREX_USE_OPENPMD Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
reduce AMReX_OPENPMD_API to AMReX_OPENPMD Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
AMREX_USE_OPENPMD instead of AMREX_USE_OPENPMD_API Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Use AMReX_OPENPMD instead of AMReX_OPENPMD_API Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
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.
I don't think this PR could break any existing codes. Since this is big PR and adds a new feature, I am okay with merging it now.
Summary
The goal of this pull request is to enable I/O support through the openPMD-api library
The proposed changes: