Skip to content

Commit 144e8b6

Browse files
jeanbezax3l
authored andcommitted
Include check for paged allocation (openPMD#1133)
* Include check for paged allocation * Update ParallelHDF5IOHandler.cpp
1 parent 8d580aa commit 144e8b6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/IO/HDF5/ParallelHDF5IOHandler.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ ParallelHDF5IOHandlerImpl::ParallelHDF5IOHandlerImpl(
6363
m_fileAccessProperty = H5Pcreate(H5P_FILE_ACCESS);
6464
m_fileCreateProperty = H5Pcreate(H5P_FILE_CREATE);
6565

66+
#if H5_VERSION_GE(1,10,1)
6667
auto const hdf5_spaced_allocation = auxiliary::getEnvString( "OPENPMD_HDF5_PAGED_ALLOCATION", "ON" );
6768
if( hdf5_spaced_allocation == "ON" ) {
6869
auto const strPageSize = auxiliary::getEnvString( "OPENPMD_HDF5_PAGED_ALLOCATION_SIZE", "33554432" );
@@ -73,6 +74,7 @@ ParallelHDF5IOHandlerImpl::ParallelHDF5IOHandlerImpl(
7374
H5Pset_file_space_strategy(m_fileCreateProperty, H5F_FSPACE_STRATEGY_PAGE, 0, (hsize_t)0);
7475
H5Pset_file_space_page_size(m_fileCreateProperty, page_size);
7576
}
77+
#endif
7678

7779
auto const hdf5_defer_metadata = auxiliary::getEnvString( "OPENPMD_HDF5_DEFER_METADATA", "ON" );
7880
if( hdf5_defer_metadata == "ON" ) {

0 commit comments

Comments
 (0)