Skip to content

Commit 0299592

Browse files
authored
Merge pull request #260 from mulimoen/bugfix/issue_259
Only conditionally call H5Pset_evict_on_close
2 parents 8046bae + ba12781 commit 0299592

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ jobs:
273273
with: {submodules: true}
274274
- name: Install Rust
275275
uses: dtolnay/rust-toolchain@stable
276-
with: {toolchain: 1.64}
276+
with: {toolchain: "1.70"}
277277
- name: Build and test all crates
278278
run:
279279
cargo test --workspace -vv --features=hdf5-sys/static,hdf5-sys/zlib --exclude=hdf5-derive

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
### Changed
1717

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

3940
## 0.8.1
4041

hdf5/src/hl/plist/file_access.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -1440,8 +1440,13 @@ impl FileAccessBuilder {
14401440
v.min_raw_perc as _,
14411441
));
14421442
}
1443-
if let Some(v) = self.evict_on_close {
1444-
h5try!(H5Pset_evict_on_close(id, hbool_t::from(v)));
1443+
if let Some(evict) = self.evict_on_close {
1444+
// Issue #259: H5Pset_evict_on_close is not allowed to be called
1445+
// even if the argument is `false` on e.g. parallel/mpio setups
1446+
let has_evict_on_close = h5get!(H5Pget_evict_on_close(id): hbool_t).map(|x| x > 0);
1447+
if evict != has_evict_on_close.unwrap_or(false) {
1448+
h5try!(H5Pset_evict_on_close(id, hbool_t::from(evict)));
1449+
}
14451450
}
14461451
if let Some(v) = self.mdc_image_config {
14471452
let v = v.into();

0 commit comments

Comments
 (0)