From 7418556773c74827478767d2a58c9220cf5900b3 Mon Sep 17 00:00:00 2001 From: arnav-singhal <43693924+arnav-singhal@users.noreply.github.com> Date: Fri, 28 Jun 2024 11:22:13 -0700 Subject: [PATCH] HDF5: Correctly handle writing only some components when writing Particle (#4005) ## Summary Correctly names file attribute to match component index with dataset index and correctly calculates size of each particle's data so that the dataset is aligned. ## Additional background Previously, all components of a particle were being counted, whether written or not, leading to misalignment across different processes when writing. ## Checklist The proposed changes: - [x] fix a bug or incorrect behavior in AMReX - [ ] add new capabilities to AMReX - [ ] changes answers in the test suite to more than roundoff level - [ ] are likely to significantly affect the results of downstream AMReX users - [ ] include documentation in the code and/or rst files, if appropriate --- Src/Extern/HDF5/AMReX_ParticleHDF5.H | 17 +++++++++++++++-- .../HDF5/AMReX_WriteBinaryParticleDataHDF5.H | 11 +++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/Src/Extern/HDF5/AMReX_ParticleHDF5.H b/Src/Extern/HDF5/AMReX_ParticleHDF5.H index 398b84f7607..00fdf0c14be 100644 --- a/Src/Extern/HDF5/AMReX_ParticleHDF5.H +++ b/Src/Extern/HDF5/AMReX_ParticleHDF5.H @@ -705,19 +705,32 @@ ParticleContainer_impl