Skip to content

Commit

Permalink
Guard functionality introduced in 1.10.0. (#905)
Browse files Browse the repository at this point in the history
  • Loading branch information
1uc committed Dec 21, 2023
1 parent 7638232 commit 04ae650
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions include/highfive/H5PropertyList.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ class MPIOFileAccess {
MPI_Info _info;
};


#if H5_VERSION_GE(1, 10, 0)
///
/// \brief Use collective MPI-IO for metadata read and write.
///
Expand Down Expand Up @@ -306,6 +308,7 @@ class MPIOCollectiveMetadataWrite {
bool collective_;
};

#endif
#endif

///
Expand Down
2 changes: 2 additions & 0 deletions include/highfive/bits/H5PropertyList_misc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ inline void MPIOFileAccess::apply(const hid_t list) const {
detail::h5p_set_fapl_mpio(list, _comm, _info);
}

#if H5_VERSION_GE(1, 10, 0)
inline void MPIOCollectiveMetadata::apply(const hid_t plist) const {
auto read = MPIOCollectiveMetadataRead{collective_read_};
auto write = MPIOCollectiveMetadataWrite{collective_write_};
Expand Down Expand Up @@ -224,6 +225,7 @@ inline MPIOCollectiveMetadataWrite::MPIOCollectiveMetadataWrite(bool collective)
: collective_(collective) {}

#endif
#endif

inline FileVersionBounds::FileVersionBounds(H5F_libver_t low, H5F_libver_t high)
: _low(low)
Expand Down
3 changes: 2 additions & 1 deletion include/highfive/bits/h5p_wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ inline herr_t h5p_set_fapl_mpio(hid_t fapl_id, MPI_Comm comm, MPI_Info info) {
return err;
}

#if H5_VERSION_GE(1, 10, 0)
inline herr_t h5p_set_all_coll_metadata_ops(hid_t plist_id, hbool_t is_collective) {
herr_t err = H5Pset_all_coll_metadata_ops(plist_id, is_collective);
if (err < 0) {
Expand Down Expand Up @@ -132,7 +133,7 @@ inline herr_t h5p_get_coll_metadata_write(hid_t plist_id, hbool_t* is_collective

return err;
}

#endif
#endif

inline herr_t h5p_get_libver_bounds(hid_t plist_id, H5F_libver_t* low, H5F_libver_t* high) {
Expand Down

0 comments on commit 04ae650

Please sign in to comment.