Skip to content

Commit

Permalink
Merge pull request #400 from Unidata/v4.6.1-wellspring.wif
Browse files Browse the repository at this point in the history
Merge v4.6.1 wellspring back in to `main` development branch.
  • Loading branch information
WardF authored May 22, 2023
2 parents 68a32f8 + 66683ed commit 5f02e6a
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 21 deletions.
32 changes: 24 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set(PACKAGE "${NC4F_CTEST_PROJECT_NAME}" CACHE STRING "")
#Project Version
SET(NC4F_VERSION_MAJOR 4)
SET(NC4F_VERSION_MINOR 6)
SET(NC4F_VERSION_PATCH 1)
SET(NC4F_VERSION_PATCH 2)
SET(NC4F_VERSION_NOTE "-development")
SET(NC4F_VERSION ${NC4F_VERSION_MAJOR}.${NC4F_VERSION_MINOR}.${NC4F_VERSION_PATCH}${NC4F_VERSION_NOTE})
SET(VERSION ${NC4F_VERSION})
Expand Down Expand Up @@ -685,16 +685,22 @@ IF(NOT DISABLE_ZSTANDARD_PLUGIN)
#if !NC_HAS_ZSTD
choke me
#endif
int main() {return 0;}" HAVE_ZSTD)
int main() {return 0;}" NC_HAVE_ZSTD)

IF(HAVE_ZSTD)
MESSAGE(STATUS "Checking for HDF5_PLUGIN_PATH: " $ENV{HDF5_PLUGIN_PATH})
IF(NC_HAVE_ZSTD)
IF(NOT DEFINED ENV{HDF5_PLUGIN_PATH})
MESSAGE(WARNING "libnetcdf was built with zstd support, but HDF5_PLUGIN_PATH is not set. Please set the HDF5_PLUGIN_PATH environmental variable if zstandard tests fail, or pass -DDISABLE_ZSTANDARD_PLUGIN=TRUE when running cmake.")
SET(NF_HAVE_ZSTD FALSE)
SET(NF_HDF5_PLUGIN_PATH "")
ELSE()
MESSAGE(STATUS "HDF5_PLUGIN_PATH: $ENV{HDF5_PLUGIN_PATH}")
SET(NF_HAVE_ZSTD TRUE)
SET(NF_HDF5_PLUGIN_PATH "(HDF5_PLUGIN_PATH: $ENV{HDF5_PLUGIN_PATH}")
ENDIF()
ENDIF(HAVE_ZSTD)
ELSE()
SET(HAVE_ZSTD FALSE)
ENDIF(NC_HAVE_ZSTD)
ELSE(NOT DISABLE_ZSTANDARD_PLUGIN)
SET(NF_HAVE_ZSTD FALSE)
SET(NF_HDF5_PLUGIN_PATH "")
ENDIF(NOT DISABLE_ZSTANDARD_PLUGIN)
###
# End ZStd Stanza
Expand Down Expand Up @@ -1127,7 +1133,7 @@ is_enabled(ENABLE_DAP HAS_DAP)
is_enabled(USE_NETCDF_V2 HAS_NC2)
is_enabled(USE_NETCDF4 HAS_NC4)
is_enabled(HAVE_SZIP_WRITE HAS_SZIP_WRITE)
is_enabled(HAVE_ZSTD HAS_ZSTD)
is_enabled(NF_HAVE_ZSTD HAS_ZSTD)
is_enabled(HAVE_QUANTIZE HAS_QUANTIZE)
is_enabled(USE_LOGGING HAS_LOGGING)
is_enabled(ENABLE_CDF5 HAS_CDF5)
Expand All @@ -1145,6 +1151,16 @@ CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libnetcdff.settings.in"
FILE(READ "${CMAKE_CURRENT_BINARY_DIR}/libnetcdff.settings"
LIBNETCDFF_SETTINGS)
MESSAGE(${LIBNETCDFF_SETTINGS})
IF(NC_HAVE_ZSTD)
IF(NOT NF_HAVE_ZSTD)
MESSAGE(STATUS "ATTENTION: NO HDF5_PLUGIN_PATH SET")
IF(NOT DEFINED ENV{HDF5_PLUGIN_PATH})
MESSAGE(WARNING "libnetcdf was built with zstd support, but HDF5_PLUGIN_PATH is not set. Please set the HDF5_PLUGIN_PATH environmental variable if zstandard tests fail.")
MESSAGE(WARNING "You can use `nc-config --plugindir` to determine the appropriate value for HDF5_PLUGIN_PATH")
ENDIF()
ENDIF(NOT NF_HAVE_ZSTD)
ENDIF(NC_HAVE_ZSTD)


