-
Notifications
You must be signed in to change notification settings - Fork 51
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
HDF5: Delete and re-create attribute when overwriting with diff. type #1697
Merged
franzpoeschel
merged 3 commits into
openPMD:dev
from
franzpoeschel:fix-hdf5-overwrite-attribute-type
Dec 4, 2024
Merged
HDF5: Delete and re-create attribute when overwriting with diff. type #1697
franzpoeschel
merged 3 commits into
openPMD:dev
from
franzpoeschel:fix-hdf5-overwrite-attribute-type
Dec 4, 2024
Conversation
This file contains 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
franzpoeschel
force-pushed
the
fix-hdf5-overwrite-attribute-type
branch
from
November 19, 2024 17:05
6f937fb
to
f33f078
Compare
franzpoeschel
force-pushed
the
fix-hdf5-overwrite-attribute-type
branch
2 times, most recently
from
December 4, 2024 14:37
8dad8db
to
79f752d
Compare
franzpoeschel
commented
Dec 4, 2024
@@ -7522,6 +7522,8 @@ void groupbased_read_write(std::string const &ext) | |||
|
|||
E_x.setAttribute("updated_in_run", 0); | |||
E_y.setAttribute("updated_in_run", 0); | |||
E_y.setAttribute("changed_datatype_in_run", 0); | |||
write.close(); |
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.
.close()
calls added for stricter error check, the destructors will swallow exceptions.
Somehow truncation test is broken by this
franzpoeschel
force-pushed
the
fix-hdf5-overwrite-attribute-type
branch
from
December 4, 2024 16:33
79f752d
to
6ee8426
Compare
franzpoeschel
added a commit
to ax3l/openPMD-api
that referenced
this pull request
Dec 20, 2024
…openPMD#1697) * HDF5: Delete and re-create attribute when overwriting with diff. type * WIP: Change datatype in test Somehow truncation test is broken by this * Add forgotten H5Aclose() call
ax3l
added a commit
that referenced
this pull request
Jan 16, 2025
* Release: 0.16.1 Signed-off-by: Axel Huebl <axel.huebl@plasma.ninja> * Fix new_version.py * Update version in windows.yml * Reformat with yapf3 * Fix greedy Regex parsing * Changelog: Add PRs #1681 #1679 #1678 * Fix: CMake Internal Control (#1678) The `openPMD_USE_INTERNAL_*` options are for general internal/external control. They were accidentally overwritten by new tar flags and sometimes incomplete. Signed-off-by: Axel Huebl <axel.huebl@plasma.ninja> * Revert "CMake Tar: TOML11 3.7.1 (#1673)" (#1679) This reverts commit aea4b72. * Replace deprecated makeSuite with loadTestsFromTestCase (#1681) Removed with Python 3.13 * Doc: Fix Shipped Internally (#1682) Downloaded now. Signed-off-by: Axel Huebl <axel.huebl@plasma.ninja> * `PYBIND11_FINDPYTHON=ON` (#1684) Reuse our `find_package(Python ...)` call and use new CMake logic in pybind11. https://pybind11.readthedocs.io/en/stable/compiling.html#modules-with-cmake https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-version-selection Signed-off-by: Axel Huebl <axel.huebl@plasma.ninja> * Fix ICX build (#1690) Error was: /home/runner/work/openPMD-api/openPMD-api/include/openPMD/backend/Container.hpp:262:32: error: no member named 'm_container' in 'Container<T, T_key, T_container>' 262 | container().swap(other.m_container); * Fix Leftover ADIOS1 Mentions (#1683) * Fix Leftover ADIOS1 Mentions Signed-off-by: Axel Huebl <axel.huebl@plasma.ninja> * Remove ADIOS1 from examples --------- Signed-off-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Franz Pöschel <franz.poeschel@gmail.com> * Explicitly specify ADIOS2 components in openPMDConfig.cmake (#1693) * Explicitly specify ADIOS2 components in openPMDConfig.cmake When including openPMD in downstream CMake and that CMake script contains Fortran, ADIOS2 will automatically detect that. But since we do not reexport the ADIOS2 headers, we only need the components that openPMD explicitly uses: CXX and MPI. * Same in CMakeLists.txt * Remove mpirun_workaround.sh (#1698) Seems to no longer be necessary in the affected CI runs * Properly check for empty HDF5_VERSION in CMake (#1702) The old test apparently invoked some weird CMake legacy behavior. This should make the pinned HDF5 Conda version unnecessary (#1701) since the version with missing HDF5_VERSION is correctly dealt with. * HDF5: Delete and re-create attribute when overwriting with diff. type (#1697) * HDF5: Delete and re-create attribute when overwriting with diff. type * WIP: Change datatype in test Somehow truncation test is broken by this * Add forgotten H5Aclose() call * TOUCH IOTask: Avoid setting files as dirty in non-write modes (#1704) * Bugfix: Consider dirty upon touch() only in write modes * Add error check to avoid writing in read-only mode * Changelog * Use ULONG for particle patches * Upgrade appleclang14 build to MacOS 13 > The macOS-12 environment is deprecated, consider switching to macOS-13, macOS-14 (macos-latest) or macOS-15. For more details, see actions/runner-images#10721 * Update Changelog * Release Date --------- Signed-off-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Franz Pöschel <franz.poeschel@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Seen in a file that was originally create with
h5py
and the opened in R/W-mode with openPMD-api. Since h5py and openPMD-api apparently use different vec-string types, this leads to corrupted files.Since we do support attributes with multiple possible types, the type of an existing attribute should be checked before reuse.
TODO: