Skip to content

Commit 821f69f

Browse files
authored
Merge branch 'main' into updatedocs.dmh
2 parents cd3fa1b + ee7039c commit 821f69f

84 files changed

Lines changed: 1621 additions & 956 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/run_tests_osx.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
name: Run macOS-based netCDF Tests
88

99

10-
on: [pull_request,push]
10+
on: [pull_request]
1111

1212
jobs:
1313

.github/workflows/run_tests_ubuntu.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
name: Run Ubuntu/Linux netCDF Tests
66

7-
on: [ pull_request ]
7+
on: [pull_request]
88

99
jobs:
1010

@@ -82,7 +82,7 @@ jobs:
8282
key: hdf5-parallel-${{ runner.os }}-${{ matrix.hdf5 }}
8383

8484

85-
- name: Build libhdf5-${{ matrix.hdf5 }}
85+
- name: Build libhdf5-${{ matrix.hdf5 }}-pnetcdf-1.12.3
8686
if: steps.cache-hdf5.outputs.cache-hit != 'true'
8787
run: |
8888
set -x
@@ -100,6 +100,13 @@ jobs:
100100
make -j
101101
make install -j
102102
popd
103+
wget https://parallel-netcdf.github.io/Release/pnetcdf-1.12.3.tar.gz
104+
tar -zxf pnetcdf-1.12.3.tar.gz
105+
pushd pnetcdf-1.12.3
106+
CC=mpicc ./configure --disable-static --enable-shared --prefix=${HOME}/environments/${{ matrix.hdf5 }}
107+
make -j
108+
make install -j
109+
popd
103110
104111
#####
105112
# One-Off Autotools-based tests.
@@ -233,7 +240,7 @@ jobs:
233240

234241
- name: Configure
235242
shell: bash -l {0}
236-
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} CC=mpicc ./configure --enable-hdf4 --enable-hdf5 --enable-dap --disable-dap-remote-tests
243+
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} CC=mpicc ./configure --enable-hdf4 --enable-hdf5 --enable-dap --disable-dap-remote-tests --enable-parallel-tests --enable-pnetcdf
237244
if: ${{ success() }}
238245

239246
- name: Look at config.log if error

CMakeLists.txt

Lines changed: 40 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -623,26 +623,6 @@ ENDIF(ENABLE_STRICT_NULL_BYTE_HEADER_PADDING)
623623
# 3. is nczarr enabled?
624624
# We need separate flags for cases 1 and 2
625625

626-
# We need to determine if libsz is available both for HDF5 and NCZarr
627-
# If user has specified the `SZIP_LIBRARY`, use it; otherwise try to find...
628-
IF(NOT SZIP_LIBRARY)
629-
FIND_LIBRARY(SZIP PATH NAMES szip sz sz2)
630-
IF(SZIP)
631-
SET(SZIP_LIBRARY ${SZIP})
632-
ELSE()
633-
UNSET(SZIP_LIBRARY)
634-
UNSET(SZIP)
635-
ENDIF()
636-
ENDIF()
637-
638-
IF(SZIP_LIBRARY)
639-
SET(SZIP_FOUND yes)
640-
SET(HAVE_SZ yes)
641-
ELSE()
642-
SET(SZIP_FOUND no)
643-
SET(HAVE_SZ no)
644-
ENDIF()
645-
646626
##
647627
# Option to Enable HDF5
648628
#
@@ -905,15 +885,6 @@ IF(USE_HDF5)
905885
int x = 1;}" USE_HDF5_SZIP)
906886
IF(USE_HDF5_SZIP)
907887
SET(HAVE_H5Z_SZIP yes)
908-
# If user has specified the `SZIP_LIBRARY`, use it; otherwise try to find...
909-
IF(SZIP_FOUND)
910-
SET(CMAKE_REQUIRED_LIBRARIES ${SZIP_LIBRARY} ${CMAKE_REQUIRED_LIBRARIES})
911-
MESSAGE(STATUS "HDF5 has szip.")
912-
ELSE()
913-
MESSAGE(FATAL_ERROR "HDF5 Requires SZIP, but cannot find libszip or libsz.")
914-
ENDIF()
915-
ELSE()
916-
SET(HAVE_H5Z_SZIP no)
917888
ENDIF()
918889

