Merge branch 'HDF5-1.10.x-fix' into 'development'
workaround for HDF5: https://forum.hdfgroup.org/t/6186 See merge request damask/DAMASK!378
This commit is contained in:
commit
38ca85b58f
|
@ -1775,7 +1775,7 @@ subroutine initialize_write(dset_id, filespace_id, memspace_id, plist_id, &
|
|||
|
||||
integer, dimension(worldsize) :: writeSize !< contribution of all processes
|
||||
integer(HID_T) :: dcpl
|
||||
integer :: ierr, hdferr
|
||||
integer :: ierr, hdferr, HDF5_major, HDF5_minor, HDF5_release
|
||||
integer(HSIZE_T), parameter :: chunkSize = 1024_HSIZE_T**2/8_HSIZE_T
|
||||
|
||||
!-------------------------------------------------------------------------------------------------
|
||||
|
@ -1808,6 +1808,9 @@ subroutine initialize_write(dset_id, filespace_id, memspace_id, plist_id, &
|
|||
call h5pcreate_f(H5P_DATASET_CREATE_F, dcpl, hdferr)
|
||||
if(hdferr < 0) error stop 'HDF5 error'
|
||||
if(product(totalShape) >= chunkSize*2_HSIZE_T) then
|
||||
call H5get_libversion_f(HDF5_major,HDF5_minor,HDF5_release,hdferr)
|
||||
if (hdferr < 0) error stop 'HDF5 error'
|
||||
if (HDF5_major == 1 .and. HDF5_minor >= 12) then ! https://forum.hdfgroup.org/t/6186
|
||||
call h5pset_chunk_f(dcpl, size(totalShape), getChunks(totalShape,chunkSize), hdferr)
|
||||
if (hdferr < 0) error stop 'HDF5 error'
|
||||
call h5pset_shuffle_f(dcpl, hdferr)
|
||||
|
@ -1817,6 +1820,7 @@ subroutine initialize_write(dset_id, filespace_id, memspace_id, plist_id, &
|
|||
call h5pset_Fletcher32_f(dcpl,hdferr)
|
||||
if (hdferr < 0) error stop 'HDF5 error'
|
||||
endif
|
||||
endif
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! create dataspace in memory (local shape) and in file (global shape)
|
||||
|
|
Loading…
Reference in New Issue