Skip to content

Commit

Permalink
Merge pull request #260 from mulimoen/bugfix/issue_259
Browse files Browse the repository at this point in the history
Only conditionally call H5Pset_evict_on_close
  • Loading branch information
aldanor authored Jan 30, 2024
2 parents 8046bae + ba12781 commit 0299592
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ jobs:
with: {submodules: true}
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with: {toolchain: 1.64}
with: {toolchain: "1.70"}
- name: Build and test all crates
run:
cargo test --workspace -vv --features=hdf5-sys/static,hdf5-sys/zlib --exclude=hdf5-derive
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
### Changed

- The `H5Type` derive macro now uses `proc-macro-error` to emit error messages.
- MSRV is now `1.64.0` and Rust edition has now been bumped to 2021.
- MSRV is now `1.70.0` and Rust edition has now been bumped to 2021.
- Types in ChunkInfo has been changed to match HDF5.
- Dependencies now uses the `dep:` syntax and are only enabled through features.
- Some features are made weak and will not enable e.g. static build when asking for a
Expand All @@ -35,6 +35,7 @@
- Applying filters without chunking will now produce an explicit error.
- Fixed a bug where chunking could not be enabled for zero-sized extents.
- Fixed library finding on Windows with MSYS2-distributed MinGW HDF5.
- Fixed a bug which made parallel builds unusable.

## 0.8.1

Expand Down
9 changes: 7 additions & 2 deletions hdf5/src/hl/plist/file_access.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1440,8 +1440,13 @@ impl FileAccessBuilder {
v.min_raw_perc as _,
));
}
if let Some(v) = self.evict_on_close {
h5try!(H5Pset_evict_on_close(id, hbool_t::from(v)));
if let Some(evict) = self.evict_on_close {
// Issue #259: H5Pset_evict_on_close is not allowed to be called
// even if the argument is `false` on e.g. parallel/mpio setups
let has_evict_on_close = h5get!(H5Pget_evict_on_close(id): hbool_t).map(|x| x > 0);
if evict != has_evict_on_close.unwrap_or(false) {
h5try!(H5Pset_evict_on_close(id, hbool_t::from(evict)));
}
}
if let Some(v) = self.mdc_image_config {
let v = v.into();
Expand Down

0 comments on commit 0299592

Please sign in to comment.