# Install libnetcdf.settings file into same location
# as the libraries.
Expand Down
23 changes: 20 additions & 3 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,30 @@ Release Notes {#nf_release_notes}
This file contains a high-level description of this package's evolution.
Entries are in reverse chronological order (most recent first).

## 4.6.1 - TBD
## 4.6.1 - May 19, 2023

### Requirements

### Notable Changes
* netCDF-C: 4.9.0+

### Other Changes
Note: to enable `libzstd` support, you need to satisfy the following requirements.

1. `libnetcdf.so` installed with `libzstd` support.
2. The environmental variable `HDF5_LIBRARY_PATH` needs to be specified to the same location used when installing `libnetcdf`. This can be determined after-the-fact using `nc-config --plugindir`.


### What's Changed
* Add quantize constants and test by @edwardhartnett in https://github.com/Unidata/netcdf-fortran/pull/383
* Merge v4.6.0-wellspring.wif back upstream into `main` by @WardF in https://github.com/Unidata/netcdf-fortran/pull/374
* delete unuseful code by @DragonPara in https://github.com/Unidata/netcdf-fortran/pull/377
* Adding MacOS tests. by @WardF in https://github.com/Unidata/netcdf-fortran/pull/363
* Newbranch by @LeonABenjamin in https://github.com/Unidata/netcdf-fortran/pull/336


## New Contributors
* @DragonPara made their first contribution in https://github.com/Unidata/netcdf-fortran/pull/377

**Full Changelog**: https://github.com/Unidata/netcdf-fortran/compare/v4.6.0...v4.9.1

## 4.6.0 - July 29, 2022

Expand Down
41 changes: 34 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
AC_PREREQ([2.59])

# Initialize with name, version, and support email address.
AC_INIT([netCDF-Fortran], [4.6.1-development], [[email protected]])
AC_INIT([netCDF-Fortran], [4.6.2-development], [[email protected]])

# Create the VERSION file, which contains the package version from
# AC_INIT.
Expand Down Expand Up @@ -76,10 +76,6 @@ if test "x$enable_zstandard_plugin" = xyes; then
choke me
#endif]])], [nc_has_zstd=yes], [nc_has_zstd=no])

if test "x$nc_has_zstd" = xyes; then

AC_DEFINE([ENABLE_ZSTD], [1], [Enable Zstandard compression support])
fi
AC_MSG_RESULT([$nc_has_zstd])

if test "x$nc_has_zstd" = xyes; then
Expand All @@ -89,10 +85,18 @@ if test "x$enable_zstandard_plugin" = xyes; then
AC_MSG_WARN([libnetcdf was built with zstd support, but HDF5_PLUGIN_PATH is not set. Either set the HDF5_PLUGIN_PATH environmental variable if zstandard tests fail, or use --disable-zstandard-plugin when running configure.])
AC_MSG_WARN([------------------------------------------])
AC_MSG_WARN([ ])
nf_has_zstd=no
nc_hdf5_plugin_path=""
else
nf_has_zstd=yes
nc_hdf5_plugin_path="(HDF5_PLUGIN_PATH: ${HDF5_PLUGIN_PATH})"
AC_DEFINE([ENABLE_ZSTD], [1], [Enable Zstandard compression support])
fi
else
nf_has_zstd=no
fi
else
nc_has_zstd=no
nf_has_zstd=no
fi
###
# End Zstandard logic stanza
Expand Down Expand Up @@ -594,6 +598,7 @@ AM_CONDITIONAL([BUILD_PARALLEL4], [test "x$nc_has_parallel4" = xyes])
AM_CONDITIONAL([BUILD_PARALLEL], [test "x$nc_has_pnetcdf" = xyes -o "x$nc_has_parallel4" = xyes])
AM_CONDITIONAL([TEST_FILTERS], [test "x$enable_filter_test" = xyes])


AC_CHECK_HEADER(stdlib.h, ,AC_DEFINE([NO_STDLIB_H], [], [no stdlib.h]))
AC_CHECK_HEADER(sys/types.h, ,AC_DEFINE([NO_SYS_TYPES_H], [], [no sys_types.h]))
AC_CHECK_HEADERS([sys/param.h])
Expand Down Expand Up @@ -662,13 +667,14 @@ AC_SUBST(HAS_DAP,[$nc_has_dap])
AC_SUBST(HAS_NC2,[$nc_build_v2])
AC_SUBST(HAS_NC4,[$nc_build_v4])
AC_SUBST(HAS_SZIP_WRITE,[$nc_has_szip_write])
AC_SUBST(HAS_ZSTD,[$nc_has_zstd])
AC_SUBST(HAS_ZSTD,[$nf_has_zstd])
AC_SUBST(HAS_QUANTIZE,[$nc_has_quantize])
AC_SUBST(HAS_LOGGING,[$nc_has_logging])
AC_SUBST(HAS_CDF5,[$nc_has_cdf5])
AC_SUBST(HAS_PNETCDF,[$nc_has_pnetcdf])
AC_SUBST(HAS_NC4_PARALLEL,[$nc_has_parallel4])
AC_SUBST(HAS_PARALLEL,[$nc_has_parallel])
AC_SUBST(NF_HDF5_PLUGIN_PATH, [$nc_hdf5_plugin_path])

# Some files need to exist in build directories that do not correspond
# to their source directory, or the test program makes an assumption
Expand Down Expand Up @@ -702,3 +708,24 @@ AC_CONFIG_FILES([Makefile
AC_OUTPUT()

cat libnetcdff.settings

##
# This can be done more elegantly, but for the sake of expediency
# we will do it this way.
##
if test "x$nc_has_zstd" = xyes; then
if test "x$nf_has_zstd" = xno; then
if test "x${HDF5_PLUGIN_PATH}" = "x"; then
echo ""
AC_MSG_WARN([ ])
AC_MSG_WARN([------------------------------------------])
AC_MSG_WARN([libnetcdf was built with zstd support, but HDF5_PLUGIN_PATH is not set, so zstd support is not enabled in libnetcdff. Set HDF5_PLUGIN_PATH and re-run configure if you want to enable zstd support.])
echo ""
AC_MSG_WARN([You can use `nc-config --plugindir` to determine the appropriate value for HDF5_PLUGIN_PATH])
AC_MSG_WARN([------------------------------------------])
AC_MSG_WARN([ ])
fi
fi
fi


2 changes: 1 addition & 1 deletion docs/Doxyfile.developer
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = netcdf-fortran
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 4.6.1-Development
PROJECT_NUMBER = 4.6.2-Development

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion fortran/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ lib_LTLIBRARIES = libnetcdff.la
# These linker flags specify libtool version info.
# See http://www.gnu.org/software/libtool/manual/libtool.html#Libtool-versioning
# for information regarding incrementing `-version-info`.
libnetcdff_la_LDFLAGS = -version-info 8:0:1
libnetcdff_la_LDFLAGS = -version-info 9:0:2

# These F90 codes are used for either netCDF classic or netCDF-4 F90
# API.
Expand Down
2 changes: 1 addition & 1 deletion libnetcdff.settings.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ Parallel IO: @HAS_PARALLEL@
NetCDF4 Parallel IO: @HAS_NC4_PARALLEL@
PnetCDF Parallel IO: @HAS_PNETCDF@
SZIP Write Support: @HAS_SZIP_WRITE@
Zstandard Support: @HAS_ZSTD@
Zstandard Support: @HAS_ZSTD@ @NF_HDF5_PLUGIN_PATH@
Quantize: @HAS_QUANTIZE@

0 comments on commit 5f02e6a

Please sign in to comment.