mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-04-12 18:10:24 +08:00
Replace ENABLE_CDF5 with NETCDF_ENABLE_CDF5
This commit is contained in:
parent
b4eb8bf019
commit
2bce1e6776
@ -444,8 +444,8 @@ option(ENABLE_HDF4 "Build netCDF-4 with HDF4 read capability(HDF4, HDF5 and Zlib
|
||||
option(ENABLE_DAP "Enable DAP2 and DAP4 Client." ON)
|
||||
option(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(ENABLE_CDF5 AUTO CACHE STRING "AUTO")
|
||||
option(ENABLE_CDF5 "Enable CDF5 support" ON)
|
||||
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
|
||||
@ -1183,20 +1183,20 @@ CHECK_TYPE_SIZE("size_t" SIZEOF_SIZE_T)
|
||||
|
||||
# Check whether to turn on or off CDF5 support.
|
||||
if(SIZEOF_SIZE_T EQUAL 4)
|
||||
if(ENABLE_CDF5) # enable or auto
|
||||
string(TOUPPER ${ENABLE_CDF5} ENABLE_CDF5)
|
||||
if(ENABLE_CDF5 AND NOT ENABLE_CDF5 STREQUAL "AUTO") # explicitly enabled
|
||||
if(NETCDF_ENABLE_CDF5) # enable or auto
|
||||
string(TOUPPER ${NETCDF_ENABLE_CDF5} NETCDF_ENABLE_CDF5)
|
||||
if(NETCDF_ENABLE_CDF5 AND NOT NETCDF_ENABLE_CDF5 STREQUAL "AUTO") # explicitly enabled
|
||||
message(FATAL_ERROR "Unable to support CDF5 feature because size_t is less than 8 bytes")
|
||||
endif(ENABLE_CDF5 AND NOT ENABLE_CDF5 STREQUAL "AUTO")
|
||||
set(ENABLE_CDF5 OFF) # cannot support CDF5
|
||||
endif(NETCDF_ENABLE_CDF5 AND NOT NETCDF_ENABLE_CDF5 STREQUAL "AUTO")
|
||||
set(NETCDF_ENABLE_CDF5 OFF) # cannot support CDF5
|
||||
set(USE_CDF5 OFF CACHE BOOL "") # cannot support CDF5
|
||||
endif(ENABLE_CDF5)
|
||||
endif(NETCDF_ENABLE_CDF5)
|
||||
else(SIZEOF_SIZE_T EQUAL 4)
|
||||
if(ENABLE_CDF5) # explicitly set by user or not set
|
||||
if(NETCDF_ENABLE_CDF5) # explicitly set by user or not set
|
||||
set(USE_CDF5 ON CACHE BOOL "")
|
||||
else(ENABLE_CDF5) # explicitly disabled by user
|
||||
else(NETCDF_ENABLE_CDF5) # explicitly disabled by user
|
||||
set(USE_CDF5 OFF CACHE BOOL "")
|
||||
endif(ENABLE_CDF5)
|
||||
endif(NETCDF_ENABLE_CDF5)
|
||||
endif(SIZEOF_SIZE_T EQUAL 4)
|
||||
|
||||
CHECK_TYPE_SIZE("ssize_t" SIZEOF_SSIZE_T)
|
||||
|
@ -416,9 +416,9 @@ See [GitHub #1251](https://github.com/Unidata/netcdf-c/issues/1251).
|
||||
|
||||
### 4.5.0-rc3 - September 29, 2017
|
||||
|
||||
* [Update] Due to ongoing issues, native CDF5 support has been disabled by **default**. You can use the options mentioned below (`--enable-cdf5` or `-DENABLE_CDF5=TRUE` for `configure` or `cmake`, respectively). Just be aware that for the time being, Reading/Writing CDF5 files on 32-bit platforms may result in unexpected behavior when using extremely large variables. For 32-bit platforms it is best to continue using `NC_FORMAT_64BIT_OFFSET`.
|
||||
* [Update] Due to ongoing issues, native CDF5 support has been disabled by **default**. You can use the options mentioned below (`--enable-cdf5` or `-DNETCDF_ENABLE_CDF5=TRUE` for `configure` or `cmake`, respectively). Just be aware that for the time being, Reading/Writing CDF5 files on 32-bit platforms may result in unexpected behavior when using extremely large variables. For 32-bit platforms it is best to continue using `NC_FORMAT_64BIT_OFFSET`.
|
||||
* [Bug] Corrected an issue where older versions of curl might fail. See [GitHub #487](https://github.com/Unidata/netcdf-c/issues/487) for more information.
|
||||
* [Enhancement] Added options to enable/disable `CDF5` support at configure time for autotools and cmake-based builds. The options are `--enable/disable-cdf5` and `ENABLE_CDF5`, respectively. See [Github #484](https://github.com/Unidata/netcdf-c/issues/484) for more information.
|
||||
* [Enhancement] Added options to enable/disable `CDF5` support at configure time for autotools and cmake-based builds. The options are `--enable/disable-cdf5` and `NETCDF_ENABLE_CDF5`, respectively. See [Github #484](https://github.com/Unidata/netcdf-c/issues/484) for more information.
|
||||
* [Bug Fix] Corrected an issue when subsetting a netcdf3 file via `nccopy -v/-V`. See [Github #425](https://github.com/Unidata/netcdf-c/issues/425) and [Github #463](https://github.com/Unidata/netcdf-c/issues/463) for more information.
|
||||
* [Bug Fix] Corrected `--has-dap` and `--has-dap4` output for cmake-based builds. See [GitHub #473](https://github.com/Unidata/netcdf-c/pull/473) for more information.
|
||||
* [Bug Fix] Corrected an issue where `NC_64BIT_DATA` files were being read incorrectly by ncdump, despite the data having been written correctly. See [GitHub #457](https://github.com/Unidata/netcdf-c/issues/457) for more information.
|
||||
|
@ -128,7 +128,7 @@ are set when opening a binary file on Windows. */
|
||||
#cmakedefine ENABLE_HDF5_ROS3 1
|
||||
|
||||
/* if true, enable CDF5 Support */
|
||||
#cmakedefine ENABLE_CDF5 1
|
||||
#cmakedefine NETCDF_ENABLE_CDF5 1
|
||||
|
||||
/* if true, enable client side filters */
|
||||
#cmakedefine ENABLE_CLIENT_FILTERS 1
|
||||
|
@ -1530,9 +1530,9 @@ else
|
||||
fi
|
||||
|
||||
if test "x${enable_cdf5}" = xyes; then
|
||||
AC_DEFINE([ENABLE_CDF5], [1], [if true, enable CDF5 Support])
|
||||
AC_DEFINE([NETCDF_ENABLE_CDF5], [1], [if true, enable CDF5 Support])
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_CDF5, [test x$enable_cdf5 = xyes ])
|
||||
AM_CONDITIONAL(NETCDF_ENABLE_CDF5, [test x$enable_cdf5 = xyes ])
|
||||
|
||||
$SLEEPCMD
|
||||
if test "$ac_cv_type_uchar" = yes ; then
|
||||
@ -1907,7 +1907,7 @@ AM_CONDITIONAL(USE_DAP, [test "x$enable_dap" = xyes]) # Alias
|
||||
AM_CONDITIONAL(ENABLE_DAP, [test "x$enable_dap" = xyes])
|
||||
AM_CONDITIONAL(ENABLE_DAP4, [test "x$enable_dap4" = xyes])
|
||||
AM_CONDITIONAL(USE_STRICT_NULL_BYTE_HEADER_PADDING, [test x$enable_strict_null_byte_header_padding = xyes])
|
||||
AM_CONDITIONAL(ENABLE_CDF5, [test "x$enable_cdf5" = xyes])
|
||||
AM_CONDITIONAL(NETCDF_ENABLE_CDF5, [test "x$enable_cdf5" = xyes])
|
||||
AM_CONDITIONAL(ENABLE_DAP_REMOTE_TESTS, [test "x$enable_dap_remote_tests" = xyes])
|
||||
AM_CONDITIONAL(ENABLE_EXTERNAL_SERVER_TESTS, [test "x$enable_external_server_tests" = xyes])
|
||||
AM_CONDITIONAL(ENABLE_DAP_AUTH_TESTS, [test "x$enable_dap_auth_tests" = xyes])
|
||||
|
@ -1884,7 +1884,7 @@ NC_create(const char *path0, int cmode, size_t initialsz,
|
||||
if (model.impl == NC_FORMATX_PNETCDF)
|
||||
{stat = NC_ENOTBUILT; goto done;}
|
||||
#endif
|
||||
#ifndef ENABLE_CDF5
|
||||
#ifndef NETCDF_ENABLE_CDF5
|
||||
if (model.impl == NC_FORMATX_NC3 && (cmode & NC_64BIT_DATA))
|
||||
{stat = NC_ENOTBUILT; goto done;}
|
||||
#endif
|
||||
@ -2047,7 +2047,7 @@ NC_open(const char *path0, int omode, int basepe, size_t *chunksizehintp,
|
||||
#ifdef USE_HDF4
|
||||
hdf4built = 1;
|
||||
#endif
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
cdf5built = 1;
|
||||
#endif
|
||||
#ifdef ENABLE_NCZARR
|
||||
@ -2101,7 +2101,7 @@ NC_open(const char *path0, int omode, int basepe, size_t *chunksizehintp,
|
||||
/* Verify */
|
||||
if((built & (1 << model.impl)) == 0)
|
||||
{stat = NC_ENOTBUILT; goto done;}
|
||||
#ifndef ENABLE_CDF5
|
||||
#ifndef NETCDF_ENABLE_CDF5
|
||||
/* Special case because there is no separate CDF5 dispatcher */
|
||||
if(model.impl == NC_FORMATX_NC3 && (omode & NC_64BIT_DATA))
|
||||
{stat = NC_ENOTBUILT; goto done;}
|
||||
|
@ -124,7 +124,7 @@ nc_set_default_format(int format, int *old_formatp)
|
||||
*old_formatp = default_create_format;
|
||||
|
||||
/* Make sure only valid format is set. */
|
||||
#ifndef ENABLE_CDF5
|
||||
#ifndef NETCDF_ENABLE_CDF5
|
||||
if (format == NC_FORMAT_CDF5)
|
||||
return NC_ENOTBUILT;
|
||||
#endif
|
||||
|
@ -92,7 +92,7 @@ err:
|
||||
int
|
||||
nc3_cktype(int mode, nc_type type)
|
||||
{
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
if (mode & NC_CDF5) { /* CDF-5 format */
|
||||
if (type >= NC_BYTE && type < NC_STRING) return NC_NOERR;
|
||||
} else
|
||||
@ -1134,7 +1134,7 @@ nc_set_default_format(int format, int *old_formatp)
|
||||
return NC_EINVAL;
|
||||
#else
|
||||
if (format != NC_FORMAT_CLASSIC && format != NC_FORMAT_64BIT_OFFSET
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
&& format != NC_FORMAT_CDF5
|
||||
#endif
|
||||
)
|
||||
@ -1563,7 +1563,7 @@ NC3_inq_format(int ncid, int *formatp)
|
||||
return NC_NOERR;
|
||||
|
||||
/* only need to check for netCDF-3 variants, since this is never called for netCDF-4 files */
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
if (fIsSet(nc3->flags, NC_64BIT_DATA))
|
||||
*formatp = NC_FORMAT_CDF5;
|
||||
else
|
||||
|
@ -81,7 +81,7 @@ else
|
||||
has_szlib="yes"
|
||||
fi
|
||||
|
||||
has_cdf5="@ENABLE_CDF5@"
|
||||
has_cdf5="@NETCDF_ENABLE_CDF5@"
|
||||
if [ -z "$has_cdf5" -o "$has_cdf5" = "OFF" -o "$has_cdf5" = "FALSE" ]; then
|
||||
has_cdf5="no"
|
||||
else
|
||||
|
@ -39,7 +39,7 @@ tst_formatx_pnetcdf tst_default_format_pnetcdf
|
||||
endif
|
||||
|
||||
if USE_PNETCDF
|
||||
if ENABLE_CDF5
|
||||
if NETCDF_ENABLE_CDF5
|
||||
check_PROGRAMS += tst_cdf5format
|
||||
endif
|
||||
endif
|
||||
@ -125,7 +125,7 @@ tst_diskless4.cdl ref_tst_diskless4.cdl benchmark.nc \
|
||||
tst_http_nc3.cdl tst_http_nc4?.cdl tmp*.cdl tmp*.nc
|
||||
|
||||
EXTRA_DIST += bad_cdf5_begin.nc run_cdf5.sh nc_enddef.cdl
|
||||
if ENABLE_CDF5
|
||||
if NETCDF_ENABLE_CDF5
|
||||
# bad_cdf5_begin.nc is a corrupted CDF-5 file with bad variable starting
|
||||
# file offsets. It is to be used by tst_open_cdf5.c to check if it can
|
||||
# detect and report error code NC_ENOTNC.
|
||||
|
@ -134,7 +134,7 @@ main(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
case NC_FORMAT_CDF5:
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
nc_set_default_format(NC_FORMAT_CDF5, NULL);
|
||||
fprintf(stderr, "\n\nSwitching to 64-bit data format.\n");
|
||||
strcpy(testfile, "nc_test_cdf5.nc");
|
||||
|
@ -358,7 +358,7 @@ main(int argc, char *argv[])
|
||||
#ifdef USE_PNETCDF
|
||||
MPI_Init(&argc, &argv);
|
||||
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
cmode |= (NC_64BIT_DATA);
|
||||
#endif
|
||||
ret = nc_create_par(fname,cmode, MPI_COMM_WORLD, MPI_INFO_NULL, &id);
|
||||
|
@ -2440,7 +2440,7 @@ APIFunc(get_file_version)(char *path, int *version)
|
||||
if (strncmp(magic, "CDF", MAGIC_NUM_LEN-1)==0) {
|
||||
if (magic[MAGIC_NUM_LEN-1] == NC_FORMAT_CLASSIC ||
|
||||
magic[MAGIC_NUM_LEN-1] == NC_FORMAT_64BIT_OFFSET
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
|| magic[MAGIC_NUM_LEN-1] == NC_FORMAT_CDF5
|
||||
#endif
|
||||
)
|
||||
|
@ -55,7 +55,7 @@ int main(int argc, char** argv) {
|
||||
buf = (int*) malloc(NY*NX * sizeof(int));
|
||||
|
||||
for (k=0; k<5; k++) {
|
||||
#ifndef ENABLE_CDF5
|
||||
#ifndef NETCDF_ENABLE_CDF5
|
||||
if (formats[k] == NC_FORMAT_CDF5) continue;
|
||||
#endif
|
||||
#ifndef USE_HDF5
|
||||
|
@ -52,7 +52,7 @@ create_check(char *fname, int cmode, int exp_format)
|
||||
if (cmode & NC_NETCDF4)
|
||||
exp_err = NC_ENOTBUILT;
|
||||
#endif
|
||||
#ifndef ENABLE_CDF5
|
||||
#ifndef NETCDF_ENABLE_CDF5
|
||||
if (cmode & NC_64BIT_DATA)
|
||||
exp_err = NC_ENOTBUILT;
|
||||
#endif
|
||||
@ -155,7 +155,7 @@ int main(int argc, char *argv[])
|
||||
cmode = NC_64BIT_DATA;
|
||||
nerrs += create_check(fname, cmode, NC_FORMAT_64BIT_DATA);
|
||||
|
||||
#ifndef ENABLE_CDF5
|
||||
#ifndef NETCDF_ENABLE_CDF5
|
||||
err = nc_set_default_format(NC_FORMAT_64BIT_DATA, NULL); EXP_ERR(NC_ENOTBUILT)
|
||||
#else
|
||||
/* set default file format to NC_FORMAT_64BIT_DATA --------------------*/
|
||||
|
@ -54,7 +54,7 @@ create_check_pnetcdf(char *fname, int cmode, int exp_format)
|
||||
|
||||
exp_str = formatstr(exp_format);
|
||||
|
||||
#ifndef ENABLE_CDF5
|
||||
#ifndef NETCDF_ENABLE_CDF5
|
||||
if (cmode & NC_64BIT_DATA) exp_err = NC_ENOTBUILT;
|
||||
#endif
|
||||
|
||||
@ -119,7 +119,7 @@ int main(int argc, char *argv[])
|
||||
cmode = NC_64BIT_OFFSET;
|
||||
nerrs += create_check_pnetcdf(fname, cmode, NC_FORMAT_64BIT_OFFSET);
|
||||
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
/* create a file in CDF5 format */
|
||||
cmode = NC_64BIT_DATA;
|
||||
nerrs += create_check_pnetcdf(fname, cmode, NC_FORMAT_64BIT_DATA);
|
||||
@ -133,7 +133,7 @@ int main(int argc, char *argv[])
|
||||
cmode = 0;
|
||||
nerrs += create_check_pnetcdf(fname, cmode, NC_FORMAT_64BIT_OFFSET);
|
||||
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
/* create a file in CDF5 format (this should ignore default) */
|
||||
cmode = NC_64BIT_DATA;
|
||||
nerrs += create_check_pnetcdf(fname, cmode, NC_FORMAT_64BIT_DATA);
|
||||
|
@ -44,10 +44,10 @@ determine_test_formats(int *num_formats, int *format)
|
||||
#endif /* USE_HDF5 */
|
||||
|
||||
/* Do we have CDF5? */
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
num++;
|
||||
format[ind++] = NC_FORMAT_CDF5;
|
||||
#endif /* ENABLE_CDF5 */
|
||||
#endif /* NETCDF_ENABLE_CDF5 */
|
||||
|
||||
*num_formats = num;
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ main(int argc, char **argv)
|
||||
num_formats += 2;
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
num_formats++;
|
||||
#endif
|
||||
|
||||
@ -47,7 +47,7 @@ main(int argc, char **argv)
|
||||
|
||||
formats[n++] = 0;
|
||||
formats[n++] = NC_64BIT_OFFSET;
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
formats[n++] = NC_64BIT_DATA;
|
||||
#endif
|
||||
#ifdef USE_HDF5
|
||||
|
@ -81,7 +81,7 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
printf("\n* Testing nc_inq_type with CDF5\n");
|
||||
{
|
||||
if(nc_create(FILE_NAME,NC_CLOBBER|NC_CDF5,&ncid)) ERR;
|
||||
@ -111,7 +111,7 @@ int main(int argc, char **argv) {
|
||||
if (nc_close(ncid)) ERR;
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
#endif /* ENABLE_CDF5 */
|
||||
#endif /* NETCDF_ENABLE_CDF5 */
|
||||
|
||||
#ifdef USE_HDF5
|
||||
printf("\n* Testing nc_inq_type with netcdf-4 + Classic Model\n");
|
||||
|
@ -225,7 +225,7 @@ main(int argc, char **argv)
|
||||
NC_FORMAT_CLASSIC
|
||||
,
|
||||
NC_FORMAT_64BIT_OFFSET
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
,
|
||||
NC_FORMAT_CDF5
|
||||
#endif
|
||||
|
@ -55,7 +55,7 @@ static int file_create(const char *filename, int cmode, int *ncid)
|
||||
#ifdef USE_PNETCDF
|
||||
if (default_format == NC_FORMAT_CLASSIC ||
|
||||
default_format == NC_FORMAT_64BIT_OFFSET
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
|| default_format == NC_FORMAT_64BIT_DATA
|
||||
#endif
|
||||
)
|
||||
@ -523,7 +523,7 @@ main(int argc, char **argv)
|
||||
printf("Switching to 64-bit offset format.\n");
|
||||
strcpy(testfile, "tst_small_64bit.nc");
|
||||
break;
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
case NC_FORMAT_CDF5:
|
||||
nc_set_default_format(NC_FORMAT_CDF5, NULL);
|
||||
printf("Switching to 64-bit data format.\n");
|
||||
|
@ -51,10 +51,10 @@ determine_test_formats(int *num_formats, int *format)
|
||||
#endif /* USE_HDF5 */
|
||||
|
||||
/* Do we have CDF5? */
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
num++;
|
||||
format[ind++] = NC_FORMAT_CDF5;
|
||||
#endif /* ENABLE_CDF5 */
|
||||
#endif /* NETCDF_ENABLE_CDF5 */
|
||||
|
||||
*num_formats = num;
|
||||
}
|
||||
|
@ -262,11 +262,11 @@ main(int argc, char **argv)
|
||||
test_redef(NC_FORMAT_NETCDF4_CLASSIC);
|
||||
SUMMARIZE_ERR;
|
||||
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
printf("*** testing redef for CDF5...");
|
||||
test_redef(NC_FORMAT_CDF5);
|
||||
SUMMARIZE_ERR;
|
||||
#endif /* ENABLE_CDF5 */
|
||||
#endif /* NETCDF_ENABLE_CDF5 */
|
||||
|
||||
printf("*** testing different formats...");
|
||||
{
|
||||
|
@ -140,7 +140,7 @@ if USE_HDF5
|
||||
TESTS += tst_ctests.sh
|
||||
endif
|
||||
|
||||
if ENABLE_CDF5
|
||||
if NETCDF_ENABLE_CDF5
|
||||
# Test for keywords as identifiers
|
||||
TESTS += test_keywords.sh
|
||||
endif
|
||||
|
@ -2070,7 +2070,7 @@ copy(char* infile, char* outfile)
|
||||
create_mode |= NC_64BIT_OFFSET;
|
||||
break;
|
||||
case NC_FORMAT_CDF5:
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
create_mode |= NC_64BIT_DATA;
|
||||
break;
|
||||
#else
|
||||
|
@ -11,7 +11,7 @@ set -e
|
||||
# This shell script runs the ncdump tests.
|
||||
# get some config.h parameters
|
||||
if test -f ${top_builddir}/config.h ; then
|
||||
if fgrep -e '#define ENABLE_CDF5 1' ${top_builddir}/config.h >/dev/null ; then
|
||||
if fgrep -e '#define NETCDF_ENABLE_CDF5 1' ${top_builddir}/config.h >/dev/null ; then
|
||||
CDF5=1
|
||||
else
|
||||
CDF5=0
|
||||
@ -51,7 +51,7 @@ echo "*** creating 64-bit offset file c0_64_run_ncgen_tests.nc from c0.cdl..."
|
||||
|
||||
validateNC c0 "c0_64" -k 64-bit-offset -b
|
||||
|
||||
if test "x$ENABLE_CDF5" = x1 ; then
|
||||
if test "x$NETCDF_ENABLE_CDF5" = x1 ; then
|
||||
|
||||
echo "*** creating 64-bit data file c5.nc from c5.cdl..."
|
||||
${NCGEN} -k 64-bit-data -b -o tst_c5_run_ncgen_tests.nc $top_srcdir/ncgen/c5.cdl
|
||||
|
@ -8,7 +8,7 @@ if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
||||
# This shell script runs the ncdump tests.
|
||||
# get some config.h parameters
|
||||
if test -f ${top_builddir}/config.h ; then
|
||||
if fgrep -e '#define ENABLE_CDF5 1' ${top_builddir}/config.h >/dev/null ; then
|
||||
if fgrep -e '#define NETCDF_ENABLE_CDF5 1' ${top_builddir}/config.h >/dev/null ; then
|
||||
CDF5=1
|
||||
else
|
||||
CDF5=0
|
||||
|
@ -23,7 +23,7 @@ See \ref copyright file for more info.
|
||||
#define DIMMAXCLASSIC (NC_MAX_INT - 3)
|
||||
#define DIMMAX64OFFSET (NC_MAX_UINT - 3)
|
||||
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
#define DIMMAX64DATA (NC_MAX_UINT64 - 3)
|
||||
#endif
|
||||
|
||||
@ -76,7 +76,7 @@ main(int argc, char **argv)
|
||||
if(dimsize != DIMMAX64OFFSET) ERR;
|
||||
if ((stat=nc_close(ncid))) ERRSTAT(stat);
|
||||
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
if(sizeof(size_t) == 8) {
|
||||
printf("\n*** Writing Max Dimension Size (%llu) For NC_64BIT_DATA\n",DIMMAX64DATA);
|
||||
if ((stat=nc_create(FILE64DATA, NC_CLOBBER | NC_64BIT_DATA, &ncid))) ERRSTAT(stat);
|
||||
@ -91,7 +91,7 @@ main(int argc, char **argv)
|
||||
if(dimsize != DIMMAX64DATA) ERR;
|
||||
if ((stat=nc_close(ncid))) ERRSTAT(stat);
|
||||
}
|
||||
#endif /* ENABLE_CDF5 */
|
||||
#endif /* NETCDF_ENABLE_CDF5 */
|
||||
|
||||
SUMMARIZE_ERR;
|
||||
FINAL_RESULTS;
|
||||
|
@ -6,10 +6,10 @@ if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
||||
# This shell script runs the ncdump tests.
|
||||
# get some config.h parameters
|
||||
if test -f ${top_builddir}/config.h ; then
|
||||
if fgrep -e '#define ENABLE_CDF5 1' ${top_builddir}/config.h >/dev/null ; then
|
||||
ENABLE_CDF5=1
|
||||
if fgrep -e '#define NETCDF_ENABLE_CDF5 1' ${top_builddir}/config.h >/dev/null ; then
|
||||
NETCDF_ENABLE_CDF5=1
|
||||
else
|
||||
ENABLE_CDF5=0
|
||||
NETCDF_ENABLE_CDF5=0
|
||||
fi
|
||||
else
|
||||
echo "Cannot locate config.h"
|
||||
@ -42,9 +42,9 @@ ECODE=1
|
||||
fi
|
||||
|
||||
|
||||
# Only do following test if ENABLE_CDF5 is true.
|
||||
# Only do following test if NETCDF_ENABLE_CDF5 is true.
|
||||
|
||||
if test "x$ENABLE_CDF5" = x1 ; then
|
||||
if test "x$NETCDF_ENABLE_CDF5" = x1 ; then
|
||||
echo "Test extended format output for a 64-bit CDF-5 classic file"
|
||||
rm -f tmp_tst_formatx3
|
||||
${NCGEN} -k5 -b -o ./tst_formatx3.nc $srcdir/ref_tst_small.cdl
|
||||
|
@ -5,7 +5,7 @@ if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
||||
|
||||
# get some config.h parameters
|
||||
if test -f ${top_builddir}/config.h ; then
|
||||
if fgrep -e '#define ENABLE_CDF5 1' ${top_builddir}/config.h >/dev/null ; then
|
||||
if fgrep -e '#define NETCDF_ENABLE_CDF5 1' ${top_builddir}/config.h >/dev/null ; then
|
||||
HAVE_CDF5=1
|
||||
else
|
||||
HAVE_CDF5=0
|
||||
|
@ -14,7 +14,7 @@ echo ""
|
||||
|
||||
# get some config.h parameters
|
||||
if test -f ${top_builddir}/config.h ; then
|
||||
if fgrep -e '#define ENABLE_CDF5 1' ${top_builddir}/config.h >/dev/null ; then
|
||||
if fgrep -e '#define NETCDF_ENABLE_CDF5 1' ${top_builddir}/config.h >/dev/null ; then
|
||||
HAVE_CDF5=1
|
||||
else
|
||||
HAVE_CDF5=0
|
||||
|
@ -474,7 +474,7 @@ main(
|
||||
|
||||
/* Compute the k_flag (1st pass) using rules in the man page (ncgen.1).*/
|
||||
|
||||
#ifndef ENABLE_CDF5
|
||||
#ifndef NETCDF_ENABLE_CDF5
|
||||
if(k_flag == NC_FORMAT_CDF5) {
|
||||
derror("Output format CDF5 requested, but netcdf was built without cdf5 support.");
|
||||
return 0;
|
||||
|
@ -51,10 +51,10 @@ determine_test_formats(int *num_formats, int *format)
|
||||
#endif /* USE_HDF5 */
|
||||
|
||||
/* Do we have CDF5? */
|
||||
#ifdef ENABLE_CDF5
|
||||
#ifdef NETCDF_ENABLE_CDF5
|
||||
num++;
|
||||
format[ind++] = NC_FORMAT_CDF5;
|
||||
#endif /* ENABLE_CDF5 */
|
||||
#endif /* NETCDF_ENABLE_CDF5 */
|
||||
|
||||
*num_formats = num;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user