mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-30 16:10:44 +08:00
44d0dcaad2
re: https://github.com/Unidata/netcdf-c/issues/1584 Support has been added for multiple filters per variable. This affects a number of components in netcdf. The new APIs are documented in NUG/filters.md. The primary changes are: * A set of new functions are provided (see __include/netcdf_filter.h__). - Obtain a list of the filters associated with a variable - Obtain the parameters for a specific filter. * The existing __nc_inq_var_filter__ function now returns info about the first defined filter. * The utilities (ncgen, ncdump, and nccopy) now support an extended format for specifying a sequence of filters. The general form is __<filter>|<filter>..._. * The ncdump **_Filter** attribute now dumps a list of all the filters associated with a variable using the above new format. * Filter specifications can now use a filter name instead of number for filters known to the netcdf library, which in turn is taken from the HDF5 filter registration page. * New errors are defined: NC_EFILTER and NC_ENOFILTER. The latter is returned if an attempt is made to access an unknown filter. * Internally, the dispatch table has been extended to add a function to handle all of the filter functions. * New, filter-related, tests were added to nc_test4. * A new plugin was added to the plugins directory to help with testing. Notes: 1. The shuffle and fletcher32 filters are not part of the multifilter system. Misc. changes: 1. A debug module was added to libhdf5 to help catch error locations.
236 lines
5.0 KiB
Bash
236 lines
5.0 KiB
Bash
#!/bin/bash
|
|
#NB=1
|
|
#DB=1
|
|
#X=-x
|
|
|
|
#ANSI=1
|
|
#MEM=1 # export NC_VLEN_NOTEST=1
|
|
#NOTUIL=1
|
|
#FAST=1
|
|
#PROF=1
|
|
|
|
#NCZARR=1
|
|
HDF5=1
|
|
DAP=1
|
|
#SZIP=1
|
|
#HDF4=1
|
|
#PNETCDF=1
|
|
#PAR4=1
|
|
|
|
#TESTSERVERS="localhost:8080,149.165.169.123:8080"
|
|
|
|
if test $# != 0 ; then
|
|
cmds=$@
|
|
fi
|
|
|
|
if test "x$PNETCDF" = x1 -o "x$PAR4" = x1 ; then
|
|
MPIO=1
|
|
fi
|
|
|
|
CFLAGS=""
|
|
#CFLAGS="-Wall -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-parameter -Wconversion ${CFLAGS}"
|
|
#CFLAGS="-Wall -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-parameter -Wno-char-subscripts -Wno-pointer-sign -Wno-format ${CFLAGS}"
|
|
CFLAGS="-Wall -Wno-unused-parameter -Wno-char-subscripts -Wno-pointer-sign ${CFLAGS}"
|
|
#CFLAGS="-Wall ${CFLAGS}"
|
|
#CFLAGS="$CFLAGS -Wconversion"
|
|
#CFLAGS="-Wall -Wunused-parameter -Wno-char-subscripts -Wno-pointer-sign ${CFLAGS}"
|
|
|
|
if test "x$MEM" = x1 ; then
|
|
export NC_VLEN_NOTEST=1
|
|
CFLAGS="-fsanitize=address ${CFLAGS}"
|
|
fi
|
|
|
|
if test "x$ANSI" = x1 ; then
|
|
CFLAGS="-ansi ${CFLAGS}"
|
|
fi
|
|
|
|
stddir="/usr/local"
|
|
PREFIX=/usr/local
|
|
|
|
if test "x${cmds}" = x ; then
|
|
cmds=""
|
|
else
|
|
for f in $cmds ; do
|
|
if test "x$f" = "xdistcheck" ; then
|
|
PREFIX=/tmp/$HOST
|
|
fi
|
|
done
|
|
fi
|
|
|
|
# HDF4=>HDF5
|
|
if test "x$HDF4" = x1 ; then
|
|
HDF5=1
|
|
fi
|
|
|
|
# !HDF5=>!SZIP
|
|
if test "x$HDF5" != x1 ; then
|
|
SZIP=0
|
|
fi
|
|
|
|
CC=gcc
|
|
|
|
MALLOC_CHECK=""
|
|
|
|
CPPFLAGS=""
|
|
LDFLAGS=""
|
|
|
|
CFLAGS="-g -O0 $CFLAGS -Wno-undefined"
|
|
|
|
MAKE=make
|
|
IGNORE="test 0 = 1"
|
|
|
|
if test "x$HDF5" = "x1" ; then
|
|
CPPFLAGS="-I${stddir}/include $CPPFLAGS"
|
|
LDFLAGS="-L${stddir}/lib -lhdf5_hl -lhdf5 -lz $LDFLAGS"
|
|
LD_LIBRARY_PATH="${stddir}/lib:$LD_LIBRARY_PATH"
|
|
fi
|
|
|
|
if test "x$HDF4" = "x1" ; then
|
|
LDFLAGS="$LDFLAGS -lmfhdf -ldf -ljpeg"
|
|
fi
|
|
|
|
if test "x$SZIP" = "x1" ; then
|
|
LDFLAGS="$LDFLAGS -lsz -laec"
|
|
fi
|
|
|
|
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
|
|
if curl-config --version >/dev/null ; then
|
|
TMP=`curl-config --cflags`
|
|
CPPFLAGS="$TMP $CPPFLAGS"
|
|
WH=`curl-config --prefix`
|
|
WH="${WH}/lib"
|
|
TMP=`curl-config --libs`
|
|
LDFLAGS="$LDFLAGS -L$WH $TMP"
|
|
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$WH"
|
|
else
|
|
LDFLAGS="${LDFLAGS} -lcurl"
|
|
fi
|
|
|
|
CXXFLAGS="$CPPFLAGS $CXXFLAGS"
|
|
|
|
FLAGS="--prefix ${PREFIX}"
|
|
#FLAGS="$FLAGS --disable-cxx"
|
|
#FLAGS="$FLAGS --disable-examples"
|
|
#FLAGS="$FLAGS --enable-cxx-4"
|
|
#FLAGS="$FLAGS --enable-dap-long-tests"
|
|
#FLAGS="$FLAGS --enable-ffio"
|
|
#FLAGS="$FLAGS --enable-benchmarks"
|
|
FLAGS="$FLAGS --enable-extreme-numbers"
|
|
#FLAGS="$FLAGS --enable-large-file-tests"
|
|
#FLAGS="$FLAGS --disable-testsets"
|
|
#FLAGS="$FLAGS --disable-dap-remote-tests"
|
|
#FLAGS="$FLAGS --enable-dap-auth-tests" -- requires a new remotetest server
|
|
#FLAGS="$FLAGS --enable-doxygen --enable-internal-docs"
|
|
FLAGS="$FLAGS --enable-logging"
|
|
#FLAGS="$FLAGS --disable-diskless"
|
|
FLAGS="$FLAGS --enable-mmap"
|
|
FLAGS="$FLAGS --enable-byterange"
|
|
#FLAGS="$FLAGS --enable-atexit-finalize"
|
|
#FLAGS="$FLAGS --with-udunits"
|
|
#FLAGS="$FLAGS --with-libcf"
|
|
#FLAGS="$FLAGS --enable-jna"
|
|
#FLAGS="$FLAGS --disable-properties-attribute"
|
|
#FLAGS="$FLAGS --disable-silent-rules"
|
|
#FLAGS="$FLAGS --disable-filter-testing"
|
|
#FLAGS="$FLAGS --enable-metadata-perf"
|
|
#FLAGS="$FLAGS --enable-extra-tests"
|
|
#FLAGS="$FLAGS --with-ncproperties-extra=key1=value1,key2=value2"
|
|
#FLAGS="$FLAGS --enable-valgrind"
|
|
|
|
if test "x$TESTSERVERS" != x ; then
|
|
FLAGS="$FLAGS --with-testservers=$TESTSERVERS"
|
|
fi
|
|
|
|
if test "x$PAR4" != x1 ; then
|
|
FLAGS="$FLAGS --disable-parallel4"
|
|
fi
|
|
|
|
if test "x$NCZARR" = x1 ; then
|
|
FLAGS="$FLAGS --enable-nczarr"
|
|
fi
|
|
|
|
if test "x$NOUTIL" = x1 ; then
|
|
FLAGS="$FLAGS --disable-utilities"
|
|
fi
|
|
|
|
if test "x${DB}" = x1 ; then
|
|
FLAGS="$FLAGS --disable-shared --enable-static"
|
|
#FLAGS="$FLAGS --enable-static"
|
|
else
|
|
FLAGS="$FLAGS --enable-shared"
|
|
fi
|
|
|
|
#TMP=
|
|
#rm -f ./test_mpi.tmp
|
|
#if test -f $stddir/lib/libhdf5.a ; then
|
|
# nm $stddir/lib/libhdf5.a | grep mpich_mpi_float$ >./test_mpi.tmp
|
|
#else
|
|
# if test -f $stddir/lib/libhdf5.so ; then
|
|
# nm $stddir/lib/libhdf5.so | grep mpich_mpi_float$ >./test_mpi.tmp
|
|
# fi
|
|
#fi
|
|
#if test -s ./test_mpi.tmp ; then
|
|
# PAR=1
|
|
#fi
|
|
#rm -f ./test_mpi.tmp
|
|
|
|
if test "x${PAR}" != x ; then
|
|
FLAGS="$FLAGS --enable-parallel"
|
|
fi
|
|
|
|
if test "x$HDF5" = "x" ; then
|
|
FLAGS="$FLAGS --disable-netcdf-4"
|
|
fi
|
|
if test "x$HDF4" = x1 ; then
|
|
FLAGS="$FLAGS --enable-hdf4 --enable-hdf4-file-tests"
|
|
fi
|
|
if test "x$DAP" = "x" ; then
|
|
FLAGS="$FLAGS --disable-dap"
|
|
fi
|
|
|
|
if test "x$MPIO" = x1 ; then
|
|
# MPIDIR=/usr/lib64/mpich
|
|
MPIDIR=/usr/lib64/openmpi
|
|
PATH="${PATH}:${MPIDIR}/bin"
|
|
CC="${MPIDIR}/bin/mpicc"
|
|
CPPFLAGS="-I${MPIDIR}/include"
|
|
LDFLAGS="$LDFLAGS -L${MPIDIR}"
|
|
LDLIBS="-lmpich"
|
|
FLAGS="$FLAGS --enable-parallel-tests"
|
|
fi
|
|
|
|
if test "x$PNETCDF" = x1 ; then
|
|
FLAGS="$FLAGS --enable-pnetcdf"
|
|
fi
|
|
|
|
if test "x${PROF}" = x1 ; then
|
|
CFLAGS="${CFLAGS} -pg"
|
|
LDFLAGS="${LDFLAGS} -pg"
|
|
fi
|
|
|
|
export PATH
|
|
export CC
|
|
export CPPFLAGS
|
|
export CFLAGS
|
|
export LDFLAGS
|
|
export LD_LIBRARY_PATH
|
|
export MALLOC_CHECK
|
|
export CXXFLAGS
|
|
|
|
DISTCHECK_CONFIGURE_FLAGS="$FLAGS"
|
|
export DISTCHECK_CONFIGURE_FLAGS
|
|
|
|
if test "x$NB" != x1 && test "x$FAST" != x1 ; then
|
|
${MAKE} distclean >/dev/null 2>&1
|
|
fi
|
|
if test "x$NB" != x1 ; then
|
|
if autoreconf -i --force ; then ok=1; else exit ; fi
|
|
fi
|
|
|
|
sh $X ./configure ${FLAGS}
|
|
for c in $cmds; do
|
|
printenv LD_LIBRARY_PATH
|
|
${MAKE} ${FORCE} $c
|
|
done
|
|
exit 0
|