919890
####
@@ -1114,25 +1085,53 @@ string(TOLOWER "${filter}" downfilter)
11141085
IF(${filter}_FOUND)
11151086
INCLUDE_DIRECTORIES(${filter}_INCLUDE_DIRS})
11161087
SET(ENABLE_${upfilter} TRUE)
1117-
SET(STD_FILTERS "${STD_FILTERS},${downfilter}")
1088+
SET(HAVE_${upfilter} ON)
1089+
SET(STD_FILTERS "${STD_FILTERS} ${downfilter}")
1090+
MESSAGE(">>> Standard Filter: ${downfilter}")
11181091
ELSE()
11191092
SET(ENABLE_${upfilter} FALSE)
1093+
SET(HAVE_${upfilter} OFF)
11201094
ENDIF()
11211095
endmacro(set_std_filter)
11221096

11231097
# Locate some compressors
1098+
FIND_PACKAGE(Szip)
11241099
FIND_PACKAGE(Bz2)
11251100
FIND_PACKAGE(Blosc)
11261101
FIND_PACKAGE(Zstd)
11271102

11281103
# Accumulate standard filters
1129-
set(STD_FILTERS "deflate") # Always have deflate */
1130-
set_std_filter(SZIP)
1104+
set(STD_FILTERS "deflate") # Always have deflate*/
1105+
set_std_filter(Szip)
1106+
SET(HAVE_SZ ${Szip_FOUND})
11311107
set_std_filter(Blosc)
11321108
set_std_filter(Zstd)
1133-
set_std_filter(Bz2)
1134-
IF(NOT Bz2_FOUND)
1135-
set(STD_FILTERS "${STD_FILTERS},bzip2") # Always have bzip2 */
1109+
IF(Bz2_FOUND)
1110+
set_std_filter(Bz2)
1111+
ELSE()
1112+
# The reason we use a local version is to support a more comples test case
1113+
MESSAGE(WARNING "libbz2 not found using built-in version")
1114+
SET(HAVE_LOCAL_BZ2 ON)
1115+
SET(HAVE_BZ2 ON)
1116+
set(STD_FILTERS "${STD_FILTERS} bz2")
1117+
ENDIF()
1118+
1119+
1120+
# If user wants, then install selected plugins
1121+
SET(PLUGIN_INSTALL_DIR "" CACHE STRING "Whether and where we should install plugins")
1122+
SET(ENABLE_PLUGIN_INSTALL OFF)
1123+
if(DEFINED PLUGIN_INSTALL_DIR OR DEFINED CACHE{PLUGIN_INSTALL_DIR})
1124+
IF(PLUGIN_INSTALL_DIR STREQUAL "")
1125+
MESSAGE(WARNING "No plugin directory value specified; option ignored.")
1126+
UNSET(PLUGIN_INSTALL_DIR)
1127+
UNSET(PLUGIN_INSTALL_DIR CACHE)
1128+
SET(PLUGIN_INSTALL_DIR_SETTING "N.A.")
1129+
ELSE()
1130+
SET(PLUGIN_INSTALL_DIR_SETTING "${PLUGIN_INSTALL_DIR}")
1131+
SET(ENABLE_PLUGIN_INSTALL ON)
1132+
ENDIF()
1133+
ELSE()
1134+
SET(PLUGIN_INSTALL_DIR_SETTING "N.A.")
11361135
ENDIF()
11371136

11381137
# See if we have libzip
@@ -2442,6 +2441,7 @@ is_enabled(ENABLE_V2_API HAS_NC2)
24422441
is_enabled(ENABLE_NETCDF_4 HAS_NC4)
24432442
is_enabled(ENABLE_HDF4 HAS_HDF4)
24442443
is_enabled(USE_HDF5 HAS_HDF5)
2444+
is_enabled(OFF HAS_BENCHMARKS)
24452445
is_enabled(STATUS_PNETCDF HAS_PNETCDF)
24462446
is_enabled(STATUS_PARALLEL HAS_PARALLEL)
24472447
is_enabled(ENABLE_PARALLEL4 HAS_PARALLEL4)
@@ -2465,6 +2465,7 @@ is_enabled(ENABLE_LOGGING HAS_LOGGING)
24652465
is_enabled(ENABLE_FILTER_TESTING DO_FILTER_TESTS)
24662466
is_enabled(HAVE_SZ HAS_SZIP)
24672467
is_enabled(HAVE_SZ HAS_SZLIB_WRITE)
2468+
is_enabled(HAVE_ZSTD HAS_ZSTD)
24682469

