Skip to content

Commit

Permalink
Merge pull request #1 from Unidata/master
Browse files Browse the repository at this point in the history
Resync with master, 2020 Oct 16
  • Loading branch information
Dave-Allured authored Oct 17, 2020
2 parents f9dab7e + 45d2a44 commit d4109b2
Show file tree
Hide file tree
Showing 35 changed files with 83 additions and 91 deletions.
14 changes: 4 additions & 10 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@ This file contains a high-level description of this package's evolution. Release

## 4.8.0 - TBD


* [Bug Fix] Fix time zone parser bug. See more information at [Github #1866](https://github.com/Unidata/netcdf-c/pull/1866) for more information.
* [Documentation] Migrated the documents in the NUG/ directory to the dedicated NUG repository found at https://github.com/Unidata/netcdf
* [Bug Fix] Revert the internal filter code to simplify it. From
the user's point of view, the only visible change should be that
(1) the functions that convert text to filter specs have had
their signature reverted and renamed and have been moved to
netcdf_aux.h, and (2) Some filter API functions now return
NC_ENOFILTER when inquiry is made about some filter. Internally,
the dispatch table has been modified to get rid of the complex
structures.
* [Bug Fix] If the HDF5 byte-range Virtual File Driver is available )HDf5 1.10.6 or later) then use
it because it has better performance than the one currently built into the netcdf library.
* [Bug Fix] Revert the internal filter code to simplify it. From the user's point of view, the only visible change should be that (1) the functions that convert text to filter specs have had their signature reverted and renamed and have been moved to netcdf_aux.h, and (2) Some filter API functions now return NC_ENOFILTER when inquiry is made about some filter. Internally, the dispatch table has been modified to get rid of the complex structures.
* [Bug Fix] If the HDF5 byte-range Virtual File Driver is available )HDf5 1.10.6 or later) then use it because it has better performance than the one currently built into the netcdf library.
* [Bug Fix] Fixed byte-range support with cURL > 7.69. See [https://github.com/Unidata/netcdf-c/pull/1798].
* [Enhancement] Added new test for using compression with parallel I/O: nc_test4/tst_h_par_compress.c. See [https://github.com/Unidata/netcdf-c/pull/1784].
* [Bug Fix] Don't return error for extra calls to nc_redef() for netCDF/HDF5 files, unless classic model is in use. See [https://github.com/Unidata/netcdf-c/issues/1779].
Expand Down
2 changes: 1 addition & 1 deletion dap4_test/dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "netcdf.h"
#include "ncbytes.h"
#include "ncwinpath.h"
#include "ncpathmgr.h"

extern void NCD4_dumpbytes(size_t size, const void* data0, int swap);
extern void NCD4_tagdump(size_t size, const void* data0, int swap, const char* tag);
Expand Down
10 changes: 6 additions & 4 deletions debug/cf
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ FAST=1
#PROF=1
#BENCH=1

#NCZARR=1
#HDF5=1
NCZARR=1
HDF5=1
DAP=1
#S3=1
#S3TEST=1
#SZIP=1
SZIP=1
#HDF4=1
#PNETCDF=1
#PAR4=1
Expand Down Expand Up @@ -129,7 +129,7 @@ else
FLAGS="$FLAGS --disable-s3-sdk"
fi
if test "x$S3TEST" != x ; then
FLAGS="$FLAGS --enable-s3-tests"
FLAGS="$FLAGS --enable-nczarr-s3-tests"
export AWSSDK_DIR="${AWSSDK_DIR}"
LDFLAGS="$LDFLAGS $AWSSDK_DIR/bin/aws-cpp-sdk-s3.dll"
CPPFLAGS="$CPPFLAGS -I${AWSSDK_DIR}/include"
Expand All @@ -144,6 +144,8 @@ if test "x${BENCH}" = x1 ; then
FLAGS="$FLAGS --enable-benchmarks"
fi

FLAGS="$FLAGS --enable-byterange"

export PATH
export CC
export CPPFLAGS
Expand Down
64 changes: 31 additions & 33 deletions debug/cf.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Visual Studio

NCC="c:/tools/hdf5"
NCC="c:/tools/hdf5-1.10.6"
HDF5_DIR="$NCC/cmake/hdf5"
AWSSDK_DIR="c:/tools/aws-cpp-sdk-all"

# Is netcdf-4 and/or DAP enabled?
NCZARR=1
HDF5=1
DAP=1
S3=1
#S3=1
#S3TEST=1
#CDF5=1
#HDF4=1
Expand All @@ -25,26 +27,9 @@ notest|nt) NOTEST=1 ;;
esac
done

if test "x$VS" = x1 ; then
if test "x$2" = xsetup ; then
VSSETUP=1
else
unset VSSETUP
fi
fi

#TESTSERVERS="localhost:8080,remotetest.unidata.ucar.edu"

#export NCPATHDEBUG=1

if test "x$VSSETUP" = x1 ; then
CFG="Debug"
else
CFG="Release"
fi

FLAGS=

FLAGS="$FLAGS -DNC_FIND_SHARED_LIBS=ON"

if test "x$VS" != x -a "x$INSTALL" != x ; then
Expand All @@ -55,10 +40,13 @@ mkdir -p /tmp/netcdf

if test "x$NCZARR" != x ; then
FLAGS="$FLAGS -DENABLE_NCZARR=true"
else
FLAGS="$FLAGS -DENABLE_NCZARR=false"
fi

if test "x$DAP" = x ; then
FLAGS="$FLAGS -DENABLE_DAP=false"
#FLAGS="$FLAGS -DENABLE_DAP_REMOTE_TESTS=true"
fi

if test "x$HDF5" = x ; then
Expand All @@ -68,7 +56,7 @@ ignore=1
#FLAGS="$FLAGS -DDEFAULT_API_VERSION:STRING=v110"
#FLAGS="$FLAGS -DHDF5_ROOT=c:/tools/hdf5"
#FLAGS="$FLAGS -DHDF5_ROOT_DIR_HINT=c:/tools/hdf5/cmake/hdf5/hdf5-config.cmake"
FLAGS="$FLAGS -DHDF5_DIR=c:/tools/hdf5/cmake/hdf5"
FLAGS="$FLAGS -DHDF5_DIR=$HDF5_DIR"
#hdf5-config.cmake
#FLAGS="-DHDF5_LIBRARIES=${NCC}/lib/hdf5 -DHDF5_HL_LIBRARY=${NCC}/lib/hdf5_hl -DHDF5_INCLUDE_DIR=${NCC}/include"
fi
Expand All @@ -89,23 +77,21 @@ else
FLAGS="$FLAGS -DENABLE_S3_SDK=false"
fi
if test "x$S3TEST" != x ; then
FLAGS="$FLAGS -DENABLE_S3_TESTS=true"
FLAGS="$FLAGS -DENABLE_NCZARR_S3_TESTS=true"
FLAGS="$FLAGS -DAWSSDK_DIR=${AWSSDK_DIR}"
fi

# Enables
FLAGS="$FLAGS -DENABLE_DAP_REMOTE_TESTS=true"
FLAGS="$FLAGS -DENABLE_LOGGING=true"
FLAGS="$FLAGS -DENABLE_BYTERANGE=true"
#FLAGS="$FLAGS -DENABLE_DOXYGEN=true -DENABLE_INTERNAL_DOCS=true"
#FLAGS="$FLAGS -DENABLE_LARGE_FILE_TESTS=true"
#FLAGS="$FLAGS -DENABLE_FILTER_TESTING=true"

# Disables
FLAGS="$FLAGS -DENABLE_FILTER_TESTING=true"
FLAGS="$FLAGS -DENABLE_EXAMPLES=false"
FLAGS="$FLAGS -DENABLE_CONVERSION_WARNINGS=false"
#FLAGS="$FLAGS -DENABLE_CONVERSION_WARNINGS=false"
#FLAGS="$FLAGS -DENABLE_TESTS=false"
#FLAGS="$FLAGS -DENABLE_DISKLESS=false"
FLAGS="$FLAGS -DBUILD_UTILITIES=true"
FLAGS="$FLAGS -DENABLE_FILTER_TESTING=false"
#FLAGS="$FLAGS -DBUILD_UTILITIES=false"

FLAGS="$FLAGS -DCURL_NO_CURL_CMAKE=TRUE"

Expand All @@ -116,19 +102,31 @@ rm -fr build
mkdir build
cd build

NCLIB=`pwd`
NCWD=`pwd`

if test "x$VS" != x ; then

NCLIB=`cygpath -w ${NCWD}/liblib |tr -d ''`
NCCYGLIB=`cygpath -u ${NCLIB} |tr -d ''`
NCCBIN=`cygpath -u "${NCC}/bin" |tr -d ''`
AWSSDKBIN="/cygdrive/c/tools/aws-cpp-sdk-all/bin"

# Visual Studio
PATH="${NCCBIN}:$PATH:$NCCYGLIB"
if test "x$S3" != x ; then
PATH="$PATH:${AWSSDKBIN}"
fi
export PATH

export LD_LIBRARY_PATH="${NCCBIN}:$LD_LIBRARY_PATH:${AWSSDKBIN}:${NCCYGLIB}"

CFG="Release"
NCLIB="${NCLIB}/liblib"
export PATH="${NCLIB}:${PATH}"

#G=
#TR=--trace
cmake ${TR} "$G" -DCMAKE_BUILD_TYPE=${CFG} $FLAGS ..
if test "x$NOBUILD" = x ; then
cmake ${TR} --build . --config ${CFG}
cmake ${TR} --build . -v --config ${CFG}
#cmake ${TR} --build . --config ${CFG} --target ZERO_CHECK
#cmake ${TR} --build . --config ${CFG} --target ALL_BUILD
if test "x$NOTEST" = x ; then
Expand All @@ -137,7 +135,7 @@ fi
fi
else
# GCC
NCLIB="${NCLIB}/build/liblib"
NCLIB="${NCWD}/build/liblib"
#G="-GUnix Makefiles"
#T="--trace-expand"
cmake "${G}" $FLAGS ..
Expand Down
2 changes: 1 addition & 1 deletion include/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ncuri.h ncutf8.h ncdispatch.h ncdimscale.h netcdf_f.h err_macros.h \
ncbytes.h nchashmap.h ceconstraints.h rnd.h nclog.h ncconfigure.h \
nc4internal.h nctime.h nc3internal.h onstack.h ncrc.h ncauth.h \
ncoffsets.h nctestserver.h nc4dispatch.h nc3dispatch.h ncexternl.h \
ncwinpath.h ncindex.h hdf4dispatch.h hdf5internal.h nc_provenance.h \
ncpathmgr.h ncindex.h hdf4dispatch.h hdf5internal.h nc_provenance.h \
hdf5dispatch.h ncmodel.h isnan.h

if USE_DAP
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion libdap4/d4read.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See \ref copyright file for more info.
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include "ncwinpath.h"
#include "ncpathmgr.h"

/* Do conversion if this code was compiled via Vis. Studio or Mingw */

Expand Down
2 changes: 1 addition & 1 deletion libdispatch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# University Corporation for Atmospheric Research/Unidata.

# See netcdf-c/COPYRIGHT file for more info.
SET(libdispatch_SOURCES dparallel.c dcopy.c dfile.c ddim.c datt.c dattinq.c dattput.c dattget.c derror.c dvar.c dvarget.c dvarput.c dvarinq.c ddispatch.c nclog.c dstring.c dutf8.c dinternal.c doffsets.c ncuri.c nclist.c ncbytes.c nchashmap.c nctime.c nc.c nclistmgr.c utf8proc.h utf8proc.c dwinpath.c dutil.c drc.c dauth.c dreadonly.c dnotnc4.c dnotnc3.c crc32.c daux.c dinfermodel.c)
SET(libdispatch_SOURCES dparallel.c dcopy.c dfile.c ddim.c datt.c dattinq.c dattput.c dattget.c derror.c dvar.c dvarget.c dvarput.c dvarinq.c ddispatch.c nclog.c dstring.c dutf8.c dinternal.c doffsets.c ncuri.c nclist.c ncbytes.c nchashmap.c nctime.c nc.c nclistmgr.c utf8proc.h utf8proc.c dpathmgr.c dutil.c drc.c dauth.c dreadonly.c dnotnc4.c dnotnc3.c crc32.c daux.c dinfermodel.c)

# Netcdf-4 only functions. Must be defined even if not used
SET(libdispatch_SOURCES ${libdispatch_SOURCES} dgroup.c dvlen.c dcompound.c dtype.c denum.c dopaque.c dfilter.c)
Expand Down
2 changes: 1 addition & 1 deletion libdispatch/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ libdispatch_la_SOURCES = dparallel.c dcopy.c dfile.c ddim.c datt.c \
dattinq.c dattput.c dattget.c derror.c dvar.c dvarget.c dvarput.c \
dvarinq.c dinternal.c ddispatch.c dutf8.c nclog.c dstring.c ncuri.c \
nclist.c ncbytes.c nchashmap.c nctime.c nc.c nclistmgr.c dauth.c \
doffsets.c dwinpath.c dutil.c dreadonly.c dnotnc4.c dnotnc3.c crc32.c \
doffsets.c dpathmgr.c dutil.c dreadonly.c dnotnc4.c dnotnc3.c crc32.c \
crc32.h daux.c dinfermodel.c

# Add the utf8 codebase
Expand Down
2 changes: 1 addition & 1 deletion libdispatch/dauth.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ See COPYRIGHT for license information.
#include "ncuri.h"
#include "ncauth.h"
#include "nclog.h"
#include "ncwinpath.h"
#include "ncpathmgr.h"

#ifdef _MSC_VER
#include <windows.h>
Expand Down
2 changes: 1 addition & 1 deletion libdispatch/dfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

#include "ncdispatch.h"
#include "netcdf_mem.h"
#include "ncwinpath.h"
#include "ncpathmgr.h"
#include "fbits.h"

#undef DEBUG
Expand Down
2 changes: 1 addition & 1 deletion libdispatch/dinfermodel.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#endif

#include "ncdispatch.h"
#include "ncwinpath.h"
#include "ncpathmgr.h"
#include "netcdf_mem.h"
#include "fbits.h"
#include "ncbytes.h"
Expand Down
2 changes: 1 addition & 1 deletion libdispatch/dwinpath.c → libdispatch/dpathmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#endif

#include "ncexternl.h"
#include "ncwinpath.h"
#include "ncpathmgr.h"

extern char *realpath(const char *path, char *resolved_path);

Expand Down
2 changes: 1 addition & 1 deletion libdispatch/drc.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ See COPYRIGHT for license information.
#include "ncuri.h"
#include "ncrc.h"
#include "nclog.h"
#include "ncwinpath.h"
#include "ncpathmgr.h"

#define RCFILEENV "DAPRCFILE"

Expand Down
2 changes: 1 addition & 1 deletion libdispatch/durlmodel.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#endif

#include "ncdispatch.h"
#include "ncwinpath.h"
#include "ncpathmgr.h"
#include "ncurlmodel.h"

/*
Expand Down
2 changes: 1 addition & 1 deletion libdispatch/dutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "ncbytes.h"
#include "nclist.h"
#include "nclog.h"
#include "ncwinpath.h"
#include "ncpathmgr.h"

extern int mkstemp(char *template);

Expand Down
26 changes: 12 additions & 14 deletions libdispatch/nctime.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,25 +317,23 @@ cdParseRelunits(cdCalenType timetype, char* relunits, cdUnitTime* unit, cdCompTi
char basetime_1[CD_MAX_CHARTIME];
char basetime_2[CD_MAX_CHARTIME];
char basetime[2 * CD_MAX_CHARTIME + 1];
int nconv1, nconv2, nconv;
int nconv;

/* Parse the relunits */
/* Allow ISO-8601 "T" date-time separator as well as blank separator */
nconv1 = sscanf(relunits,"%s since %[^T]T%s",charunits,basetime_1,basetime_2);
if(nconv1==EOF || nconv1==0){
cdError("Error on relative units conversion, string = %s\n",relunits);
return 1;
/* Parse the relunits. First parse assuming white space only. */
nconv = sscanf(relunits,"%s since %s %s",charunits,basetime_1,basetime_2);

/* Handle ISO-8601 "T" date-time separator in place of blank separator. */
if (nconv!=EOF && nconv>=2) {
if (strchr (basetime_1, 'T') != NULL) {
nconv = sscanf(relunits,"%s since %[^T]T%s",charunits,basetime_1,basetime_2);
}
}
nconv2 = sscanf(relunits,"%s since %s %s",charunits,basetime_1,basetime_2);
if(nconv2==EOF || nconv2==0){

if(nconv==EOF || nconv==0){
cdError("Error on relative units conversion, string = %s\n",relunits);
return 1;
}
if(nconv1 < nconv2) {
nconv = nconv2;
} else {
nconv = sscanf(relunits,"%s since %[^T]T%s",charunits,basetime_1,basetime_2);
}

/* Get the units */
cdTrim(charunits,CD_MAX_RELUNITS);
if(!strncasecmp(charunits,"sec",3) || !strcasecmp(charunits,"s")){
Expand Down
2 changes: 1 addition & 1 deletion libnczarr/zmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

#include "zincludes.h"
#include "ncwinpath.h"
#include "ncpathmgr.h"

/**************************************************/
/* Import the current implementations */
Expand Down
2 changes: 1 addition & 1 deletion libnczarr/zmap_nz4.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "zincludes.h"

#include "fbits.h"
#include "ncwinpath.h"
#include "ncpathmgr.h"

/*
Do a simple mapping of our simplified map model
Expand Down
2 changes: 1 addition & 1 deletion libnczarr/zmap_nzf.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#endif

#include "fbits.h"
#include "ncwinpath.h"
#include "ncpathmgr.h"

#define VERIFY

Expand Down
2 changes: 1 addition & 1 deletion libsrc/memio.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "ncdispatch.h"
#include "nc3internal.h"
#include "netcdf_mem.h"
#include "ncwinpath.h"
#include "ncpathmgr.h"

#undef DEBUG

Expand Down
2 changes: 1 addition & 1 deletion libsrc/mmapio.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <unistd.h>
#endif
#include "nc3internal.h"
#include "ncwinpath.h"
#include "ncpathmgr.h"

#undef DEBUG

Expand Down
2 changes: 1 addition & 1 deletion nc-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ else
has_hdf5="yes"
fi

has_szlib="@USE_SZLIB@"
has_szlib="@USE_SZIP@"
if [ -z "$has_szlib" -o "$has_szlib" = "OFF" ]; then
has_szlib="no"
else
Expand Down
Loading

0 comments on commit d4109b2

Please sign in to comment.