avoid errors for empty datasets
empty dataset cannot be chunked, but filters can only be applied to chunked datasets
This commit is contained in:
parent
1963343cd8
commit
497bf2c645
|
@ -1970,6 +1970,7 @@ 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) > 0) then
|
||||
call h5pset_shuffle_f(dcpl, hdferr)
|
||||
if (hdferr < 0) error stop 'HDF5 error'
|
||||
call h5pset_Fletcher32_f(dcpl,hdferr)
|
||||
|
@ -1983,6 +1984,7 @@ subroutine initialize_write(dset_id, filespace_id, memspace_id, plist_id, &
|
|||
call h5pset_chunk_f(dcpl, size(totalShape), totalShape, hdferr)
|
||||
endif
|
||||
if (hdferr < 0) error stop 'HDF5 error'
|
||||
endif
|
||||
|
||||
!--------------------------------------------------------------------------------------------------
|
||||
! create dataspace in memory (local shape) and in file (global shape)
|
||||
|
|
Loading…
Reference in New Issue