diff --git a/CMakeLists.txt b/CMakeLists.txt index a113342d..929b1c6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ if(NOT CMAKE_BUILD_TYPE) endif() project(h5fortran LANGUAGES C Fortran - VERSION 2.8.1 + VERSION 2.8.2 DESCRIPTION "thin, light, easy HDF5 Fortran interface" HOMEPAGE_URL https://github.com/scivision/h5fortran) enable_testing() diff --git a/cmake/hdf5.cmake b/cmake/hdf5.cmake index 23876bc9..31210a9e 100644 --- a/cmake/hdf5.cmake +++ b/cmake/hdf5.cmake @@ -5,14 +5,6 @@ set(HDF5_USE_STATIC_LIBRARIES true) if(WIN32 AND CMAKE_Fortran_COMPILER_ID STREQUAL Intel) set(HDF5_NO_FIND_PACKAGE_CONFIG_FILE true) set(HDF5_USE_STATIC_LIBRARIES false) - - if(NOT HDF5_ROOT) - # help CMake find binary HDF5 - file(GLOB _h5guess "c:/Program Files/HDF_Group/HDF5/1.1*/") - if(EXISTS ${_h5guess}) - set(HDF5_ROOT ${_h5guess}) - endif() - endif() endif() find_package(HDF5 COMPONENTS Fortran HL) diff --git a/meson.build b/meson.build index 6b889cba..8827f3ea 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('h5fortran', 'fortran', meson_version : '>=0.52.0', - version : '2.8.1', + version : '2.8.2', default_options : ['default_library=static', 'buildtype=release', 'warning_level=3']) subdir('meson') diff --git a/src/write.f90 b/src/write.f90 index 19ad6750..d6e9bbfd 100644 --- a/src/write.f90 +++ b/src/write.f90 @@ -3,7 +3,7 @@ use hdf5, only: & h5screate_f, H5S_SCALAR_F, & h5dcreate_f, & -h5pset_chunk_f, h5pset_deflate_f, h5pset_shuffle_f, h5pcreate_f, H5P_DATASET_CREATE_F, h5pclose_f, & +h5pset_chunk_f, h5pset_deflate_f, h5pset_shuffle_f, h5pset_fletcher32_f, h5pcreate_f, H5P_DATASET_CREATE_F, h5pclose_f, & h5gopen_f, h5gclose_f use H5LT, only: h5ltpath_valid_f, h5ltset_attribute_string_f, h5ltmake_dataset_string_f @@ -125,6 +125,9 @@ subroutine hdf_set_deflate(self, dims, pid, ierr, chunk_size) call h5pset_shuffle_f(pid, ierr) if (check(ierr, 'ERROR: enable Shuffle ' // self%filename)) return +call h5pset_fletcher32_f(pid, ierr) +if (check(ierr, 'ERROR: enable Fletcher32 checksum ' // self%filename)) return + call h5pset_deflate_f(pid, self%comp_lvl, ierr) if (check(ierr, 'ERROR: enable Deflate compression ' // self%filename)) return @@ -158,7 +161,8 @@ subroutine guess_chunk_size(dims, chunk_size) dset_size = product(chunk_size) * TYPESIZE target_size = int(CHUNK_BASE * (2**log10(real(dset_size) / 1e6)), hsize_t) if (target_size > CHUNK_MAX) target_size = CHUNK_MAX -print *,'target_size [bytes]: ',target_size + +! print *,'target_size [bytes]: ',target_size i = 0 do