Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge compression changes from develop #5260

Merged
merged 4 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
[codespell]
skip = .git,*.svg,.codespellrc,./bin/trace,./hl/tools/h5watch/h5watch.c,./tools/test/h5jam/tellub.c,./config/sanitizer/LICENSE,./config/sanitizer/sanitizers.cmake,./tools/test/h5import/testfiles/*.conf,./tools/test/h5repack/testfiles/*.dat,./test/API/driver,./configure,./bin/ltmain.sh,./bin/depcomp,./bin/config.guess,./bin/config.sub,./autom4te.cache,./m4/libtool.m4,./c++/src/*.html,./HDF5Examples/depcomp, ./release_docs/HISTORY-*.txt
skip = .git,*.svg,.codespellrc,./bin/trace,./hl/tools/h5watch/h5watch.c,./tools/test/h5jam/tellub.c,./config/sanitizer/LICENSE,./config/sanitizer/sanitizers.cmake,./tools/test/h5import/testfiles/*.conf,./tools/test/h5repack/testfiles/*.dat,./test/API/driver,./configure,./bin/ltmain.sh,./bin/depcomp,./bin/config.guess,./bin/config.sub,./autom4te.cache,./m4/libtool.m4,./c++/src/*.html,./HDF5Examples/depcomp,./release_docs/HISTORY-*.txt
check-hidden = true
# ignore-regex =
ignore-words-list = ot,isnt,inout,nd,parms,parm,ba,offsetP,ser,ois,had,fiter,fo,clude,refere,minnum,offsetp,creat,ans:,eiter,lastr,ans,isn't,ifset,sur,trun,dne,tthe,hda,filname,te,htmp,ake,gord,numer,ro,oce,msdos,TEXTIN,indx
8 changes: 4 additions & 4 deletions .github/workflows/cmake-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
set (CTEST_DROP_SITE_INIT "my.cdash.org")
# Change following line to submit to your CDash dashboard to a different CDash project
set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}")
#set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (LOCAL_COVERAGE_TEST "TRUE")
set (LOCAL_USE_GCOV "TRUE")
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} --log-level=VERBOSE")
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
set (CTEST_DROP_SITE_INIT "my.cdash.org")
# Change following line to submit to your CDash dashboard to a different CDash project
set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}")
#set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} --log-level=VERBOSE")
set (MODEL "Sanitize")
set (GROUP "Sanitize")
Expand Down Expand Up @@ -284,7 +284,7 @@ jobs:
set (CTEST_DROP_SITE_INIT "my.cdash.org")
# Change following line to submit to your CDash dashboard to a different CDash project
set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}")
#set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} --log-level=VERBOSE")
set (MODEL "Sanitize")
set (GROUP "Sanitize")
Expand Down Expand Up @@ -385,7 +385,7 @@ jobs:
set (CTEST_DROP_SITE_INIT "my.cdash.org")
# Change following line to submit to your CDash dashboard to a different CDash project
set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}")
#set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} --log-level=VERBOSE")
set (MODEL "Sanitize")
set (GROUP "Sanitize")
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cmake-par-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
contents: |
set (CTEST_DROP_SITE_INIT "my.cdash.org")
# Change following line to submit to your CDash dashboard to a different CDash project
#set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}")
set (ctest_test_args INCLUDE MPI_TEST)
set (CTEST_TEST_TIMEOUT 300 CACHE STRING "Maximum test time allowed.")
Expand Down Expand Up @@ -227,7 +227,7 @@ jobs:
contents: |
set (CTEST_DROP_SITE_INIT "my.cdash.org")
# Change following line to submit to your CDash dashboard to a different CDash project
#set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}")
set (ctest_test_args INCLUDE MPI_TEST)
set (CTEST_TEST_TIMEOUT 600 CACHE STRING "Maximum test time allowed.")
Expand Down Expand Up @@ -337,7 +337,7 @@ jobs:
contents: |
set (CTEST_DROP_SITE_INIT "my.cdash.org")
# Change following line to submit to your CDash dashboard to a different CDash project
#set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}")
set (ctest_test_args INCLUDE MPI_TEST)
set (CTEST_TEST_TIMEOUT 600 CACHE STRING "Maximum test time allowed.")
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cmake-par-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
contents: |
set (CTEST_DROP_SITE_INIT "my.cdash.org")
# Change following line to submit to your CDash dashboard to a different CDash project
#set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}")
set (ctest_test_args INCLUDE MPI_TEST)
set (MODEL "MPI")
Expand Down Expand Up @@ -233,7 +233,7 @@ jobs:
contents: |
set (CTEST_DROP_SITE_INIT "my.cdash.org")
# Change following line to submit to your CDash dashboard to a different CDash project
#set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}")
set (ctest_test_args INCLUDE MPI_TEST)
set (MODEL "MPI")
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/cmake-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
contents: |
set (CTEST_DROP_SITE_INIT "my.cdash.org")
# Change following line to submit to your CDash dashboard to a different CDash project
#set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (MODEL "GHDaily")
set (GROUP "GHDaily")
set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}")
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
contents: |
set (CTEST_DROP_SITE_INIT "my.cdash.org")
# Change following line to submit to your CDash dashboard to a different CDash project
#set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (MODEL "GHDaily")
set (GROUP "GHDaily")
set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}")
Expand Down Expand Up @@ -297,7 +297,7 @@ jobs:
contents: |
set (CTEST_DROP_SITE_INIT "my.cdash.org")
# Change following line to submit to your CDash dashboard to a different CDash project
#set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}")
set (MODEL "GHDaily")
set (GROUP "GHDaily")
Expand Down Expand Up @@ -386,7 +386,7 @@ jobs:
contents: |
set (CTEST_DROP_SITE_INIT "my.cdash.org")
# Change following line to submit to your CDash dashboard to a different CDash project
#set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}")
set (MODEL "GHDaily")
set (GROUP "GHDaily")
Expand Down Expand Up @@ -489,7 +489,7 @@ jobs:
contents: |
set (CTEST_DROP_SITE_INIT "my.cdash.org")
# Change following line to submit to your CDash dashboard to a different CDash project
#set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
#set (CMAKE_GENERATOR_TOOLSET "Intel C++ Compiler 2024,fortran=ifx")
set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}")
set (MODEL "GHDaily")
Expand Down Expand Up @@ -588,7 +588,7 @@ jobs:
contents: |
set (CTEST_DROP_SITE_INIT "my.cdash.org")
# Change following line to submit to your CDash dashboard to a different CDash project
#set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}")
set (MODEL "GHDaily")
set (GROUP "GHDaily")
Expand Down Expand Up @@ -695,7 +695,7 @@ jobs:
set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}")
set (MODEL "GHDaily")
set (GROUP "GHDaily")
#set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} --log-level=VERBOSE")
#set (CMAKE_GENERATOR_TOOLSET "clang")
#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DCMAKE_TOOLCHAIN_FILE:STRING=config/toolchain/clang.cmake")
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cygwin-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
contents: |
set (CTEST_DROP_SITE_INIT "my.cdash.org")
# Change following line to submit to your CDash dashboard to a different CDash project
#set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (CTEST_DROP_LOCATION_INIT "/submit.php?project=HDF5")
set (MODEL "GHDaily")
set (GROUP "GHDaily")
set (SITE_BUILDNAME_SUFFIX "${{ steps.set-file-base.outputs.FILE_BASE }}")
Expand Down
57 changes: 40 additions & 17 deletions CMakeFilters.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ option (HDF5_USE_ZLIB_STATIC "Find static zlib library" OFF)
option (HDF5_USE_LIBAEC_STATIC "Find static AEC library" OFF)
option (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" OFF)
option (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" OFF)
option (ZLIB_USE_LOCALCONTENT "Use local file for ZLIB FetchContent" OFF)
option (LIBAEC_USE_LOCALCONTENT "Use local file for LIBAEC FetchContent" OFF)

if (NOT ZLIB_USE_LOCALCONTENT)
if (HDF5_USE_ZLIB_NG)
Expand Down Expand Up @@ -77,6 +79,12 @@ endif ()
# Option for ZLib support
#-----------------------------------------------------------------------------
set(H5_ZLIB_FOUND FALSE)
if(NOT DEFINED ZLIB_PACKAGE_NAME)
set(ZLIB_PACKAGE_NAME "zlib")
endif ()
if(NOT DEFINED ZLIBNG_PACKAGE_NAME)
set(ZLIBNG_PACKAGE_NAME "zlib-ng")
endif ()
option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" ON)
if (HDF5_ENABLE_Z_LIB_SUPPORT)
if (NOT H5_ZLIB_HEADER)
Expand All @@ -88,11 +96,12 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
endif ()
set(ZLIB_FOUND FALSE)
if (HDF5_USE_ZLIB_STATIC)
set(ZLIB_SEACH_TYPE static)
set(ZLIB_SEARCH_TYPE static)
else ()
set(ZLIB_SEACH_TYPE shared)
set(ZLIB_SEARCH_TYPE shared)
endif ()
find_package (ZLIB NAMES ${PACKAGE_NAME} COMPONENTS ${ZLIB_SEACH_TYPE})
# Search pure Config mode first
find_package (ZLIB NAMES ${PACKAGE_NAME} OPTIONAL_COMPONENTS ${ZLIB_SEARCH_TYPE})
if (NOT ZLIB_FOUND)
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
set(ZLIB_USE_STATIC_LIBS ${HDF5_USE_ZLIB_STATIC})
Expand All @@ -101,14 +110,18 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
endif ()
set(H5_ZLIB_FOUND ${ZLIB_FOUND})
if (H5_ZLIB_FOUND)
set (H5_ZLIB_HEADER "zlib.h")
if (HDF5_USE_ZLIB_NG)
set (H5_ZLIB_HEADER "zlib-ng.h")
else ()
set (H5_ZLIB_HEADER "zlib.h")
endif ()
set (H5_ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR})
set (H5_ZLIB_INCLUDE_DIRS ${H5_ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
# The FindZLIB.cmake module does not set an OUTPUT_NAME
# on the target. The target returned is: ZLIB::ZLIB
get_filename_component (libname ${ZLIB_LIBRARIES} NAME_WLE)
string (REGEX REPLACE "^lib" "" libname ${libname})
set_target_properties (ZLIB::ZLIB PROPERTIES OUTPUT_NAME zlib-static)
set_target_properties (ZLIB::ZLIB PROPERTIES OUTPUT_NAME ${libname})
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ZLIB::ZLIB)
endif ()
else ()
Expand All @@ -125,6 +138,9 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
if (H5_ZLIB_FOUND)
set (H5_HAVE_FILTER_DEFLATE 1)
set (H5_HAVE_ZLIB_H 1)
if (HDF5_USE_ZLIB_NG)
set (H5_HAVE_ZLIBNG_H 1)
endif ()
set (H5_HAVE_LIBZ 1)
if (H5_HAVE_FILTER_DEFLATE)
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE")
Expand All @@ -133,43 +149,50 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
message (VERBOSE "Filter HDF5_ZLIB is ON")
else ()
set (HDF5_ENABLE_Z_LIB_SUPPORT OFF CACHE BOOL "" FORCE)
message (WARNING " ZLib support in HDF5 was enabled but not found")
message (FATAL_ERROR " ZLib support in HDF5 was enabled but not found")
endif ()
message (VERBOSE "H5_ZLIB_HEADER=${H5_ZLIB_HEADER}")
endif ()

#-----------------------------------------------------------------------------
# Option for SzLib support
#-----------------------------------------------------------------------------
set(H5_SZIP_FOUND FALSE)
if(NOT DEFINED LIBAEC_PACKAGE_NAME)
set(LIBAEC_PACKAGE_NAME "libaec")
endif ()
option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" ON)
if (HDF5_ENABLE_SZIP_SUPPORT)
option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" ON)
if (NOT SZIP_USE_EXTERNAL)
if (HDF5_USE_LIBAEC_STATIC)
set(LIBAEC_SEACH_TYPE static)
set(LIBAEC_SEARCH_TYPE static)
else ()
set(LIBAEC_SEACH_TYPE shared)
set(LIBAEC_SEARCH_TYPE shared)
endif ()
set(libaec_USE_STATIC_LIBS ${HDF5_USE_LIBAEC_STATIC})
set(SZIP_FOUND FALSE)
find_package (SZIP NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS ${LIBAEC_SEACH_TYPE})
if (NOT SZIP_FOUND)
find_package (SZIP) # Legacy find
endif ()
set(H5_SZIP_FOUND ${SZIP_FOUND})
# Search pure Config mode, there is not a FindSZIP module available
find_package (${LIBAEC_PACKAGE_NAME} NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} OPTIONAL_COMPONENTS ${LIBAEC_SEARCH_TYPE})
set(H5_SZIP_FOUND ${${LIBAEC_PACKAGE_NAME}_FOUND})
if (H5_SZIP_FOUND)
set (H5_SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
set (H5_SZIP_INCLUDE_DIRS ${H5_SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR})
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES})
if(LIBAEC_PACKAGE_NAME STREQUAL "libaec")
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} libaec::sz libaec::aec)
else ()
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${SZIP_LIBRARIES})
endif ()
endif ()
message (VERBOSE "H5_SZIP_FOUND=${SZIP_FOUND} and LINK_COMP_LIBS=${LINK_COMP_LIBS}")
else ()
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${HDF5_ENABLE_SZIP_ENCODING})
message (VERBOSE "Filter SZIP is built")
message (VERBOSE "... with library AEC")
message (VERBOSE "Filter SZIP is built using library AEC")
set (LINK_COMP_LIBS ${LINK_COMP_LIBS} ${H5_SZIP_STATIC_LIBRARY})
endif ()
endif ()
message (VERBOSE "LINK_COMP_LIBS=${LINK_COMP_LIBS}")
if (H5_SZIP_FOUND)
set (H5_HAVE_FILTER_SZIP 1)
set (H5_HAVE_SZLIB_H 1)
Expand All @@ -185,6 +208,6 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
endif ()
else ()
set (HDF5_ENABLE_SZIP_SUPPORT OFF CACHE BOOL "" FORCE)
message (WARNING "SZIP support in HDF5 was enabled but not found")
message (FATAL_ERROR "SZIP support in HDF5 was enabled but not found")
endif ()
endif ()
7 changes: 4 additions & 3 deletions CMakeInstallation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,12 @@ The HDF5 data model, file format, API, library, and tools are open and distribut
endif ()
endif ()
if (H5_SZIP_FOUND AND SZIP_USE_EXTERNAL)
set (SZIP_PROJNAME "${LIBAEC_PACKAGE_NAME}")
if (WIN32)
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};SZIP;ALL;/")
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};${SZIP_PROJNAME};ALL;/")
else ()
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/")
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/")
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};${SZIP_PROJNAME};libraries;/")
set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};${SZIP_PROJNAME};configinstall;/")
endif ()
endif ()
if (PLUGIN_FOUND AND PLUGIN_USE_EXTERNAL)
Expand Down
Loading
Loading