Skip to content
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

ADIOS2: Optionally write attributes only from given ranks #1542

Merged
merged 4 commits into from
Dec 5, 2023

Conversation

franzpoeschel
Copy link
Contributor

@franzpoeschel franzpoeschel commented Oct 19, 2023

Performance optimization especially for large scale
Ref.
ornladios/ADIOS2#3846 (comment)

TODO:

  • Documentation
  • Is this relevant for HDF5 too?

@franzpoeschel franzpoeschel force-pushed the adios2-optimize-parallel-attributes branch from bd0e908 to 064cacd Compare November 20, 2023 15:50
@ax3l ax3l self-requested a review November 21, 2023 18:47
@ax3l ax3l self-assigned this Nov 21, 2023
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
@ax3l
Copy link
Member

ax3l commented Dec 5, 2023

@eschnett thinking about portable code that also supports HDF5, would this interrupt you if we enabled this by default (in a follow-up PR)? 😅

@ax3l ax3l enabled auto-merge (squash) December 5, 2023 19:01
@eschnett
Copy link
Contributor

eschnett commented Dec 5, 2023

@ax3l I don't understand the ramifications. On the surface this all seems benign and beneficial.

@franzpoeschel
Copy link
Contributor Author

@eschnett The possible pitfall is that this would by default ignore any attribute that is not written on rank 0.
Background:

  • attribute writes in HDF5 are collective
  • attribute writes in ADIOS2 are non-collective, and defining them only on one rank is more performant than doing it collectively

In consequence: Portable code using the openPMD-api should treat attribute writes as something collective. If attributes are written collectively, there's no harm in ADIOS2 to ignore any attribute write except for those on rank 0. This is why we're thinking about enabling this by default.

If for some reason you have routines that create some data only on a few select ranks, this could lead to problems.

@ax3l ax3l merged commit 4de431c into openPMD:dev Dec 5, 2023
27 of 28 checks passed
@franzpoeschel
Copy link
Contributor Author

@ax3l If we decide to activate this by default, we should maybe add some easy way to activate attribute writing from all ranks. Currently, attribute_writing_ranks is a list of ranks that opt into writing attributes. Something like attribute_writing_ranks = "all" might then be needed to restore the current behavior.

@eschnett
Copy link
Contributor

eschnett commented Dec 6, 2023

Thanks for the explanation.

I was not aware that openPMD treated attribute writes as global. This will be good to know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants