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.
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
Fix append mode double attributes #1302
Fix append mode double attributes #1302
Changes from 11 commits
39ed7be
98e2024
291d7f8
7a2adec
e878cfc
8b258b4
d5454df
4b56d1b
2bc1ac4
90194ad
013946e
03efb78
d63c7e7
1f890d2
ea0c3bb
e55df66
32f9fbb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Future refactoring: since this is an openPMD internal type trait, we should consider renaming this so it does not collide with the
MPI_....
prefix used as convention in the MPI C libraries for all its functions.Suggestions:
MPI_Types
->openPMD_MPI_Type
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.
Looking at this, I'm asking myself if this code is even correct. If an MPI application runs on a heterogeneous system with differing CPU architectures, there will be undefined behavior, no?
Maybe, we should just use the largest numeric type for those cases? Or is there a better way?
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 depends a bit and would require more work, but I think not in the location here.
The questions here is not really the CPU (micro) architecture but the data model: https://en.cppreference.com/w/cpp/language/types Essentially all modern systems you would put on an HPC system are
LP64
.If you would like to run with MPI on a system with heterogeneous hosts, you would have to compile your binaries for each of them and spawn them with MPI. That's the easy part, the hard part would be if someone ever implemented an MPI that would allow to communicate between LP64 and, let's say ILP32, or LP64 with big and little endian.
Either way, it would not change the local code in this location.
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 think we can actually simplify this by using
static constexpr MPI_Datatype const value = ...;
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.
We can probably even make this a simpler
constexpr
function now, which might also benefit compile time.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.
constexpr
will probably not work fully since the MPI datatypes are notconstexpr
in every implementation, but we can still replace the specialized class template withif constexpr
, yeah.Fair enough, thanks for clarifying!