From f419af92043abb8f156814e9a2358ee99c34736e Mon Sep 17 00:00:00 2001 From: Dennis Heimbigner Date: Wed, 22 Jun 2022 16:40:54 -0600 Subject: [PATCH] Cleanup szip handling some more re: https://github.com/Unidata/netcdf-c/issues/2420 nc_test4/tst_vars3.c has the wrong conditional around the szip tests (did I do that?). Anyway, the current test is > #ifdef HAVE_SZ and it should be > #ifdef HAVE_H5Z_SZIP because the only thing that matters is that HDF5 lib has szip support. --- .github/workflows/run_tests_osx.yml | 2 +- .github/workflows/run_tests_ubuntu.yml | 2 +- .github/workflows/run_tests_win_mingw.yml | 2 +- configure.ac | 10 ++-------- include/netcdf_meta.h.in | 4 ++-- nc_test4/tst_vars3.c | 4 ++-- 6 files changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/run_tests_osx.yml b/.github/workflows/run_tests_osx.yml index 791988779..cf87b35bb 100644 --- a/.github/workflows/run_tests_osx.yml +++ b/.github/workflows/run_tests_osx.yml @@ -7,7 +7,7 @@ name: Run macOS-based netCDF Tests -on: [pull_request, workflow_dispatch] +on: [push,pull_request, workflow_dispatch] jobs: diff --git a/.github/workflows/run_tests_ubuntu.yml b/.github/workflows/run_tests_ubuntu.yml index 5ad0edf62..8bd2984ee 100644 --- a/.github/workflows/run_tests_ubuntu.yml +++ b/.github/workflows/run_tests_ubuntu.yml @@ -4,7 +4,7 @@ name: Run Ubuntu/Linux netCDF Tests -on: [pull_request, workflow_dispatch] +on: [push,pull_request, workflow_dispatch] jobs: diff --git a/.github/workflows/run_tests_win_mingw.yml b/.github/workflows/run_tests_win_mingw.yml index 46771aae0..773819c02 100644 --- a/.github/workflows/run_tests_win_mingw.yml +++ b/.github/workflows/run_tests_win_mingw.yml @@ -7,7 +7,7 @@ name: Run MSYS2, MinGW64-based Tests -on: [pull_request, workflow_dispatch] +on: [push,pull_request, workflow_dispatch] jobs: diff --git a/configure.ac b/configure.ac index 41d5ccf02..5cd384e0c 100644 --- a/configure.ac +++ b/configure.ac @@ -1879,16 +1879,10 @@ AC_SUBST(HAS_ZSTD,[$have_zstd]) # Always available std_filters="deflate bz2" + if test "x$enable_szlib" = xyes ; then std_filters="${std_filters} szip" fi -# We need to include szip iff HDF5 && HDF5_HAS_SZIP || !HDF5 && NCZARR && libsz -if test "x$enable_hdf5" = xyes && test "x$enable_hdf5_szip" = xyes ; then - std_filters="${std_filters} szip" -fi -if test "x$enable_hdf5" = xno && test "x$have_sz" = xyes ; then -std_filters="${std_filters} szip" -fi if test "x$have_blosc" = xyes ; then std_filters="${std_filters} blosc" fi @@ -2003,7 +1997,7 @@ AX_SET_META([NC_HAS_NCZARR],[$enable_nczarr],[yes]) AX_SET_META([NC_HAS_MULTIFILTERS],[$has_multifilters],[yes]) AX_SET_META([NC_HAS_LOGGING],[$enable_logging],[yes]) AX_SET_META([NC_HAS_QUANTIZE],[yes],[yes]) -AX_SET_META([NC_HAS_SZIP],[$enable_hdf5_szip],[yes]) +AX_SET_META([NC_HAS_SZIP],[have_sz],[yes]) AX_SET_META([NC_HAS_ZSTD],[$have_zstd],[yes]) # This is the version of the dispatch table. If the dispatch table is diff --git a/include/netcdf_meta.h.in b/include/netcdf_meta.h.in index d9f90ebee..019db6ba9 100644 --- a/include/netcdf_meta.h.in +++ b/include/netcdf_meta.h.in @@ -43,8 +43,8 @@ #define NC_HAS_NC4 @NC_HAS_NC4@ /*!< API version 4 support. */ #define NC_HAS_HDF4 @NC_HAS_HDF4@ /*!< HDF4 support. */ #define NC_HAS_HDF5 @NC_HAS_HDF5@ /*!< HDF5 support. */ -#define NC_HAS_SZIP @NC_HAS_SZIP@ /*!< szip support (HDF5 only) */ -#define NC_HAS_SZIP_WRITE @NC_HAS_SZIP@ /*!< szip write support (HDF5 only) */ +#define NC_HAS_SZIP @NC_HAS_SZIP@ /*!< szip support */ +#define NC_HAS_SZIP_WRITE @NC_HAS_SZIP@ /*!< szip write support */ #define NC_HAS_DAP2 @NC_HAS_DAP2@ /*!< DAP2 support. */ #define NC_HAS_DAP4 @NC_HAS_DAP4@ /*!< DAP4 support. */ #define NC_HAS_BYTERANGE @NC_HAS_BYTERANGE@ /*!< Byterange support. */ diff --git a/nc_test4/tst_vars3.c b/nc_test4/tst_vars3.c index 175878966..1b5a7ce79 100644 --- a/nc_test4/tst_vars3.c +++ b/nc_test4/tst_vars3.c @@ -418,7 +418,7 @@ main(int argc, char **argv) if (nc_close(ncid)) ERR; } SUMMARIZE_ERR; -#ifdef HAVE_SZ +#ifdef HAVE_H5Z_SZIP printf("**** testing simple szip filter setup..."); { int ncid; @@ -757,6 +757,6 @@ main(int argc, char **argv) if (nc_close(ncid)) ERR; } SUMMARIZE_ERR; -#endif /* HAVE_SZ */ +#endif /* HAVE_H5Z_SZIP */ FINAL_RESULTS; }