From d1334f7b8845ede803da7303fe5ab0136fee6692 Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Mon, 18 Mar 2024 15:37:39 -0500 Subject: [PATCH] Replace ENABLE_NCZARR with NETCDF_ENABLE_NCZARR --- .github/workflows/run_tests_osx.yml | 18 ++++----- .github/workflows/run_tests_ubuntu.yml | 18 ++++----- CMakeLists.txt | 52 +++++++++++++------------- Makefile.am | 2 +- cmake/dependencies.cmake | 4 +- config.h.cmake.in | 6 +-- configure.ac | 16 ++++---- docs/nczarr.md | 2 +- include/ncdispatch.h | 2 +- lib_flags.am | 2 +- libdispatch/CMakeLists.txt | 4 +- libdispatch/dfile.c | 8 ++-- libdispatch/dfilter.c | 2 +- liblib/CMakeLists.txt | 6 +-- liblib/Makefile.am | 4 +- liblib/nc_initialize.c | 4 +- libnczarr/CMakeLists.txt | 2 +- libnczarr/Makefile.am | 6 +-- libnczarr/zattr.c | 2 +- libnczarr/zclose.c | 2 +- libnczarr/zdispatch.c | 4 +- libnczarr/zfilter.c | 8 ++-- libnczarr/zinternal.c | 2 +- libnczarr/zmap.c | 8 ++-- libnczarr/zmap.h | 2 +- libnczarr/zsync.c | 16 ++++---- libnczarr/zvar.c | 4 +- libnczarr/zxcache.c | 4 +- nc-config.cmake.in | 2 +- nc_test4/tst_quantize.c | 2 +- ncdump/ncfilteravail.c | 2 +- nczarr_test/CMakeLists.txt | 6 +-- nczarr_test/Makefile.am | 6 +-- nczarr_test/ncdumpchunks.c | 4 +- nczarr_test/test_chunkcases.c | 2 +- nczarr_test/test_unlim_io.c | 2 +- plugins/CMakeLists.txt | 2 +- plugins/Makefile.am | 2 +- 38 files changed, 120 insertions(+), 120 deletions(-) diff --git a/.github/workflows/run_tests_osx.yml b/.github/workflows/run_tests_osx.yml index 4e8faa5b6..04ea6740c 100644 --- a/.github/workflows/run_tests_osx.yml +++ b/.github/workflows/run_tests_osx.yml @@ -83,9 +83,9 @@ jobs: if: matrix.use_dap == 'dap_off' - run: echo "NETCDF_ENABLE_DAP=--enable-dap" >> $GITHUB_ENV if: matrix.use_dap == 'dap_on' - - run: echo "ENABLE_NCZARR=--disable-nczarr" >> $GITHUB_ENV + - run: echo "NETCDF_ENABLE_NCZARR=--disable-nczarr" >> $GITHUB_ENV if: matrix.use_nczarr == 'nczarr_off' - - run: echo "ENABLE_NCZARR=--enable-nczarr" >> $GITHUB_ENV + - run: echo "NETCDF_ENABLE_NCZARR=--enable-nczarr" >> $GITHUB_ENV if: matrix.use_nczarr == 'nczarr_on' ### @@ -116,7 +116,7 @@ jobs: - name: Configure shell: bash -l {0} - run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ./configure ${NETCDF_ENABLE_HDF5} ${NETCDF_ENABLE_DAP} ${ENABLE_NCZARR} + run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ./configure ${NETCDF_ENABLE_HDF5} ${NETCDF_ENABLE_DAP} ${NETCDF_ENABLE_NCZARR} if: ${{ success() }} - name: Look at config.log if error @@ -145,7 +145,7 @@ jobs: # - name: Make Distcheck # shell: bash -l {0} - # run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} DISTCHECK_CONFIGURE_FLAGS="${NETCDF_ENABLE_HDF4} ${NETCDF_ENABLE_HDF5} ${NETCDF_ENABLE_DAP} ${ENABLE_NCZARR}" make distcheck + # run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} DISTCHECK_CONFIGURE_FLAGS="${NETCDF_ENABLE_HDF4} ${NETCDF_ENABLE_HDF5} ${NETCDF_ENABLE_DAP} ${NETCDF_ENABLE_NCZARR}" make distcheck # if: ${{ success() }} #- name: Start SSH Debug @@ -188,9 +188,9 @@ jobs: if: matrix.use_dap == 'dap_off' - run: echo "NETCDF_ENABLE_DAP=ON" >> $GITHUB_ENV if: matrix.use_dap == 'dap_on' - - run: echo "ENABLE_NCZARR=OFF" >> $GITHUB_ENV + - run: echo "NETCDF_ENABLE_NCZARR=OFF" >> $GITHUB_ENV if: matrix.use_nczarr == 'nczarr_off' - - run: echo "ENABLE_NCZARR=ON" >> $GITHUB_ENV + - run: echo "NETCDF_ENABLE_NCZARR=ON" >> $GITHUB_ENV if: matrix.use_nczarr == 'nczarr_on' - run: echo "CTEST_OUTPUT_ON_FAILURE=1" >> $GITHUB_ENV @@ -218,7 +218,7 @@ jobs: run: | mkdir build cd build - LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=${NETCDF_ENABLE_DAP} -DNETCDF_ENABLE_HDF5=${NETCDF_ENABLE_HDF5} -DENABLE_NCZARR=${ENABLE_NCZARR} + LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=${NETCDF_ENABLE_DAP} -DNETCDF_ENABLE_HDF5=${NETCDF_ENABLE_HDF5} -DNETCDF_ENABLE_NCZARR=${NETCDF_ENABLE_NCZARR} - name: Print Summary shell: bash -l {0} @@ -375,7 +375,7 @@ jobs: run: | mkdir build cd build - LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DNETCDF_ENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D NETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DNETCDF_ENABLE_LIBXML2=FALSE + LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DNETCDF_ENABLE_HDF5=TRUE -DNETCDF_ENABLE_NCZARR=TRUE -D NETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DNETCDF_ENABLE_LIBXML2=FALSE - name: Print Summary shell: bash -l {0} @@ -450,7 +450,7 @@ jobs: run: | mkdir build cd build - LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DNETCDF_ENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D NETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DNETCDF_ENABLE_LIBXML2=FALSE -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} + LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DNETCDF_ENABLE_HDF5=TRUE -DNETCDF_ENABLE_NCZARR=TRUE -D NETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DNETCDF_ENABLE_LIBXML2=FALSE -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - name: Print Summary shell: bash -l {0} diff --git a/.github/workflows/run_tests_ubuntu.yml b/.github/workflows/run_tests_ubuntu.yml index 7137d724f..6a279dddd 100644 --- a/.github/workflows/run_tests_ubuntu.yml +++ b/.github/workflows/run_tests_ubuntu.yml @@ -440,7 +440,7 @@ jobs: run: | mkdir build cd build - LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DNETCDF_ENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -DNETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DNETCDF_ENABLE_LIBXML2=FALSE + LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DNETCDF_ENABLE_HDF5=TRUE -DNETCDF_ENABLE_NCZARR=TRUE -DNETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DNETCDF_ENABLE_LIBXML2=FALSE - name: Print Summary shell: bash -l {0} @@ -521,7 +521,7 @@ jobs: run: | mkdir build cd build - LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DNETCDF_ENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -DNETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DNETCDF_ENABLE_LIBXML2=FALSE -DBUILD_SHARED_LIBS=FALSE -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} + LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DNETCDF_ENABLE_HDF5=TRUE -DNETCDF_ENABLE_NCZARR=TRUE -DNETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DNETCDF_ENABLE_LIBXML2=FALSE -DBUILD_SHARED_LIBS=FALSE -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} - name: Print Summary shell: bash -l {0} @@ -602,7 +602,7 @@ jobs: run: | mkdir build cd build - LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_C_COMPILER=mpicc -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DNETCDF_ENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D NETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DENABLE_PNETCDF=TRUE + LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_C_COMPILER=mpicc -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DNETCDF_ENABLE_HDF5=TRUE -DNETCDF_ENABLE_NCZARR=TRUE -D NETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DENABLE_PNETCDF=TRUE - name: Print Summary shell: bash -l {0} @@ -688,9 +688,9 @@ jobs: if: matrix.use_dap == 'dap_off' - run: echo "NETCDF_ENABLE_DAP=--enable-dap" >> $GITHUB_ENV if: matrix.use_dap == 'dap_on' - - run: echo "ENABLE_NCZARR=--disable-nczarr" >> $GITHUB_ENV + - run: echo "NETCDF_ENABLE_NCZARR=--disable-nczarr" >> $GITHUB_ENV if: matrix.use_nczarr == 'nczarr_off' - - run: echo "ENABLE_NCZARR=--enable-nczarr" >> $GITHUB_ENV + - run: echo "NETCDF_ENABLE_NCZARR=--enable-nczarr" >> $GITHUB_ENV if: matrix.use_nczarr == 'nczarr_on' ### @@ -738,7 +738,7 @@ jobs: done current_directory="$(pwd)" mkdir ../build - cd ../build && CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} "${current_directory}/configure" ${NETCDF_ENABLE_HDF5} ${NETCDF_ENABLE_DAP} ${ENABLE_NCZARR} + cd ../build && CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} "${current_directory}/configure" ${NETCDF_ENABLE_HDF5} ${NETCDF_ENABLE_DAP} ${NETCDF_ENABLE_NCZARR} if: ${{ success() }} - name: Look at config.log if error @@ -830,9 +830,9 @@ jobs: if: matrix.use_dap == 'dap_off' - run: echo "NETCDF_ENABLE_DAP=ON" >> $GITHUB_ENV if: matrix.use_dap == 'dap_on' - - run: echo "ENABLE_NCZARR=OFF" >> $GITHUB_ENV + - run: echo "NETCDF_ENABLE_NCZARR=OFF" >> $GITHUB_ENV if: matrix.use_nczarr == 'nczarr_off' - - run: echo "ENABLE_NCZARR=ON" >> $GITHUB_ENV + - run: echo "NETCDF_ENABLE_NCZARR=ON" >> $GITHUB_ENV if: matrix.use_nczarr == 'nczarr_on' - run: echo "CTEST_OUTPUT_ON_FAILURE=1" >> $GITHUB_ENV @@ -860,7 +860,7 @@ jobs: run: | mkdir build cd build - LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=${NETCDF_ENABLE_DAP} -DNETCDF_ENABLE_HDF5=${NETCDF_ENABLE_HDF5} -DENABLE_NCZARR=${ENABLE_NCZARR} + LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=${NETCDF_ENABLE_DAP} -DNETCDF_ENABLE_HDF5=${NETCDF_ENABLE_HDF5} -DNETCDF_ENABLE_NCZARR=${NETCDF_ENABLE_NCZARR} - name: Print Summary shell: bash -l {0} diff --git a/CMakeLists.txt b/CMakeLists.txt index ada81f245..6a7777706 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -442,14 +442,14 @@ if(NOT NETCDF_ENABLE_HDF5 OR NOT ENABLE_NETCDF4 OR NOT ENABLE_NETCDF_4) endif() option(NETCDF_ENABLE_HDF4 "Build netCDF-4 with HDF4 read capability(HDF4, HDF5 and Zlib required)." OFF) option(NETCDF_ENABLE_DAP "Enable DAP2 and DAP4 Client." ON) -option(ENABLE_NCZARR "Enable NCZarr Client." ON) +option(NETCDF_ENABLE_NCZARR "Enable NCZarr Client." ON) option(ENABLE_PNETCDF "Build with parallel I/O for CDF-1, 2, and 5 files using PnetCDF." OFF) set(NETCDF_ENABLE_CDF5 AUTO CACHE STRING "AUTO") option(NETCDF_ENABLE_CDF5 "Enable CDF5 support" ON) # Netcdf-4 support (i.e. libsrc4) is required by more than just HDF5 (e.g. NCZarr) # So depending on what above formats are enabled, enable netcdf-4 -if(NETCDF_ENABLE_HDF5 OR NETCDF_ENABLE_HDF4 OR ENABLE_NCZARR) +if(NETCDF_ENABLE_HDF5 OR NETCDF_ENABLE_HDF4 OR NETCDF_ENABLE_NCZARR) set(ENABLE_NETCDF_4 ON CACHE BOOL "Enable netCDF-4 API" FORCE) set(ENABLE_NETCDF4 ON CACHE BOOL "Enable netCDF4 Alias" FORCE) endif() @@ -558,7 +558,7 @@ set(REMOTETESTSERVERS "remotetest.unidata.ucar.edu" CACHE STRING "test servers t set(REMOTETESTSERVERS "remotetest.unidata.ucar.edu" CACHE STRING "test servers to use for remote test") # Locate some compressors -option(NETCDF_ENABLE_FILTER_SZIP "Enable use of Szip compression library if it is available. Required if ENABLE_NCZARR is true." ON) +option(NETCDF_ENABLE_FILTER_SZIP "Enable use of Szip compression library if it is available. Required if NETCDF_ENABLE_NCZARR is true." ON) option(NETCDF_ENABLE_FILTER_BZ2 "Enable use of Bz2 compression library if it is available." ON) option(NETCDF_ENABLE_FILTER_BLOSC "Enable use of blosc compression library if it is available." ON) option(NETCDF_ENABLE_FILTER_ZSTD "Enable use of Zstd compression library if it is available." ON) @@ -626,7 +626,7 @@ else() # No option specified endif() # Try to enable NCZarr zip support -option(ENABLE_NCZARR_ZIP "Enable NCZarr ZIP support." OFF) +option(NETCDF_ENABLE_NCZARR_ZIP "Enable NCZarr ZIP support." OFF) include(CMakeDependentOption) @@ -684,12 +684,12 @@ endif() # Options for S3 Support option(ENABLE_S3 "Enable S3 support." OFF) option(ENABLE_S3_INTERNAL "Enable S3 Internal support." OFF) -option(ENABLE_NCZARR_S3 "Enable NCZarr S3 support; Deprecated in favor of ENABLE_S3" OFF) +option(NETCDF_ENABLE_NCZARR_S3 "Enable NCZarr S3 support; Deprecated in favor of ENABLE_S3" OFF) if(NOT ENABLE_REMOTE_FUNCTIONALITY) set(ENABLE_S3 OFF CACHE BOOL "" FORCE) set(ENABLE_S3_INTERNAL OFF CACHE BOOL "" FORCE) - set(ENABLE_NCZARR_S3 OFF CACHE BOOL "" FORCE) + set(NETCDF_ENABLE_NCZARR_S3 OFF CACHE BOOL "" FORCE) endif() # Control S3 Testing: Multi-valued option @@ -703,17 +703,17 @@ if(WITH_S3_TESTING) message(WARNING "**** DO NOT USE WITH_S3_TESTING=ON UNLESS YOU HAVE ACCESS TO THE UNIDATA S3 BUCKET! ***") endif() -# ENABLE_NCZARR_S3 is now an alias for ENABLE_S3 (but...) -if (NOT ENABLE_S3 AND ENABLE_NCZARR_S3) +# NETCDF_ENABLE_NCZARR_S3 is now an alias for ENABLE_S3 (but...) +if (NOT ENABLE_S3 AND NETCDF_ENABLE_NCZARR_S3) set(ENABLE_S3 ON CACHE BOOL "NCARR S3" FORCE) # For back compatibility endif() -unset(ENABLE_NCZARR_S3) +unset(NETCDF_ENABLE_NCZARR_S3) if(NOT ENABLE_REMOTE_FUNCTIONALITY) message(WARNING "ENABLE_REMOTE_FUNCTIONALITY=NO => disable all s3 functionality") set(ENABLE_S3 OFF CACHE BOOL "" FORCE) set(ENABLE_S3_INTERNAL OFF CACHE BOOL "" FORCE) - set(ENABLE_NCZARR_S3 OFF CACHE BOOL "" FORCE) + set(NETCDF_ENABLE_NCZARR_S3 OFF CACHE BOOL "" FORCE) set(NETCDF_ENABLE_HDF5_ROS3 OFF CACHE BOOL "Use ROS3" FORCE) set(WITH_S3_TESTING OFF CACHE STRING "" FORCE) endif() @@ -967,7 +967,7 @@ endif() option(NETCDF_ENABLE_FILTER_TESTING "Enable filter testing. Ignored if shared libraries or netCDF4 are not enabled" ${ENABLE_PLUGINS}) if(NETCDF_ENABLE_FILTER_TESTING) - if(NOT NETCDF_ENABLE_HDF5 AND NOT ENABLE_NCZARR) + if(NOT NETCDF_ENABLE_HDF5 AND NOT NETCDF_ENABLE_NCZARR) message(WARNING "NETCDF_ENABLE_FILTER_TESTING requires HDF5 and/or NCZarr. Disabling.") set(NETCDF_ENABLE_FILTER_TESTING OFF CACHE BOOL "Enable Filter Testing" FORCE) endif() @@ -978,22 +978,22 @@ if(NOT BUILD_SHARED_LIBS) set(NETCDF_ENABLE_FILTER_TESTING OFF) endif() -option(ENABLE_NCZARR_FILTERS "Enable NCZarr filters" ${ENABLE_PLUGINS}) -option(ENABLE_NCZARR_FILTERS_TESTING "Enable NCZarr filter testing." ${ENABLE_NCZARR_FILTERS}) +option(NETCDF_ENABLE_NCZARR_FILTERS "Enable NCZarr filters" ${ENABLE_PLUGINS}) +option(NETCDF_ENABLE_NCZARR_FILTERS_TESTING "Enable NCZarr filter testing." ${NETCDF_ENABLE_NCZARR_FILTERS}) # Constraints -if (NOT ENABLE_PLUGINS AND ENABLE_NCZARR_FILTERS) - message(WARNING "ENABLE_NCZARR_FILTERS requires ENABLE_PLUGINS. Disabling.") - set(ENABLE_NCZARR_FILTERS OFF CACHE BOOL "Enable NCZarr Filters." FORCE) +if (NOT ENABLE_PLUGINS AND NETCDF_ENABLE_NCZARR_FILTERS) + message(WARNING "NETCDF_ENABLE_NCZARR_FILTERS requires ENABLE_PLUGINS. Disabling.") + set(NETCDF_ENABLE_NCZARR_FILTERS OFF CACHE BOOL "Enable NCZarr Filters." FORCE) endif() -IF (NOT ENABLE_NCZARR) - message(WARNING "ENABLE_NCZARR==NO => ENABLE_NCZARR_FILTERS==NO AND ENABLE_NCZARR_FILTER_TESTING==NO") - set(ENABLE_NCZARR_FILTERS OFF CACHE BOOL "Disable NCZARR_FILTERS" FORCE) +IF (NOT NETCDF_ENABLE_NCZARR) + message(WARNING "NETCDF_ENABLE_NCZARR==NO => NETCDF_ENABLE_NCZARR_FILTERS==NO AND NETCDF_ENABLE_NCZARR_FILTER_TESTING==NO") + set(NETCDF_ENABLE_NCZARR_FILTERS OFF CACHE BOOL "Disable NCZARR_FILTERS" FORCE) endif() -IF (NOT ENABLE_NCZARR_FILTERS) - set(ENABLE_NCZARR_FILTER_TESTING OFF CACHE BOOL "Enable NCZarr Filter Testing" FORCE) +IF (NOT NETCDF_ENABLE_NCZARR_FILTERS) + set(NETCDF_ENABLE_NCZARR_FILTER_TESTING OFF CACHE BOOL "Enable NCZarr Filter Testing" FORCE) endif() set(ENABLE_CLIENTSIDE_FILTERS OFF) @@ -1408,7 +1408,7 @@ if(ENABLE_PLUGINS) add_subdirectory(libncpoco) endif() -if(ENABLE_NCZARR) +if(NETCDF_ENABLE_NCZARR) add_subdirectory(libnczarr) file(COPY ${netCDF_SOURCE_DIR}/unit_test/timer_utils.h DESTINATION ${netCDF_BINARY_DIR}/nczarr_test/) @@ -1466,7 +1466,7 @@ if(ENABLE_TESTS) if(ENABLE_UNIT_TESTS) add_subdirectory(unit_test) endif(ENABLE_UNIT_TESTS) - if(ENABLE_NCZARR) + if(NETCDF_ENABLE_NCZARR) add_subdirectory(nczarr_test) endif() endif() @@ -1643,9 +1643,9 @@ is_enabled(ENABLE_S3 HAS_S3) is_enabled(ENABLE_S3_AWS HAS_S3_AWS) is_enabled(ENABLE_S3_INTERNAL HAS_S3_INTERNAL) is_enabled(HAS_HDF5_ROS3 HAS_HDF5_ROS3) -is_enabled(ENABLE_NCZARR HAS_NCZARR) -is_enabled(ENABLE_NCZARR_ZIP HAS_NCZARR_ZIP) -is_enabled(ENABLE_NCZARR_ZIP DO_NCZARR_ZIP_TESTS) +is_enabled(NETCDF_ENABLE_NCZARR HAS_NCZARR) +is_enabled(NETCDF_ENABLE_NCZARR_ZIP HAS_NCZARR_ZIP) +is_enabled(NETCDF_ENABLE_NCZARR_ZIP DO_NCZARR_ZIP_TESTS) is_enabled(ENABLE_QUANTIZE HAS_QUANTIZE) is_enabled(NETCDF_ENABLE_LOGGING HAS_LOGGING) is_enabled(NETCDF_ENABLE_FILTER_TESTING DO_FILTER_TESTS) diff --git a/Makefile.am b/Makefile.am index b1f9f0180..ede763a7e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -109,7 +109,7 @@ NCPOCO = libncpoco endif # Build Cloud Storage if desired. -if ENABLE_NCZARR +if NETCDF_ENABLE_NCZARR ZARR_TEST_DIR = nczarr_test ZARR = libnczarr endif diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index 9c06490ef..6e3cd061f 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -348,7 +348,7 @@ endif() ################################ IF (NETCDF_ENABLE_FILTER_SZIP) find_package(Szip) -elseif(ENABLE_NCZARR) +elseif(NETCDF_ENABLE_NCZARR) find_package(Szip) endif() IF (NETCDF_ENABLE_FILTER_BZ2) @@ -381,7 +381,7 @@ else() set(STD_FILTERS "${STD_FILTERS} bz2") endif() -IF (ENABLE_NCZARR_ZIP) +IF (NETCDF_ENABLE_NCZARR_ZIP) find_package(Zip REQUIRED) target_include_directories(netcdf PRIVATE diff --git a/config.h.cmake.in b/config.h.cmake.in index 6e5e2a69c..d6714e175 100644 --- a/config.h.cmake.in +++ b/config.h.cmake.in @@ -146,13 +146,13 @@ are set when opening a binary file on Windows. */ #cmakedefine NETCDF_ENABLE_DAP_REMOTE_TESTS 1 /* if true, enable NCZARR */ -#cmakedefine ENABLE_NCZARR 1 +#cmakedefine NETCDF_ENABLE_NCZARR 1 /* if true, enable nczarr filter support */ -#cmakedefine ENABLE_NCZARR_FILTERS 1 +#cmakedefine NETCDF_ENABLE_NCZARR_FILTERS 1 /* if true, enable nczarr zip support */ -#cmakedefine ENABLE_NCZARR_ZIP 1 +#cmakedefine NETCDF_ENABLE_NCZARR_ZIP 1 /* if true, Allow dynamically loaded plugins */ #cmakedefine ENABLE_PLUGINS 1 diff --git a/configure.ac b/configure.ac index 66760d0b9..ec1e95eb8 100644 --- a/configure.ac +++ b/configure.ac @@ -712,10 +712,10 @@ if test "x$enable_nczarr" = xyes ; then fi if test "x$enable_nczarr" = xyes; then - AC_DEFINE([ENABLE_NCZARR], [1], [if true, build NCZarr Client]) - AC_SUBST(ENABLE_NCZARR) + AC_DEFINE([NETCDF_ENABLE_NCZARR], [1], [if true, build NCZarr Client]) + AC_SUBST(NETCDF_ENABLE_NCZARR) fi -AM_CONDITIONAL(ENABLE_NCZARR, [test x$enable_nczarr = xyes]) +AM_CONDITIONAL(NETCDF_ENABLE_NCZARR, [test x$enable_nczarr = xyes]) ########## # Look for Standardized libraries @@ -877,7 +877,7 @@ else AC_MSG_RESULT([${enable_nczarr_zip}]) if test "x$enable_nczarr_zip" = xyes ; then - AC_DEFINE([ENABLE_NCZARR_ZIP], [1], [If true, then libzip found]) + AC_DEFINE([NETCDF_ENABLE_NCZARR_ZIP], [1], [If true, then libzip found]) fi # Check for enabling of S3 support @@ -1887,7 +1887,7 @@ enable_nczarr_filter_testing=no fi if test "x$enable_nczarr_filters" = xyes; then - AC_DEFINE([ENABLE_NCZARR_FILTERS], [1], [if true, enable NCZarr filters]) + AC_DEFINE([NETCDF_ENABLE_NCZARR_FILTERS], [1], [if true, enable NCZarr filters]) fi # Client side filter registration is permanently disabled @@ -1895,7 +1895,7 @@ enable_clientside_filters=no AM_CONDITIONAL(ENABLE_CLIENTSIDE_FILTERS, [test x$enable_clientside_filters = xyes]) AM_CONDITIONAL(NETCDF_ENABLE_FILTER_TESTING, [test x$enable_filter_testing = xyes]) -AM_CONDITIONAL(ENABLE_NCZARR_FILTERS, [test x$enable_nczarr_filters = xyes]) +AM_CONDITIONAL(NETCDF_ENABLE_NCZARR_FILTERS, [test x$enable_nczarr_filters = xyes]) # Automake conditionals need to be called, whether the answer is yes # or no. @@ -1933,10 +1933,10 @@ AM_CONDITIONAL(HAS_PAR_FILTERS, [test x$hdf5_supports_par_filters = xyes ]) AM_CONDITIONAL(ENABLE_S3, [test "x$enable_s3" = xyes]) AM_CONDITIONAL(ENABLE_S3_AWS, [test "x$enable_s3_aws" = xyes]) AM_CONDITIONAL(ENABLE_S3_INTERNAL, [test "x$enable_s3_internal" = xyes]) -AM_CONDITIONAL(ENABLE_NCZARR, [test "x$enable_nczarr" = xyes]) +AM_CONDITIONAL(NETCDF_ENABLE_NCZARR, [test "x$enable_nczarr" = xyes]) AM_CONDITIONAL(ENABLE_S3_TESTPUB, [test "x$with_s3_testing" != xno]) # all => public AM_CONDITIONAL(ENABLE_S3_TESTALL, [test "x$with_s3_testing" = xyes]) -AM_CONDITIONAL(ENABLE_NCZARR_ZIP, [test "x$enable_nczarr_zip" = xyes]) +AM_CONDITIONAL(NETCDF_ENABLE_NCZARR_ZIP, [test "x$enable_nczarr_zip" = xyes]) AM_CONDITIONAL(HAVE_DEFLATE, [test "x$have_deflate" = xyes]) AM_CONDITIONAL(HAVE_SZ, [test "x$have_sz" = xyes]) AM_CONDITIONAL(HAVE_H5Z_SZIP, [test "x$enable_hdf5_szip" = xyes]) diff --git a/docs/nczarr.md b/docs/nczarr.md index 6fafa1ee2..ab67e7b44 100644 --- a/docs/nczarr.md +++ b/docs/nczarr.md @@ -503,7 +503,7 @@ The relevant ./configure options are as follows. The relevant CMake flags are as follows. -1. *-DENABLE_NCZARR=off* -- equivalent to the Automake *--disable-nczarr* option. +1. *-DNETCDF_ENABLE_NCZARR=off* -- equivalent to the Automake *--disable-nczarr* option. ## Testing NCZarr S3 Support {#nczarr_testing_S3_support} The relevant tests for S3 support are in the _nczarr_test_ directory. diff --git a/include/ncdispatch.h b/include/ncdispatch.h index b6282a46a..cee5802b4 100644 --- a/include/ncdispatch.h +++ b/include/ncdispatch.h @@ -138,7 +138,7 @@ extern int HDF4_initialize(void); extern int HDF4_finalize(void); #endif -#ifdef ENABLE_NCZARR +#ifdef NETCDF_ENABLE_NCZARR extern const NC_Dispatch* NCZ_dispatch_table; extern int NCZ_initialize(void); extern int NCZ_finalize(void); diff --git a/lib_flags.am b/lib_flags.am index d3a2cdba6..dd57cfd78 100644 --- a/lib_flags.am +++ b/lib_flags.am @@ -13,7 +13,7 @@ if USE_DAP AM_CPPFLAGS += -I${top_srcdir}/oc2 endif -if ENABLE_NCZARR +if NETCDF_ENABLE_NCZARR AM_CPPFLAGS += -I${top_srcdir}/libnczarr endif diff --git a/libdispatch/CMakeLists.txt b/libdispatch/CMakeLists.txt index 02504ef20..a36b9af45 100644 --- a/libdispatch/CMakeLists.txt +++ b/libdispatch/CMakeLists.txt @@ -84,9 +84,9 @@ if (ENABLE_PNETCDF) target_link_libraries(dispatch PUBLIC PNETCDF::PNETCDF) endif() -IF(ENABLE_NCZARR) +IF(NETCDF_ENABLE_NCZARR) target_include_directories(dispatch PUBLIC ../libnczarr) -endif(ENABLE_NCZARR) +endif(NETCDF_ENABLE_NCZARR) if(ENABLE_S3) if(ENABLE_S3_AWS) diff --git a/libdispatch/dfile.c b/libdispatch/dfile.c index b86662abc..5a52e28f5 100644 --- a/libdispatch/dfile.c +++ b/libdispatch/dfile.c @@ -1909,7 +1909,7 @@ NC_create(const char *path0, int cmode, size_t initialsz, dispatcher = UDF1_dispatch_table; break; #endif /* USE_NETCDF4 */ -#ifdef ENABLE_NCZARR +#ifdef NETCDF_ENABLE_NCZARR case NC_FORMATX_NCZARR: dispatcher = NCZ_dispatch_table; break; @@ -2050,7 +2050,7 @@ NC_open(const char *path0, int omode, int basepe, size_t *chunksizehintp, #ifdef NETCDF_ENABLE_CDF5 cdf5built = 1; #endif -#ifdef ENABLE_NCZARR +#ifdef NETCDF_ENABLE_NCZARR nczarrbuilt = 1; #endif if(UDF0_dispatch_table != NULL) @@ -2081,7 +2081,7 @@ NC_open(const char *path0, int omode, int basepe, size_t *chunksizehintp, #ifdef USE_HDF4 | (1< @@ -114,7 +114,7 @@ set(TLL_LIBS ${TLL_LIBS} ${HAVE_LIBM} ${ZLIB_LIBRARY}) # Add extra dependencies specified via NC_EXTRA_DEPS set(TLL_LIBS ${TLL_LIBS} ${EXTRA_DEPS}) -if(ENABLE_NCZARR_ZIP) +if(NETCDF_ENABLE_NCZARR_ZIP) set(TLL_LIBS ${TLL_LIBS} ${Zip_LIBRARIES}) endif() @@ -135,7 +135,7 @@ if(HAVE_LIBDL) set(TLL_LIBS ${LIBDL} ${TLL_LIBS}) endif() -if(ENABLE_NCZARR_ZIP) +if(NETCDF_ENABLE_NCZARR_ZIP) set(TLL_LIBS ${TLL_LIBS} ${Zip_LIBRARIES}) endif() diff --git a/liblib/Makefile.am b/liblib/Makefile.am index 773305b48..622b0d489 100644 --- a/liblib/Makefile.am +++ b/liblib/Makefile.am @@ -79,13 +79,13 @@ AM_CPPFLAGS += -I${top_srcdir}/libsrc4 libnetcdf_la_LIBADD += ${top_builddir}/libsrc4/libnetcdf4.la endif #USE_NETCDF4 -if ENABLE_NCZARR +if NETCDF_ENABLE_NCZARR AM_CPPFLAGS += -I${top_srcdir}/libnczarr libnetcdf_la_LIBADD += ${top_builddir}/libnczarr/libnczarr.la if ENABLE_S3_AWS libnetcdf_la_LIBADD += ${aws_cpp_sdk_core_LIBS} ${aws_cpp_sdk_s3_LIBS} endif -endif #ENABLE_NCZARR +endif #NETCDF_ENABLE_NCZARR if ENABLE_PLUGINS AM_CPPFLAGS += -I${top_srcdir}/libncpoco diff --git a/liblib/nc_initialize.c b/liblib/nc_initialize.c index ccdd693d8..321d16c42 100644 --- a/liblib/nc_initialize.c +++ b/liblib/nc_initialize.c @@ -112,7 +112,7 @@ nc_initialize() #ifdef ENABLE_S3 if((stat = NC_s3sdkinitialize())) goto done; #endif -#ifdef ENABLE_NCZARR +#ifdef NETCDF_ENABLE_NCZARR if((stat = NCZ_initialize())) goto done; #endif @@ -170,7 +170,7 @@ nc_finalize(void) if((stat = NC_HDF5_finalize())) failed = stat; #endif -#ifdef ENABLE_NCZARR +#ifdef NETCDF_ENABLE_NCZARR if((stat = NCZ_finalize())) failed = stat; #endif diff --git a/libnczarr/CMakeLists.txt b/libnczarr/CMakeLists.txt index 9b754b489..82fe2060a 100644 --- a/libnczarr/CMakeLists.txt +++ b/libnczarr/CMakeLists.txt @@ -46,7 +46,7 @@ zfilter.h zdebug.h ) -if(ENABLE_NCZARR_ZIP) +if(NETCDF_ENABLE_NCZARR_ZIP) set(libnczarr_SOURCES ${libnczarr_SOURCES} zmap_zip.c) endif() diff --git a/libnczarr/Makefile.am b/libnczarr/Makefile.am index d7c2b3cf5..5357f0b7e 100644 --- a/libnczarr/Makefile.am +++ b/libnczarr/Makefile.am @@ -15,7 +15,7 @@ AM_CXXFLAGS = libnczarr_la_LIBADD = libnczarr_la_LDFLAGS = -# Remember ENABLE_NCZARR implies USE_NETCDF4 +# Remember NETCDF_ENABLE_NCZARR implies USE_NETCDF4 # We may have to add to these later. DISTCLEANFILES = @@ -64,11 +64,11 @@ zprovenance.h \ zfilter.h \ zdebug.h -if ENABLE_NCZARR_ZIP +if NETCDF_ENABLE_NCZARR_ZIP libnczarr_la_SOURCES += zmap_zip.c endif -if ENABLE_NCZARR_FILTERS +if NETCDF_ENABLE_NCZARR_FILTERS libnczarr_la_SOURCES += zfilter.c endif diff --git a/libnczarr/zattr.c b/libnczarr/zattr.c index 5b7cfb2b2..23fbb0428 100644 --- a/libnczarr/zattr.c +++ b/libnczarr/zattr.c @@ -102,7 +102,7 @@ ncz_get_att_special(NC_FILE_INFO_T* h5, NC_VAR_INFO_T* var, const char* name, /* Handle the per-var case(s) first */ if(var != NULL) { -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS if(strcmp(name,NC_ATT_CODECS)==0) { NClist* filters = (NClist*)var->filters; diff --git a/libnczarr/zclose.c b/libnczarr/zclose.c index a84f08048..7515bfcce 100644 --- a/libnczarr/zclose.c +++ b/libnczarr/zclose.c @@ -161,7 +161,7 @@ NCZ_zclose_var1(NC_VAR_INFO_T* var) nullfree(zatt); att->format_att_info = NULL; /* avoid memory errors */ } -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS /* Reclaim filters */ if(var->filters != NULL) { (void)NCZ_filter_freelists(var); diff --git a/libnczarr/zdispatch.c b/libnczarr/zdispatch.c index cdf80af05..f37942198 100644 --- a/libnczarr/zdispatch.c +++ b/libnczarr/zdispatch.c @@ -157,7 +157,7 @@ NCZ_show_metadata(int ncid) return NC_NOERR; } -#ifndef ENABLE_NCZARR_FILTERS +#ifndef NETCDF_ENABLE_NCZARR_FILTERS int NCZ_def_var_filter(int ncid, int varid, unsigned int id , size_t n , const unsigned int *params) { @@ -199,7 +199,7 @@ NCZ_inq_filter_avail(int ncid, unsigned id) } -#endif /*ENABLE_NCZARR_FILTERS*/ +#endif /*NETCDF_ENABLE_NCZARR_FILTERS*/ /**************************************************/ /* Following functions call into libsrc4 */ diff --git a/libnczarr/zfilter.c b/libnczarr/zfilter.c index 07e6d7d3b..bf1eb8542 100644 --- a/libnczarr/zfilter.c +++ b/libnczarr/zfilter.c @@ -523,7 +523,7 @@ nc_var_filter_remove(int ncid, int varid, unsigned int filterid) } #endif -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS int NCZ_def_var_filter(int ncid, int varid, unsigned int id, size_t nparams, const unsigned int* params) @@ -743,7 +743,7 @@ done: return ZUNTRACE(stat); } -#endif /*ENABLE_NCZARR_FILTERS*/ +#endif /*NETCDF_ENABLE_NCZARR_FILTERS*/ /**************************************************/ /* Filter application functions */ @@ -760,7 +760,7 @@ NCZ_filter_initialize(void) codec_defaults = nclistnew(); NCZ_filter_initialized = 1; memset(loaded_plugins,0,sizeof(loaded_plugins)); -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS if((stat = NCZ_load_all_plugins())) goto done; #endif @@ -775,7 +775,7 @@ NCZ_filter_finalize(void) int i; ZTRACE(6,""); if(!NCZ_filter_initialized) goto done; -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS /* Reclaim all loaded filters */ #ifdef DEBUGL fprintf(stderr,">>> DEBUGL: finalize reclaim:\n"); diff --git a/libnczarr/zinternal.c b/libnczarr/zinternal.c index 9e4bfcb62..40c651757 100644 --- a/libnczarr/zinternal.c +++ b/libnczarr/zinternal.c @@ -82,7 +82,7 @@ NCZ_finalize_internal(void) { /* Reclaim global resources */ ncz_initialized = 0; -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS NCZ_filter_finalize(); #endif #ifdef ENABLE_S3 diff --git a/libnczarr/zmap.c b/libnczarr/zmap.c index 5b1c42c96..9edef06df 100644 --- a/libnczarr/zmap.c +++ b/libnczarr/zmap.c @@ -19,7 +19,7 @@ nczmap_features(NCZM_IMPL impl) { switch (impl) { case NCZM_FILE: return zmap_file.features; -#ifdef ENABLE_NCZARR_ZIP +#ifdef NETCDF_ENABLE_NCZARR_ZIP case NCZM_ZIP: return zmap_zip.features; #endif #ifdef ENABLE_S3 @@ -52,7 +52,7 @@ nczmap_create(NCZM_IMPL impl, const char *path, int mode, size64_t flags, void* stat = zmap_file.create(path, mode, flags, parameters, &map); if(stat) goto done; break; -#ifdef ENABLE_NCZARR_ZIP +#ifdef NETCDF_ENABLE_NCZARR_ZIP case NCZM_ZIP: stat = zmap_zip.create(path, mode, flags, parameters, &map); if(stat) goto done; @@ -90,7 +90,7 @@ nczmap_open(NCZM_IMPL impl, const char *path, int mode, size64_t flags, void* pa stat = zmap_file.open(path, mode, flags, parameters, &map); if(stat) goto done; break; -#ifdef ENABLE_NCZARR_ZIP +#ifdef NETCDF_ENABLE_NCZARR_ZIP case NCZM_ZIP: stat = zmap_zip.open(path, mode, flags, parameters, &map); if(stat) goto done; @@ -122,7 +122,7 @@ nczmap_truncate(NCZM_IMPL impl, const char *path) case NCZM_FILE: if((stat = zmap_file.truncate(path))) goto done; break; -#ifdef ENABLE_NCZARR_ZIP +#ifdef NETCDF_ENABLE_NCZARR_ZIP case NCZM_ZIP: if((stat = zmap_zip.truncate(path))) goto done; break; diff --git a/libnczarr/zmap.h b/libnczarr/zmap.h index c8e022c31..1c1458c2d 100644 --- a/libnczarr/zmap.h +++ b/libnczarr/zmap.h @@ -217,7 +217,7 @@ extern NCZMAP_DS_API zmap_file; #ifdef USE_HDF5 extern NCZMAP_DS_API zmap_nz4; #endif -#ifdef ENABLE_NCZARR_ZIP +#ifdef NETCDF_ENABLE_NCZARR_ZIP extern NCZMAP_DS_API zmap_zip; #endif #ifdef ENABLE_S3 diff --git a/libnczarr/zsync.c b/libnczarr/zsync.c index f2be0f570..59f1502b7 100644 --- a/libnczarr/zsync.c +++ b/libnczarr/zsync.c @@ -296,7 +296,7 @@ ncz_sync_var_meta(NC_FILE_INFO_T* file, NC_VAR_INFO_T* var, int isclose) int purezarr = 0; size64_t shape[NC_MAX_VAR_DIMS]; NCZ_VAR_INFO_T* zvar = var->format_var_info; -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS NClist* filterchain = NULL; NCjson* jfilter = NULL; #endif @@ -316,7 +316,7 @@ ncz_sync_var_meta(NC_FILE_INFO_T* file, NC_VAR_INFO_T* var, int isclose) if((stat = NCZ_adjust_var_cache(var))) goto done; /* rebuild the fill chunk */ if((stat = NCZ_ensure_fill_chunk(zvar->cache))) goto done; -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS /* Build the filter working parameters for any filters */ if((stat = NCZ_filter_setup(var))) goto done; #endif @@ -413,7 +413,7 @@ ncz_sync_var_meta(NC_FILE_INFO_T* file, NC_VAR_INFO_T* var, int isclose) /* From V2 Spec: A JSON object identifying the primary compression codec and providing configuration parameters, or ``null`` if no compressor is to be used. */ if((stat = NCJaddstring(jvar,NCJ_STRING,"compressor"))) goto done; -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS filterchain = (NClist*)var->filters; if(nclistlength(filterchain) > 0) { struct NCZ_Filter* filter = (struct NCZ_Filter*)nclistget(filterchain,nclistlength(filterchain)-1); @@ -435,7 +435,7 @@ ncz_sync_var_meta(NC_FILE_INFO_T* file, NC_VAR_INFO_T* var, int isclose) /* A list of JSON objects providing codec configurations, or ``null`` if no filters are to be applied. */ if((stat = NCJaddstring(jvar,NCJ_STRING,"filters"))) goto done; -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS if(nclistlength(filterchain) > 1) { size_t k; /* jtmp holds the array of filters */ @@ -1486,7 +1486,7 @@ define_vars(NC_FILE_INFO_T* file, NC_GRP_INFO_T* grp, NClist* varnames) int vtypelen = 0; int rank = 0; int zarr_rank = 0; /* Need to watch out for scalars */ -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS NCjson* jfilter = NULL; int chainindex = 0; #endif @@ -1736,7 +1736,7 @@ define_vars(NC_FILE_INFO_T* file, NC_GRP_INFO_T* grp, NClist* varnames) object MUST contain a "id" key identifying the codec to be used. */ /* Do filters key before compressor key so final filter chain is in correct order */ { -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS if(var->filters == NULL) var->filters = (void*)nclistnew(); if(zvar->incompletefilters == NULL) zvar->incompletefilters = (void*)nclistnew(); chainindex = 0; /* track location of filter in the chain */ @@ -1759,7 +1759,7 @@ define_vars(NC_FILE_INFO_T* file, NC_GRP_INFO_T* grp, NClist* varnames) /* compressor key */ /* From V2 Spec: A JSON object identifying the primary compression codec and providing configuration parameters, or ``null`` if no compressor is to be used. */ -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS { if(var->filters == NULL) var->filters = (void*)nclistnew(); if((stat = NCZ_filter_initialize())) goto done; @@ -1783,7 +1783,7 @@ define_vars(NC_FILE_INFO_T* file, NC_GRP_INFO_T* grp, NClist* varnames) } } -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS if(!suppress) { /* At this point, we can finalize the filters */ if((stat = NCZ_filter_setup(var))) goto done; diff --git a/libnczarr/zvar.c b/libnczarr/zvar.c index 607a35185..b10df70c0 100644 --- a/libnczarr/zvar.c +++ b/libnczarr/zvar.c @@ -389,7 +389,7 @@ NCZ_def_var(int ncid, const char *name, nc_type xtype, int ndims, var->meta_read = NC_TRUE; var->atts_read = NC_TRUE; -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS /* Set the filter list */ assert(var->filters == NULL); var->filters = (void*)nclistnew(); @@ -558,7 +558,7 @@ ncz_def_var_extra(int ncid, int varid, int *shuffle, int *unused1, /* Can't turn on parallel and deflate/fletcher32/szip/shuffle * before HDF5 1.10.3. */ -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS #ifndef HDF5_SUPPORTS_PAR_FILTERS if (h5->parallel == NC_TRUE) if (nclistlength(((NClist*)var->filters)) > 0 || fletcher32 || shuffle) diff --git a/libnczarr/zxcache.c b/libnczarr/zxcache.c index f50ec99a7..957ed1525 100644 --- a/libnczarr/zxcache.c +++ b/libnczarr/zxcache.c @@ -675,7 +675,7 @@ put_chunk(NCZChunkCache* cache, NCZCacheEntry* entry) } -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS /* Make sure the entry is in filtered state */ if(!entry->isfiltered) { NC_VAR_INFO_T* var = cache->var; @@ -792,7 +792,7 @@ get_chunk(NCZChunkCache* cache, NCZCacheEntry* entry) if((stat = NCZ_copy_data(file,cache->var,cache->fillchunk,cache->chunkcount,ZREADING,entry->data))) goto done; stat = NC_NOERR; } -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS /* Make sure the entry is in unfiltered state */ if(!empty && entry->isfiltered) { NC_VAR_INFO_T* var = cache->var; diff --git a/nc-config.cmake.in b/nc-config.cmake.in index 0d9950f6c..0c4582702 100644 --- a/nc-config.cmake.in +++ b/nc-config.cmake.in @@ -102,7 +102,7 @@ else has_parallel="yes" fi -has_nczarr="@ENABLE_NCZARR@" +has_nczarr="@NETCDF_ENABLE_NCZARR@" if [ -z "$has_nczarr" -o "$has_nczarr" = "OFF" -o "$has_nczarr" = "FALSE" ]; then has_nczarr="no" else diff --git a/nc_test4/tst_quantize.c b/nc_test4/tst_quantize.c index c2694e7a9..dd083bd55 100644 --- a/nc_test4/tst_quantize.c +++ b/nc_test4/tst_quantize.c @@ -1333,7 +1333,7 @@ main(int argc, char **argv) if (nc_def_var_quantize(ncid, varid2, NC_QUANTIZE_BITGROOM, NSD_3)) ERR; #ifdef TESTNCZARR -#ifdef ENABLE_NCZARR_FILTERS +#ifdef NETCDF_ENABLE_NCZARR_FILTERS /* Set up zlib compression. This will work better because the * data are quantized, yielding a smaller output file. We will * set compression level to 1, which is usually the best diff --git a/ncdump/ncfilteravail.c b/ncdump/ncfilteravail.c index 5c5ae366c..aae8d2c5a 100644 --- a/ncdump/ncfilteravail.c +++ b/ncdump/ncfilteravail.c @@ -84,7 +84,7 @@ getformat(const char* sformat) #ifdef USE_HDF5 return NC_FORMATX_NC4; #else -# ifdef ENABLE_NCZARR +# ifdef NETCDF_ENABLE_NCZARR return NC_FORMATX_NCZARR; # endif #endif diff --git a/nczarr_test/CMakeLists.txt b/nczarr_test/CMakeLists.txt index e5b782388..5c690957c 100644 --- a/nczarr_test/CMakeLists.txt +++ b/nczarr_test/CMakeLists.txt @@ -200,7 +200,7 @@ IF(ENABLE_TESTS) add_sh_test(nczarr_test run_fillonlyz) ENDIF() - IF(ENABLE_NCZARR_FILTERS) + IF(NETCDF_ENABLE_NCZARR_FILTERS) IF(NETCDF_ENABLE_FILTER_TESTING) build_bin_test(test_nczfilter) build_bin_test(test_filter_vlen) @@ -219,9 +219,9 @@ IF(ENABLE_TESTS) ADD_SH_TEST(nczarr_test run_unknown) ENDIF(FALSE) ENDIF(NETCDF_ENABLE_FILTER_TESTING) - ENDIF(ENABLE_NCZARR_FILTERS) + ENDIF(NETCDF_ENABLE_NCZARR_FILTERS) - if(ENABLE_NCZARR_ZIP) + if(NETCDF_ENABLE_NCZARR_ZIP) add_sh_test(nczarr_test run_newformat) # Test various corrupted files ADD_SH_TEST(nczarr_test run_corrupt.sh) diff --git a/nczarr_test/Makefile.am b/nczarr_test/Makefile.am index 66f3607ad..9ca26ba90 100644 --- a/nczarr_test/Makefile.am +++ b/nczarr_test/Makefile.am @@ -104,7 +104,7 @@ endif #NETCDF_BUILD_UTILITIES if NETCDF_BUILD_UTILITIES -if ENABLE_NCZARR_ZIP +if NETCDF_ENABLE_NCZARR_ZIP TESTS += run_newformat.sh endif @@ -136,7 +136,7 @@ endif endif # BUILD_BENCHMARKS -if ENABLE_NCZARR_FILTERS +if NETCDF_ENABLE_NCZARR_FILTERS if NETCDF_ENABLE_FILTER_TESTING check_PROGRAMS += test_filter_avail test_filter_vlen @@ -162,7 +162,7 @@ XFAIL_TESTS = run_filter.sh run_specific_filters.sh run_nczfilter.sh endif # ISMINGW endif #NETCDF_ENABLE_FILTER_TESTING -endif #ENABLE_NCZARR_FILTERS +endif #NETCDF_ENABLE_NCZARR_FILTERS # Test various corrupted files TESTS += run_corrupt.sh diff --git a/nczarr_test/ncdumpchunks.c b/nczarr_test/ncdumpchunks.c index e4da59f1d..0c93ca8c9 100644 --- a/nczarr_test/ncdumpchunks.c +++ b/nczarr_test/ncdumpchunks.c @@ -28,7 +28,7 @@ #include #endif -#ifdef ENABLE_NCZARR +#ifdef NETCDF_ENABLE_NCZARR #include "zincludes.h" #endif @@ -38,7 +38,7 @@ #ifdef USE_HDF5 #define H5 #endif -#ifdef ENABLE_NCZARR +#ifdef NETCDF_ENABLE_NCZARR #define NZ #endif diff --git a/nczarr_test/test_chunkcases.c b/nczarr_test/test_chunkcases.c index 7241a8cf3..6b5f2db30 100644 --- a/nczarr_test/test_chunkcases.c +++ b/nczarr_test/test_chunkcases.c @@ -8,7 +8,7 @@ #include "ncpathmgr.h" #include "nclist.h" -#ifdef ENABLE_NCZARR +#ifdef NETCDF_ENABLE_NCZARR #include "zincludes.h" #endif diff --git a/nczarr_test/test_unlim_io.c b/nczarr_test/test_unlim_io.c index ed78c6a48..9f06fa685 100644 --- a/nczarr_test/test_unlim_io.c +++ b/nczarr_test/test_unlim_io.c @@ -9,7 +9,7 @@ #include "ncpathmgr.h" #include "nclist.h" -#ifdef ENABLE_NCZARR +#ifdef NETCDF_ENABLE_NCZARR #include "zincludes.h" #endif diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 332024552..90cd17320 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -133,7 +133,7 @@ endif() if(Blosc_FOUND) installplugin(h5blosc) endif() -if(ENABLE_NCZARR) +if(NETCDF_ENABLE_NCZARR) installplugin(h5fletcher32) installplugin(h5shuffle) installplugin(h5deflate) diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 275f2a771..9c4072e13 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -76,7 +76,7 @@ lib__nch5zstd_la_SOURCES = H5Zzstd.c H5Zzstd.h plugins_to_install += lib__nch5zstd.la endif -if ENABLE_NCZARR_FILTERS +if NETCDF_ENABLE_NCZARR_FILTERS # The NCZarr codec libraries (they need libnetcdf) lib__nczstdfilters_la_SOURCES = NCZstdfilters.c lib__nczstdfilters_la_LIBADD = $(LIBADD) $(top_builddir)/liblib/libnetcdf.la