24692470
# Generate file from template.
24702471
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libnetcdf.settings.in"
@@ -2520,6 +2521,10 @@ IF(ENABLE_NCZARR)
25202521
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nc_test4/findplugin.in ${CMAKE_CURRENT_BINARY_DIR}/nczarr_test/findplugin.sh @ONLY NEWLINE_STYLE LF)
25212522
ENDIF()
25222523

2524+
IF(ENABLE_PLUGINS)
2525+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nc_test4/findplugin.in ${CMAKE_CURRENT_BINARY_DIR}/plugins/findplugin.sh @ONLY NEWLINE_STYLE LF)
2526+
ENDIF()
2527+
25232528
IF(ENABLE_EXAMPLES)
25242529
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nc_test4/findplugin.in ${CMAKE_CURRENT_BINARY_DIR}/examples/C/findplugin.sh @ONLY NEWLINE_STYLE LF)
25252530
ENDIF()

RELEASE_NOTES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This file contains a high-level description of this package's evolution. Release
88
## 4.8.2 - TBD
99

1010
* [Enhancement] Update the documentation to match the current filter capabilities See [Github #2249](https://github.com/Unidata/netcdf-c/pull/2249).
11+
* [Enhancement] Support installation of pre-built standard filters into user-specified location. See [Github #2318](https://github.com/Unidata/netcdf-c/pull/2318).
1112
* [Enhancement] Improve filter support. More specifically (1) add nc_inq_filter_avail to check if a filter is available, (2) add the notion of standard filters, (3) cleanup szip support to fix interaction with NCZarr. See [Github #2245](https://github.com/Unidata/netcdf-c/pull/2245).
1213
* [Enhancement] Switch to tinyxml2 as the default xml parser implementation. See [Github #2170](https://github.com/Unidata/netcdf-c/pull/2170).
1314
* [Bug Fix] Require that the type of the variable in nc_def_var_filter is not variable length. See [Github #/2231](https://github.com/Unidata/netcdf-c/pull/2231).
@@ -68,7 +69,7 @@ This file contains a high-level description of this package's evolution. Release
6869
* [Enhancement] Add some optimizations to NCZarr, dosome cleanup of code cruft, add some NCZarr test cases, add a performance test to NCZarr. See [Github #1908](https://github.com/Unidata/netcdf-c/pull/1908) for more information.
6970
* [Bug Fix] Implement a better chunk cache system for NCZarr. The cache now uses extendible hashing plus a linked list for provide a combination of expandibility, fast access, and LRU behavior. See [Github #1887](https://github.com/Unidata/netcdf-c/pull/1887) for more information.
7071
* [Enhancement] Provide .rc fields for S3 authentication: HTTP.S3.ACCESSID and HTTP.S3.SECRETKEY.
71-
* [Enhancement] Give the client control over what parts of a DAP2 URL are URL encoded (i.e. %xx). This is to support the different decoding rules that servers apply to incoming URLS. See [Github #1884](https://github.com/Unidata/netcdf-c/pull/1844) for more information.
72+
* [Enhancement] Give the client control over what parts of a DAP2 URL are URL encoded (i.e. %xx). This is to support the different decoding rules that servers apply to incoming URLS. See [Github #1884](https://github.com/Unidata/netcdf-c/pull/1884) for more information.
7273
* [Bug Fix] Fix incorrect time offsets from `ncdump -t`, in some cases when the time `units` attribute contains both a **non-zero** time-of-day, and a time zone suffix containing the letter "T", such as "UTC". See [Github #1866](https://github.com/Unidata/netcdf-c/pull/1866) for more information.
7374
* [Bug Fix] Cleanup the NCZarr S3 build options. See [Github #1869](https://github.com/Unidata/netcdf-c/pull/1869) for more information.
7475
* [Bug Fix] Support aligned access for selected ARM processors. See [Github #1871](https://github.com/Unidata/netcdf-c/pull/1871) for more information.

cmake/modules/FindBzip2.cmake

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Searches for an installation of the bzip2 library. On success, it sets the following variables:
2+
#
3+
# Bzip2_FOUND Set to true to indicate the bzip2 library was found
4+
# Bzip2_INCLUDE_DIRS The directory containing the header file bzip2/bzip2.h
5+
# Bzip2_LIBRARIES The libraries needed to use the bzip2 library
6+
#
7+
# To specify an additional directory to search, set Bzip2_ROOT.
8+
#
9+
# Author: Siddhartha Chaudhuri, 2009
10+
#
11+
12+
# Look for the header, first in the user-specified location and then in the system locations
13+
SET(Bzip2_INCLUDE_DOC "The directory containing the header file bzip2.h")
14+
FIND_PATH(Bzip2_INCLUDE_DIRS NAMES bzip2.h bzip2/bzip2.h PATHS ${Bzip2_ROOT} ${Bzip2_ROOT}/include DOC ${Bzip2_INCLUDE_DOC} NO_DEFAULT_PATH)
15+
IF(NOT Bzip2_INCLUDE_DIRS) # now look in system locations
16+
FIND_PATH(Bzip2_INCLUDE_DIRS NAMES bzlib.h DOC ${Bzip2_INCLUDE_DOC})
17+
ENDIF(NOT Bzip2_INCLUDE_DIRS)
18+
19+
SET(Bzip2_FOUND FALSE)
20+
21+
IF(Bzip2_INCLUDE_DIRS)
22+
SET(Bzip2_LIBRARY_DIRS ${Bzip2_INCLUDE_DIRS})
23+
24+
IF("${Bzip2_LIBRARY_DIRS}" MATCHES "/include$")
25+
# Strip off the trailing "/include" in the path.
26+
GET_FILENAME_COMPONENT(Bzip2_LIBRARY_DIRS ${Bzip2_LIBRARY_DIRS} PATH)
27+
ENDIF("${Bzip2_LIBRARY_DIRS}" MATCHES "/include$")
28+
29+
IF(EXISTS "${Bzip2_LIBRARY_DIRS}/lib")
30+
SET(Bzip2_LIBRARY_DIRS ${Bzip2_LIBRARY_DIRS}/lib)
31+
ENDIF(EXISTS "${Bzip2_LIBRARY_DIRS}/lib")
32+
33+
# Find Bzip2 libraries
34+
FIND_LIBRARY(Bzip2_DEBUG_LIBRARY NAMES bzip2d bzip2_d libbzip2d libbzip2_d libbzip2
35+
PATH_SUFFIXES Debug ${CMAKE_LIBRARY_ARCHITECTURE} ${CMAKE_LIBRARY_ARCHITECTURE}/Debug
36+
PATHS ${Bzip2_LIBRARY_DIRS} NO_DEFAULT_PATH)
37+
FIND_LIBRARY(Bzip2_RELEASE_LIBRARY NAMES bzip2 libbzip2
38+
PATH_SUFFIXES Release ${CMAKE_LIBRARY_ARCHITECTURE} ${CMAKE_LIBRARY_ARCHITECTURE}/Release
39+
PATHS ${Bzip2_LIBRARY_DIRS} NO_DEFAULT_PATH)
40+
41+
SET(Bzip2_LIBRARIES )
42+
IF(Bzip2_DEBUG_LIBRARY AND Bzip2_RELEASE_LIBRARY)
43+
SET(Bzip2_LIBRARIES debug ${Bzip2_DEBUG_LIBRARY} optimized ${Bzip2_RELEASE_LIBRARY})
44+
ELSEIF(Bzip2_DEBUG_LIBRARY)
45+
SET(Bzip2_LIBRARIES ${Bzip2_DEBUG_LIBRARY})
46+
ELSEIF(Bzip2_RELEASE_LIBRARY)
47+
SET(Bzip2_LIBRARIES ${Bzip2_RELEASE_LIBRARY})
48+
ENDIF(Bzip2_DEBUG_LIBRARY AND Bzip2_RELEASE_LIBRARY)
49+
50+
IF(Bzip2_LIBRARIES)
51+
SET(Bzip2_FOUND TRUE)
52+
ENDIF(Bzip2_LIBRARIES)
53+
ENDIF(Bzip2_INCLUDE_DIRS)
54+
55+
IF(Bzip2_FOUND)
56+
# IF(NOT Bzip2_FIND_QUIETLY)
57+
MESSAGE(STATUS "Found Bzip2: headers at ${Bzip2_INCLUDE_DIRS}, libraries at ${Bzip2_LIBRARY_DIRS}")
58+
MESSAGE(STATUS " library is ${Bzip2_LIBRARIES}")
59+
# ENDIF(NOT Bzip2_FIND_QUIETLY)
60+
ELSE(Bzip2_FOUND)
61+
IF(Bzip2_FIND_REQUIRED)
62+
MESSAGE(FATAL_ERROR "Bzip2 library not found")
63+
ENDIF(Bzip2_FIND_REQUIRED)
64+
ENDIF(Bzip2_FOUND)

0 commit comments

Comments
 (0)