mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Creating a new branch of netcdf
This commit is contained in:
commit
f505b49727
1661
Doxyfile.ward
1661
Doxyfile.ward
File diff suppressed because it is too large
Load Diff
4
INSTALL
4
INSTALL
@ -2,7 +2,7 @@ Documentation for getting and building netCDF
|
||||
*********************************************
|
||||
|
||||
This document is for getting and building the netCDF C library and
|
||||
utilities, version 4.2. Other libraries that depend on the netCDF C
|
||||
utilities, version 4.2.1. Other libraries that depend on the netCDF C
|
||||
library, such as the Fortran and C++ libraries, are available as
|
||||
separate distributions that can be built and installed after the C
|
||||
library is successfully installed. The netCDF-Java library is also a
|
||||
@ -63,7 +63,7 @@ libraries. (And, optionally, the szlib library). Versions required are
|
||||
at least HDF5 1.8.8, zlib 1.2.5, and curl 7.18.0 or later.
|
||||
(Optionally, if building with szlib, get szip 2.0 or later.)
|
||||
|
||||
HDF5 1.8.8 and zlib 1.2.5 packages are available from the netCDF-4 ftp
|
||||
HDF5 1.8.9 and zlib 1.2.7 packages are available from the netCDF-4 ftp
|
||||
site:
|
||||
|
||||
ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4
|
||||
|
150
RELEASE_NOTES
150
RELEASE_NOTES
@ -1,45 +1,131 @@
|
||||
This file contains a high-level description of this package's evolution.
|
||||
Entries are in reverse chronological order (most recent first).
|
||||
This file contains a high-level description of this package's
|
||||
evolution. Releases are in reverse chronological order (most recent
|
||||
first). Recent releases include references to Jira issue identifiers
|
||||
for more information, where '[NCF-XXX]' refers to
|
||||
https://www.unidata.ucar.edu/jira/browse/NCF-XXX .
|
||||
|
||||
VERSION COMMENTS
|
||||
------- --------
|
||||
4.2.1 Released ????-??-?? (Note: Jira entries include reference to '[NCF-XX]')
|
||||
|
||||
Generation of documentation is disabled by default. Use
|
||||
--enable-doxygen to generate.
|
||||
4.2.1 Released 2012-??-??
|
||||
|
||||
Added a Nspecific NC_MMAP mode flag to modify
|
||||
behavior of NC_DISKLESS.
|
||||
|
||||
4.2.1-rc1 Released 2012-06-18
|
||||
|
||||
Ported static and shared libraries (DLL's) for both
|
||||
32- and 64-bit Windows, including support for DAP
|
||||
remote access, with netCDF-3 and netCDF-4/HDF5 support
|
||||
enabled. The environment for this build is
|
||||
MSYS/MinGW/MinGW64, but the resulting DLLs may be used
|
||||
with Visual Studio.
|
||||
[NCF-112][NCF-54][NCF-57][NCF-65]
|
||||
|
||||
Implemented diskless files for all netCDF formats. For
|
||||
nc_create(), diskless operation performs all
|
||||
operations in memory and then optionally persists the
|
||||
results to a file on close. For nc_open(), but only
|
||||
for netcdf classic files, diskless operation caches
|
||||
the file in-memory, performs all operations on the
|
||||
memory resident version and then writes all changes
|
||||
back to the original file on close.
|
||||
[NCF-110][NCF-109][NCF-5]
|
||||
|
||||
Added MMAP support. If diskless file support is
|
||||
enabled, then it is possible to enable implementation
|
||||
of diskless files using the operating system's MMAP
|
||||
facility (if available). The enabling flag is
|
||||
"--enable-mmap". This is most useful when using
|
||||
nc_open() and when only parts of files, a single
|
||||
variable say, need to be read.
|
||||
|
||||
Added configure flag for --disable-diskless.
|
||||
|
||||
Added nccopy command-line options to exploit diskless
|
||||
files, resulting in large speedups for some
|
||||
operations, for example converting unlimited dimension
|
||||
to fixed size or rechunking files for faster access.
|
||||
Upgraded doxygen and man-page documentation for ncdump
|
||||
and nccopy utilities, including new -w option for
|
||||
diskless nccopy, with an example.
|
||||
|
||||
Modified Makefile to allow for concurrent builds and
|
||||
to support builds outside the source tree, e.g.
|
||||
'mkdir build; cd build; SOURCE-DIR/configure' where
|
||||
SOURCE-DIR is the top-level source directory.
|
||||
|
||||
Fixed some netCDF-4 bugs with handling strings in
|
||||
non-netCDF-4 HDF5 files.
|
||||
[NCF-150]
|
||||
|
||||
Fixed bug using nccopy to compress with shuffling that
|
||||
doesn't compress output variables unless they were
|
||||
already compressed in the input file.
|
||||
[NCF-162]
|
||||
|
||||
Fixed bug in 64-bit offset files with large records,
|
||||
when last record variable requires more than 2**32
|
||||
bytes per record.
|
||||
[NCF-164]
|
||||
|
||||
Fix bug in which passing a NULL path causes netcdf to fail.
|
||||
[NCF-173]
|
||||
Fix bug in which passing a NULL path to nc_open causes failure.
|
||||
[NCF-173]
|
||||
|
||||
Upgraded doxygen and man-page documentation for ncdump
|
||||
and nccopy utilities, including new -w option for
|
||||
nccopy with an example.
|
||||
[NCF-26]
|
||||
Fixed ncgen bugs in parsing and handling opaque data.
|
||||
|
||||
Fixed bugs in accessing fixed-length string attributes and variable
|
||||
values from non-netCDF-4 HDF5 files.
|
||||
[NCF-150]
|
||||
Fixed ncdump bug, not escaping characters special to CDL
|
||||
in enumeration labels.
|
||||
[NCF-169]
|
||||
|
||||
Fixed bug in 64-bit offset files with large records
|
||||
due to last record variable requiring more than 2**32
|
||||
bytes per record.
|
||||
[NCF-164]
|
||||
Fixed bug reading netCDF int into a C longlong or
|
||||
writing from longlong to external int on 32-bit
|
||||
platforms with classic format files. The upper 32
|
||||
bits of the longlong were not cleared on read or used
|
||||
on write.
|
||||
[NCF-171]
|
||||
|
||||
Implemented diskless files for both netcdf classic format
|
||||
and extended (netcdf-4) format. For netcdf classic files,
|
||||
diskless files also support in-memory caching of disk files.
|
||||
For nc_create(), diskless operation performs all operations
|
||||
in memory and then optionally persists the results to a file.
|
||||
For nc_open(), diskless operation caches the file in-memory,
|
||||
performs all operations on the memory resident version and then
|
||||
writes all changes back to the original file.
|
||||
[NCF-110][NCF-109][NCF-5]
|
||||
Resolved some erroneous returns of BADTYPE errors and
|
||||
RANGE errors due to conflating C memory types with
|
||||
external netCDF types when accessing classic or 64-bit
|
||||
offset files.
|
||||
[NCF-172]
|
||||
|
||||
Modified ncio mechanism to support multiple ncio packages;
|
||||
this is so that it is possible to have e.g. posixio and memio
|
||||
operating at the same time.
|
||||
Fixed bug with ncdump -t interpreting unit attribute
|
||||
without base time as a time unit.
|
||||
[NCF-175]
|
||||
|
||||
Cleanup up a bunch of lint issues (unused variables, etc).
|
||||
Changed port for testing remote access test server to
|
||||
increase reliability of tests.
|
||||
|
||||
Modified ncio mechanism to support multiple ncio
|
||||
packages, so that it is possible to have e.g. posixio
|
||||
and memio operating at the same time.
|
||||
|
||||
Generation of documentation is disabled by default. Use
|
||||
--enable-doxygen to generate.
|
||||
[NCF-168]
|
||||
|
||||
Added description of configure flags to installation
|
||||
guide.
|
||||
|
||||
Clarified documentation of arguments to nc__open() and
|
||||
nc__create() and their default values.
|
||||
|
||||
Fixed doxygen installation guide source file to
|
||||
preserve line breaks in code and scripts.
|
||||
[NCF-174]
|
||||
|
||||
Cleaned up a bunch of lint issues (unused variables,
|
||||
etc.) and some similar problems reported by clang
|
||||
static analysis.
|
||||
|
||||
Updated and fixed pkg-config source file netcdf.pc.in
|
||||
to work with separated netCDF language-specific
|
||||
packages. Also fixed nc-config to call nf-config,
|
||||
ncxx-config, and ncxx4-config for for backward
|
||||
compatibility with use of nc-config in current
|
||||
Makefiles.
|
||||
[NCF-165] [NCF-179]
|
||||
|
||||
4.2 Released 2012-03-19 (Note: Jira entries include reference to '[NCF-XX]')
|
||||
|
||||
|
2
cf
2
cf
@ -129,11 +129,11 @@ FLAGS="$FLAGS --enable-extra-tests"
|
||||
FLAGS="$FLAGS --enable-logging"
|
||||
#FLAGS="$FLAGS --enable-large-file-tests"
|
||||
#FLAGS="$FLAGS --disable-testsets"
|
||||
#FLAGS="$FLAGS --enable-mmap"
|
||||
#FLAGS="$FLAGS --disable-dap-remote-tests"
|
||||
#FLAGS="$FLAGS --enable-doxygen"
|
||||
FLAGS="$FLAGS --enable-logging"
|
||||
#FLAGS="$FLAGS --disable-diskless"
|
||||
#FLAGS="$FLAGS --enable-mmap"
|
||||
|
||||
FLAGS="$FLAGS --disable-shared"
|
||||
#FLAGS="$FLAGS --enable-shared"
|
||||
|
11
configure.ac
11
configure.ac
@ -15,7 +15,7 @@ AC_REVISION([$Id: configure.ac,v 1.450 2010/05/28 19:42:47 dmh Exp $])
|
||||
AC_PREREQ([2.59])
|
||||
|
||||
# Initialize with name, version, and support email address.
|
||||
AC_INIT([netCDF], [4.2.1-beta], [support-netcdf@unidata.ucar.edu])
|
||||
AC_INIT([netCDF], [4.2.1-rc1], [support-netcdf@unidata.ucar.edu])
|
||||
|
||||
# Create the VERSION file, which contains the package version from
|
||||
# AC_INIT.
|
||||
@ -262,6 +262,7 @@ AC_CHECK_LIB([curl],[curl_easy_setopt],[found_curl=yes],[found_curl=no])
|
||||
#AC_CHECK_LIB([curl.dll],[curl_easy_setopt])
|
||||
# If curl is required but there is no curl, then complain
|
||||
if test $require_curl = yes ; then
|
||||
# Removed. Why assume no curl if we are building DLL?
|
||||
#if test $enable_dll = yes ; then
|
||||
# AC_MSG_NOTICE([libcurl not found; continuing])
|
||||
#elif test $found_curl = no ; then
|
||||
@ -586,18 +587,18 @@ AC_CHECK_FUNCS([strlcat strerror snprintf strchr strrchr strcat strcpy \
|
||||
AC_MSG_CHECKING([whether in-memory files are enabled])
|
||||
AC_ARG_ENABLE([diskless],
|
||||
[AS_HELP_STRING([--disable-diskless],
|
||||
[use in-memory (NC_DISKLESS) files])])
|
||||
[disable support for in-memory (NC_DISKLESS) files])])
|
||||
test "x$enable_diskless" = xno || enable_diskless=yes
|
||||
AC_MSG_RESULT($enable_diskless)
|
||||
|
||||
# check for useful, but not essential, memio support
|
||||
AC_CHECK_FUNCS([memmove getpagesize sysconf])
|
||||
|
||||
# Does the user want to use the mmap for NC_DISKLESS?
|
||||
AC_MSG_CHECKING([whether mmap will be used for in-memory files])
|
||||
# Does the user want to allow use of mmap for NC_DISKLESS?
|
||||
AC_MSG_CHECKING([whether mmap is enabled for in-memory files])
|
||||
AC_ARG_ENABLE([mmap],
|
||||
[AS_HELP_STRING([--enable-mmap],
|
||||
[use mmap for in-memory (NC_DISKLESS) files])])
|
||||
[allow mmap for in-memory files])])
|
||||
test "x$enable_mmap" = xyes || enable_mmap=no
|
||||
AC_MSG_RESULT($enable_mmap)
|
||||
|
||||
|
@ -1,100 +0,0 @@
|
||||
######
|
||||
# Custom build script.
|
||||
#
|
||||
# Defines a number of options for 'configure' for netcdf4.
|
||||
# This script will, based on command-line switches,
|
||||
# configure netcdf source for different builds. If no options
|
||||
# are specified, it will prompt for configuration options
|
||||
# interactively.
|
||||
######
|
||||
from optparse import OptionParser
|
||||
import os
|
||||
|
||||
C_FLAGS="CFLAGS=\""
|
||||
LD_FLAGS="LDFLAGS=\""
|
||||
STD_ARGS="--disable-doxygen "
|
||||
|
||||
### Parse the options which were passed to the program.
|
||||
def parse_options(ops):
|
||||
cur_args=STD_ARGS
|
||||
cur_c_flags=C_FLAGS
|
||||
cur_ld_flags=LD_FLAGS
|
||||
if ops.BUILD_64 == True:
|
||||
cur_args += "--host=x86_64-w64-mingw32 "
|
||||
|
||||
if ops.BUILD_MIN == True:
|
||||
cur_args += "--disable-dap --disable-netcdf-4 --disable-diskless "
|
||||
|
||||
if ops.BUILD_DEBUG == True:
|
||||
cur_c_flags = cur_c_flags + "-ggdb -O0 "
|
||||
cur_ld_flags = cur_ld_flags + "-ggdb -O0 "
|
||||
|
||||
if ops.BUILD_STATIC == True:
|
||||
cur_args += "--enable-static "
|
||||
|
||||
if ops.BUILD_32 == True:
|
||||
cur_c_flags += "-I/c/Users/wfisher/Desktop/hdf5-1.8.8/src -I/c/Users/wfisher/Desktop/hdf-1.8.8/hl/src "
|
||||
cur_ld_flags += "-static -L/c/GnuWin32/lib/libz.a -L/c/Users/wfisher/Desktop/hdf5-1.8.8/build_win/bin "
|
||||
else:
|
||||
cur_c_flags += "-I/c/HDF5189/include "
|
||||
cur_ld_flags += "-static -L/c/HDF5189/bin "
|
||||
else:
|
||||
cur_args += "--disable-static "
|
||||
|
||||
if ops.BUILD_SHARED == True:
|
||||
cur_args += "--enable-shared --disable-utilities "
|
||||
|
||||
if os.name == 'nt':
|
||||
cur_args += "--enable-dll "
|
||||
|
||||
if ops.BUILD_32 == True:
|
||||
cur_c_flags += "-I/c/Users/wfisher/Desktop/hdf5-1.8.8/src -I/c/Users/wfisher/Desktop/hdf-1.8.8/hl/src "
|
||||
cur_ld_flags += "-L/c/GnuWin32/lib/libz.a -L/c/Users/wfisher/Desktop/hdf5-1.8.8/build_win/bin "
|
||||
else:
|
||||
cur_c_flags += "-I/c/HDF5189/include "
|
||||
cur_ld_flags += "-L/c/HDF5189/bin "
|
||||
else:
|
||||
cur_args += "--disable-shared "
|
||||
|
||||
|
||||
|
||||
return "sh ./configure " + cur_args + " " + cur_c_flags + "\" " + cur_ld_flags + "\""
|
||||
|
||||
###
|
||||
# Main Function.
|
||||
###
|
||||
def main():
|
||||
parser = OptionParser()
|
||||
parser.add_option("--m32","--build-32",dest="BUILD_32",action="store_true",
|
||||
help="Enable 32-bit build.",default=False)
|
||||
|
||||
parser.add_option("--m64","--build-64",dest="BUILD_64",action="store_true",
|
||||
help="Enable 64-bit build.",default=False)
|
||||
|
||||
parser.add_option("--static",dest="BUILD_STATIC",action="store_true",
|
||||
help="Enable static build.",default=False)
|
||||
|
||||
parser.add_option("--shared","--dynamic",dest="BUILD_SHARED",action="store_true",
|
||||
help="Enable shard build.",default=False)
|
||||
|
||||
parser.add_option("--min","--min_build",dest="BUILD_MIN",action="store_true",
|
||||
help="Build Minimal netcdf. No netcdf4, dap, diskless, etc.",default=True)
|
||||
|
||||
parser.add_option("-d","--debug",dest="BUILD_DEBUG",action="store_true",
|
||||
help="Build with debug options (-ggdb, -O0)",default=False)
|
||||
|
||||
parser.add_option("-e","--echo",dest="ECHO_ONLY",action="store_true",
|
||||
help="Don't execute configure, just echo output.",default=False)
|
||||
(options,args) = parser.parse_args()
|
||||
#print("options:",str(options))
|
||||
#print("arguments:",args)
|
||||
all_args = parse_options(options)
|
||||
print all_args
|
||||
if options.ECHO_ONLY == False:
|
||||
os.system(all_args)
|
||||
|
||||
main()
|
||||
|
||||
|
||||
|
||||
|
@ -367,6 +367,11 @@ extern int NCDAP_urlparse(const char* s, void** dapurl);
|
||||
extern void NCDAP_urlfree(void* dapurl);
|
||||
extern const char* NCDAP_urllookup(void* dapurl, const char* param);
|
||||
|
||||
/* Test for specific set of servers */
|
||||
extern const char* NC_findtestserver(const char*);
|
||||
/* Ping a specific server */
|
||||
extern int NCDAP_ping(const char*);
|
||||
|
||||
/* Misc */
|
||||
|
||||
extern int NC_getshape(int ncid, int varid, int ndims, size_t* shape);
|
||||
|
@ -121,6 +121,7 @@ extern "C" {
|
||||
#define NC_NOCLOBBER 0x0004 /**< Don't destroy existing file. Mode flag for nc_create(). */
|
||||
|
||||
#define NC_DISKLESS 0x0008 /**< Use diskless file. Mode flag for nc_open() or nc_create(). */
|
||||
#define NC_MMAP 0x0010 /**< Use diskless file with mmap. Mode flag for nc_open() or nc_create(). */
|
||||
|
||||
#define NC_CLASSIC_MODEL 0x0100 /**< Enforce classic model. Mode flag for nc_create(). */
|
||||
#define NC_64BIT_OFFSET 0x0200 /**< Use large (64-bit) file offsets. Mode flag for nc_create(). */
|
||||
@ -368,7 +369,7 @@ by the desired type. */
|
||||
#define NC_ESTORAGE (-126) /**< Can't specify both contiguous and chunking. */
|
||||
#define NC_EBADCHUNK (-127) /**< Bad chunksize. */
|
||||
#define NC_ENOTBUILT (-128) /**< Attempt to use feature that was not turned on when netCDF was built. */
|
||||
#define NC_EDISKLESS (-129) /**< Error in using diskless access. */
|
||||
#define NC_EDISKLESS (-129) /**< Error in using diskless access. */
|
||||
|
||||
#define NC4_LAST_ERROR (-129)
|
||||
|
||||
|
@ -682,3 +682,11 @@ getdefinename(CDFnode* node)
|
||||
}
|
||||
return spath;
|
||||
}
|
||||
|
||||
int
|
||||
NCDAP_ping(const char* url)
|
||||
{
|
||||
OCerror ocstat = OC_NOERR;
|
||||
ocstat = oc_ping(url);
|
||||
return ocerrtoncerr(ocstat);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <string.h>
|
||||
#include <netcdf.h>
|
||||
|
||||
#define URL "http://motherlode.ucar.edu:8081/dts/test.06"
|
||||
#define DTSTEST "/dts/test.06"
|
||||
|
||||
/* The DDS in netcdf classic form is as follows:
|
||||
netcdf test {
|
||||
@ -78,7 +78,18 @@ main()
|
||||
int retval,i;
|
||||
size_t start[RANK];
|
||||
size_t count[RANK];
|
||||
char URL[4096];
|
||||
const char* svc = NULL:
|
||||
|
||||
/* Find Test Server *.
|
||||
svc = NC_findtestserver("dts");
|
||||
if(svc == NULL) {
|
||||
fprintf(stderr,"Cannot locate test server\n");
|
||||
exit(1);
|
||||
}
|
||||
strcpy(URL,svc);
|
||||
strcat(URL,DTSTEST);
|
||||
|
||||
memset((void*)target,0,sizeof(target));
|
||||
|
||||
if((retval = nc_open(URL, NC_NOWRITE, &ncid)))
|
||||
|
@ -26,6 +26,21 @@ static struct NCPROTOCOLLIST {
|
||||
{NULL,NULL,0} /* Terminate search */
|
||||
};
|
||||
|
||||
/* Define the server to ping in order;
|
||||
make the order attempt to optimize
|
||||
against future changes.
|
||||
*/
|
||||
static const char* servers[] = {
|
||||
"http://motherlode.ucar.edu:8081", /* try this first */
|
||||
"http://remotetest.unidata.ucar.edu",
|
||||
"http://remotetest.ucar.edu",
|
||||
"http://motherlode.ucar.edu:8080",
|
||||
"http://motherlode.ucar.edu",
|
||||
"http://remotetests.unidata.ucar.edu",
|
||||
"http://remotetests.ucar.edu",
|
||||
NULL
|
||||
};
|
||||
|
||||
/*
|
||||
static nc_type longtype = (sizeof(long) == sizeof(int)?NC_INT:NC_INT64);
|
||||
static nc_type ulongtype = (sizeof(unsigned long) == sizeof(unsigned int)?NC_UINT:NC_UINT64);
|
||||
@ -46,6 +61,31 @@ NCDISPATCH_initialize(void)
|
||||
return NC_NOERR;
|
||||
}
|
||||
|
||||
/* search list of servers and return first that succeeds when
|
||||
concatenated with the specified path part
|
||||
*/
|
||||
const char*
|
||||
NC_findtestserver(const char* path)
|
||||
{
|
||||
/* NCDAP_ping is defined in libdap2/ncdap3.c */
|
||||
#ifdef USE_DAP
|
||||
const char** svc;
|
||||
if(path == NULL) path = "";
|
||||
for(svc=servers;*svc != NULL;svc++) {
|
||||
char url[4096];
|
||||
snprintf(url,sizeof(url),"%s%s%s",
|
||||
*svc,
|
||||
(path[0] == '/' ? "" : "/"),
|
||||
path);
|
||||
int stat = NCDAP_ping(url);
|
||||
if(stat == NC_NOERR)
|
||||
return *svc;
|
||||
}
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* return 1 if path looks like a url; 0 otherwise */
|
||||
int
|
||||
NC_testurl(const char* path)
|
||||
|
@ -219,7 +219,9 @@ to many extensions to the in-memory space for the file.
|
||||
|
||||
Normally, NC_DISKLESS allocates space in the heap for storing
|
||||
the in-memory file. If, however, the ./configure flags --enable-mmap
|
||||
is used, then mmap will be used.
|
||||
is used, and the additional mode flag NC_MMAP
|
||||
is specified, then the file will be created using the operating system
|
||||
MMAP facility.
|
||||
|
||||
Note that nc_create(path,cmode,ncidp) is equivalent to the invocation of
|
||||
nc__create(path,cmode,NC_SIZEHINT_DEFAULT,NULL,ncidp).
|
||||
@ -307,7 +309,7 @@ diskless.nc whose content will be lost when nc_close() is called.
|
||||
int status = NC_NOERR;
|
||||
int ncid;
|
||||
...
|
||||
status = nc_create("foo_HDF5_classic.nc", NC_DISKLESS, &ncid);
|
||||
status = nc_create("diskless.nc", NC_DISKLESS, &ncid);
|
||||
if (status != NC_NOERR) handle_error(status);
|
||||
@endcode
|
||||
|
||||
@ -321,7 +323,7 @@ in a file named diskless.nc when nc_close() is called.
|
||||
int status = NC_NOERR;
|
||||
int ncid;
|
||||
...
|
||||
status = nc_create("foo_HDF5_classic.nc", NC_DISKLESS|NC_WRITE, &ncid);
|
||||
status = nc_create("diskless.nc", NC_DISKLESS|NC_WRITE, &ncid);
|
||||
if (status != NC_NOERR) handle_error(status);
|
||||
@endcode
|
||||
|
||||
@ -457,8 +459,9 @@ access, programs that do not access data sequentially may see some
|
||||
performance improvement by setting the NC_SHARE flag.
|
||||
|
||||
This procedure may also be invoked with the NC_DISKLESS flag
|
||||
set in the mode argument, but ONLY if the file type is NOT NC_NETCDF4,
|
||||
which means it must be a classic format file.
|
||||
set in the mode argument if the file to be opened
|
||||
is a classic format file. If the file is of type NC_NETCDF4,
|
||||
then the NC_DISKLESS flag will be ignored.
|
||||
If NC_DISKLESS is specified, then the whole file is read completely into
|
||||
memory. In effect this creates an in-memory cache of the file.
|
||||
If the mode flag also specifies NC_WRITE, then the in-memory cache
|
||||
|
@ -19,11 +19,10 @@ nclistmgr.c putget.c attr.c nc3dispatch.c nc.c var.c dim.c ncx.c \
|
||||
ncx.h lookup3.c pstdint.h ncio.c ncio.h
|
||||
|
||||
if BUILD_DISKLESS
|
||||
libnetcdf3_la_SOURCES += memio.c
|
||||
if BUILD_MMAP
|
||||
libnetcdf3_la_SOURCES += mmapio.c
|
||||
else !BUILD_MMAP
|
||||
libnetcdf3_la_SOURCES += memio.c
|
||||
endif !BUILD_MMAP
|
||||
endif BUILD_MMAP
|
||||
endif BUILD_DISKLESS
|
||||
|
||||
# Does the user want to use ffio, a replacement for posixio for Cray
|
||||
|
@ -28,10 +28,9 @@ extern int ffio_open(const char*,int,off_t,size_t,size_t*,ncio**,void** const);
|
||||
# ifdef USE_MMAP
|
||||
extern int mmapio_create(const char*,int,size_t,off_t,size_t,size_t*,ncio**,void** const);
|
||||
extern int mmapio_open(const char*,int,off_t,size_t,size_t*,ncio**,void** const);
|
||||
# else
|
||||
# endif
|
||||
extern int memio_create(const char*,int,size_t,off_t,size_t,size_t*,ncio**,void** const);
|
||||
extern int memio_open(const char*,int,off_t,size_t,size_t*,ncio**,void** const);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
int
|
||||
@ -40,12 +39,14 @@ ncio_create(const char *path, int ioflags, size_t initialsz,
|
||||
ncio** iopp, void** const mempp)
|
||||
{
|
||||
#ifdef USE_DISKLESS
|
||||
if(fIsSet(ioflags,NC_DISKLESS))
|
||||
if(fIsSet(ioflags,NC_DISKLESS)) {
|
||||
# ifdef USE_MMAP
|
||||
if(fIsSet(ioflags,NC_MMAP))
|
||||
return mmapio_create(path,ioflags,initialsz,igeto,igetsz,sizehintp,iopp,mempp);
|
||||
# else
|
||||
else
|
||||
# endif /*USE_MMAP*/
|
||||
return memio_create(path,ioflags,initialsz,igeto,igetsz,sizehintp,iopp,mempp);
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_FFIO
|
||||
@ -66,10 +67,11 @@ ncio_open(const char *path, int ioflags,
|
||||
#ifdef USE_DISKLESS
|
||||
if(fIsSet(ioflags,NC_DISKLESS)) {
|
||||
# ifdef USE_MMAP
|
||||
return mmapio_open(path,ioflags,igeto,igetsz,sizehintp,iopp,mempp);
|
||||
# else
|
||||
return memio_open(path,ioflags,igeto,igetsz,sizehintp,iopp,mempp);
|
||||
# endif
|
||||
if(fIsSet(ioflags,NC_MMAP))
|
||||
return mmapio_open(path,ioflags,igeto,igetsz,sizehintp,iopp,mempp);
|
||||
else
|
||||
# endif /*USE_MMAP*/
|
||||
return memio_open(path,ioflags,igeto,igetsz,sizehintp,iopp,mempp);
|
||||
}
|
||||
#endif
|
||||
#ifdef USE_FFIO
|
||||
|
@ -25,11 +25,6 @@ if BUILD_DOCS
|
||||
# $(directory)/man_page_1.3: doxyfile.stamp
|
||||
# $(directory)/man_page_2.3: doxyfile.stamp
|
||||
|
||||
# Timestamp to prevent rebuilds.
|
||||
doxyfile.stamp:
|
||||
$(DOXYGEN) Doxyfile
|
||||
echo Timestamp > doxyfile.stamp
|
||||
|
||||
# Note: in order to work with distcheck,
|
||||
# the Doxyfile needs to be preprocessed
|
||||
# to insert actual location of $(srcdir)
|
||||
@ -38,13 +33,19 @@ doxyfile.stamp:
|
||||
#Doxyfile.tmp: Doxyfile
|
||||
# sed -e 's|$$[({]rootdir[})]|$(abs_top_srcdir)|g' <Doxyfile > ./Doxyfile.tmp
|
||||
|
||||
CLEANFILES = doxyfile.stamp html latex man
|
||||
|
||||
all-local: doxyfile.stamp
|
||||
clean-local:
|
||||
rm -rf $(top_builddir)/man4/man
|
||||
rm -rf $(top_builddir)/man4/html
|
||||
rm -rf $(top_builddir)/man4/latex
|
||||
endif
|
||||
|
||||
# Timestamp to prevent rebuilds.
|
||||
doxyfile.stamp:
|
||||
$(DOXYGEN) Doxyfile
|
||||
echo Timestamp > doxyfile.stamp
|
||||
|
||||
CLEANFILES = doxyfile.stamp html latex man
|
||||
|
||||
# This builds the docs from source, if necessary, and tars up
|
||||
# everything needed for the website. Run this and copy the resulting
|
||||
@ -53,5 +54,3 @@ clean-local:
|
||||
web-tarball: doxyfile.stamp
|
||||
cd html; tar cf ../netcdf_docs.tar *
|
||||
gzip -f netcdf_docs.tar
|
||||
|
||||
endif
|
||||
|
@ -2,7 +2,7 @@
|
||||
Documentation for getting and building netCDF
|
||||
|
||||
This document is for getting and building the netCDF C library and
|
||||
utilities, version 4.2. Other libraries that depend on the netCDF C
|
||||
utilities, version 4.2.1. Other libraries that depend on the netCDF C
|
||||
library, such as the Fortran and C++ libraries, are available as
|
||||
separate distributions that can be built and installed after the C
|
||||
library is successfully installed. The netCDF-Java library is also a
|
||||
@ -56,7 +56,7 @@ libraries. (And, optionally, the szlib library). Versions required are
|
||||
at least HDF5 1.8.8, zlib 1.2.5, and curl 7.18.0 or later.
|
||||
(Optionally, if building with szlib, get szip 2.0 or later.)
|
||||
|
||||
HDF5 1.8.8 and zlib 1.2.5 packages are available from the <a
|
||||
HDF5 1.8.9 and zlib 1.2.7 packages are available from the <a
|
||||
href="ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4">netCDF-4 ftp
|
||||
site</a>. If you wish to use the remote data client code, then you
|
||||
will also need libcurl, which can be obtained from the <a
|
||||
|
55
nc-config.in
55
nc-config.in
@ -21,6 +21,7 @@ has_hdf5="@HAS_HDF5@"
|
||||
has_szlib="@HAS_SZLIB@"
|
||||
version="@PACKAGE_NAME@ @PACKAGE_VERSION@"
|
||||
|
||||
has_f90="no"
|
||||
if type -p nf-config > /dev/null 2>&1; then
|
||||
fc=`nf-config --fc`
|
||||
fflags=`nf-config --fflags`
|
||||
@ -28,12 +29,20 @@ if type -p nf-config > /dev/null 2>&1; then
|
||||
has_f90=`nf-config --has-f90`
|
||||
fi
|
||||
|
||||
if type -p ncxx-config > /dev/null 2>&1; then
|
||||
has_cxx="no"
|
||||
has_cxx4="no"
|
||||
if type -p ncxx4-config > /dev/null 2>&1; then
|
||||
cxx4=`ncxx4-config --cxx`
|
||||
# cxxflags=`ncxx4-config --cxxflags`
|
||||
# cxxlibs=`ncxx4-config --cxxlibs`
|
||||
has_cxx4="yes"
|
||||
elif type -p ncxx-config > /dev/null 2>&1; then
|
||||
cxx=`ncxx-config --cxx`
|
||||
has_cxx=`ncxx-config --has_cxx`
|
||||
# cxxflags=`ncxx-config --cxxflags`
|
||||
# cxxlibs=`ncxx-config --cxxlibs`
|
||||
has_cxx="yes"
|
||||
fi
|
||||
|
||||
|
||||
usage()
|
||||
{
|
||||
cat <<EOF
|
||||
@ -58,10 +67,18 @@ Available values for OPTION include:
|
||||
--version Library version
|
||||
|
||||
EOF
|
||||
if type -p ncxx-config > /dev/null 2>&1; then
|
||||
# When supported by ncxx4-config and ncxx-config, add
|
||||
# --cxxflags flags needed to compile a netCDF-4 C++ program
|
||||
# --cxxlibs libraries needed to link a netCDF-4 C++ program
|
||||
if type -p ncxx4-config > /dev/null 2>&1; then
|
||||
cat <<EOF
|
||||
--cxx4 C++ compiler for netCDF-4 C++ library
|
||||
--has-c++4 whether netCDF-4 C++ API is installed
|
||||
EOF
|
||||
elif type -p ncxx-config > /dev/null 2>&1; then
|
||||
cat <<EOF
|
||||
--cxx C++ compiler
|
||||
--has-c++ whether C++ API is enabled in this build
|
||||
--has-c++ whether C++ API is installed
|
||||
|
||||
EOF
|
||||
fi
|
||||
@ -70,7 +87,7 @@ if type -p nf-config > /dev/null 2>&1; then
|
||||
--fc Fortran compiler
|
||||
--fflags flags needed to compile a Fortran program
|
||||
--flibs libraries needed to link a Fortran program
|
||||
--has-f90 whether Fortran 90 API is enabled in this build
|
||||
--has-f90 whether Fortran 90 API is installed
|
||||
|
||||
EOF
|
||||
fi
|
||||
@ -86,8 +103,12 @@ all()
|
||||
echo " --cflags -> $cflags"
|
||||
echo " --libs -> $libs"
|
||||
echo
|
||||
echo " --cxx -> $cxx"
|
||||
echo " --has-c++ -> $has_cxx"
|
||||
echo " --cxx -> $cxx"
|
||||
# echo " --cxxflags -> $cxxflags"
|
||||
# echo " --cxxlibs -> $cxxlibs"
|
||||
echo " --has-c++4 -> $has_cxx4"
|
||||
echo " --cxx4 -> $cxx4"
|
||||
echo
|
||||
echo " --fc -> $fc"
|
||||
echo " --fflags -> $fflags"
|
||||
@ -183,14 +204,30 @@ while test $# -gt 0; do
|
||||
echo $version
|
||||
;;
|
||||
|
||||
--has-c++)
|
||||
echo $has_cxx
|
||||
;;
|
||||
|
||||
--cxx)
|
||||
echo $cxx
|
||||
;;
|
||||
|
||||
--has-c++)
|
||||
echo $has_cxx
|
||||
--has-c++4)
|
||||
echo $has_cxx4
|
||||
;;
|
||||
|
||||
--cxx4)
|
||||
echo $cxx4
|
||||
;;
|
||||
|
||||
# --cxxflags)
|
||||
# echo $cxxflags
|
||||
# ;;
|
||||
#
|
||||
# --cxxlibs)
|
||||
# echo $cxxlibs
|
||||
# ;;
|
||||
|
||||
--fc)
|
||||
echo $fc
|
||||
;;
|
||||
|
@ -62,6 +62,9 @@ TESTS = $(TESTPROGRAMS)
|
||||
|
||||
if BUILD_DISKLESS
|
||||
TESTS += run_diskless.sh
|
||||
if BUILD_MMAP
|
||||
TESTS += run_mmap.sh
|
||||
endif
|
||||
if LARGE_FILE_TESTS
|
||||
TESTS += run_diskless2.sh
|
||||
endif
|
||||
@ -81,7 +84,7 @@ endif # USE_VALGRIND_TESTS
|
||||
# Distribute the .c files so that m4 isn't required on the users
|
||||
# machine.
|
||||
EXTRA_DIST = test_get.m4 test_put.m4 run_valgrind_tests.sh \
|
||||
run_diskless.sh run_diskless2.sh
|
||||
run_diskless.sh run_diskless2.sh run_mmap.sh
|
||||
|
||||
# ref_tst_diskless2.cdl is for diff comparison and to produce tst_diskless2.c
|
||||
EXTRA_DIST += ref_tst_diskless2.cdl
|
||||
|
63
nc_test/run_mmap.sh
Executable file
63
nc_test/run_mmap.sh
Executable file
@ -0,0 +1,63 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# Get the target OS and CPU
|
||||
CPU=`uname -p`
|
||||
OS=`uname`
|
||||
|
||||
|
||||
#Constants
|
||||
FILE1=tst_diskless.nc
|
||||
FILE2=tst_diskless2.nc
|
||||
FILE3=tst_diskless3.nc
|
||||
|
||||
echo ""
|
||||
echo "*** Testing in-memory (diskless) files with mmap"
|
||||
|
||||
HASNC4=`../nc-config --has-nc4`
|
||||
|
||||
echo "**** Test diskless+mmap netCDF classic file without persistence"
|
||||
./tst_diskless mmap
|
||||
echo "PASS: diskless+mmap netCDF classic file without persistence"
|
||||
|
||||
echo ""
|
||||
echo "**** Test diskless+mmap netCDF classic file with persistence"
|
||||
rm -f $FILE1
|
||||
./tst_diskless mmap persist
|
||||
if test -f $FILE1 ; then
|
||||
echo "**** $FILE1 created"
|
||||
# ../ncdump/ncdump $FILE1
|
||||
echo "PASS: diskless+mmap netCDF classic file with persistence"
|
||||
else
|
||||
echo "#### $FILE1 not created"
|
||||
echo "FAIL: diskless+mmap netCDF classic file with persistence"
|
||||
fi
|
||||
|
||||
rm -f tmp1.cdl tmp2.cdl tmp1.nc tmp2.nc
|
||||
|
||||
echo ""
|
||||
echo "**** Testing nc_open in-memory (diskless+mmap) files"
|
||||
|
||||
# clear old files
|
||||
rm -f tst_diskless3_file.cdl tst_diskless3_memory.cdl
|
||||
|
||||
echo ""
|
||||
echo "**** Create and modify file without using diskless+mmap"
|
||||
rm -f $FILE3
|
||||
./tst_diskless3
|
||||
../ncdump/ncdump $FILE3 >tst_diskless3_file.cdl
|
||||
|
||||
echo ""
|
||||
echo "**** Create and modify file using diskless+mmap"
|
||||
rm -f $FILE3
|
||||
./tst_diskless3 diskless mmap
|
||||
../ncdump/ncdump $FILE3 >tst_diskless3_memory.cdl
|
||||
|
||||
# compare
|
||||
diff tst_diskless3_file.cdl tst_diskless3_memory.cdl
|
||||
|
||||
# cleanup
|
||||
rm -f $FILE3 tst_diskless3_file.cdl tst_diskless3_memory.cdl
|
||||
|
||||
exit
|
@ -5,6 +5,8 @@ Copyright 2011, UCAR/Unidata. See COPYRIGHT file for copying and
|
||||
redistribution conditions.
|
||||
*/
|
||||
|
||||
#undef DDBG
|
||||
|
||||
#include <config.h>
|
||||
#include <nc_tests.h>
|
||||
#include <stdio.h>
|
||||
@ -20,6 +22,20 @@ redistribution conditions.
|
||||
#define CAPACITOR "capacitor_value"
|
||||
#define NUM555 "number_of_555_timer_chips"
|
||||
|
||||
#ifdef DDBG
|
||||
#undef ERR
|
||||
void fail(int line) {
|
||||
fflush(stdout);
|
||||
fprintf(stderr,"\nline=%d\n",line);
|
||||
fflush(stderr);
|
||||
exit(1);
|
||||
}
|
||||
#define ERR fail(__LINE__)
|
||||
#endif
|
||||
|
||||
/* Control flags */
|
||||
static int flags, persist, usenetcdf4, mmap;
|
||||
|
||||
static void
|
||||
removefile(int persist, char* filename)
|
||||
{
|
||||
@ -37,17 +53,18 @@ removefile(int persist, char* filename)
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
|
||||
int i, flags, persist, usenetcdf4;
|
||||
int i;
|
||||
char* filename = "tst_diskless.nc";
|
||||
|
||||
/* Set defaults */
|
||||
persist = 0;
|
||||
usenetcdf4 = 0;
|
||||
mmap = 0;
|
||||
|
||||
for(i=1;i<argc;i++) {
|
||||
if(strcmp(argv[i],"netcdf4")==0) usenetcdf4=1;
|
||||
else if(strcmp(argv[i],"persist")==0) persist=1;
|
||||
else if(strcmp(argv[i],"mmap")==0) mmap=1;
|
||||
/* ignore anything not recognized */
|
||||
}
|
||||
|
||||
@ -55,9 +72,12 @@ main(int argc, char **argv)
|
||||
usenetcdf4 = 0;
|
||||
#endif
|
||||
|
||||
if(mmap)
|
||||
usenetcdf4 = 0;
|
||||
|
||||
flags = usenetcdf4?FLAGS4:FLAGS3;
|
||||
if(persist) flags |= PERSIST;
|
||||
|
||||
if(mmap) flags |= NC_MMAP;
|
||||
|
||||
printf("\n*** Testing the diskless API.\n");
|
||||
printf("*** testing diskless file with scalar vars...");
|
||||
@ -113,6 +133,33 @@ printf("*** testing diskless file with scalar vars...");
|
||||
abort(); //ERR;
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
|
||||
if(!usenetcdf4 && persist) {
|
||||
int ncid, varid0, varid1, varid2;
|
||||
float float_data = 3.14, float_data_in;
|
||||
int int_data = 42, int_data_in;
|
||||
short short_data = 2, short_data_in;
|
||||
|
||||
printf("*** testing diskless open of previously created file...");
|
||||
|
||||
if (nc_open(filename, flags, &ncid)) ERR;
|
||||
|
||||
/* Read and compare */
|
||||
if (nc_inq_varid(ncid, RESISTOR, &varid0)) ERR;
|
||||
if (nc_inq_varid(ncid, CAPACITOR, &varid1)) ERR;
|
||||
if (nc_inq_varid(ncid, NUM555, &varid2)) ERR;
|
||||
|
||||
if (nc_get_vara_int(ncid, varid0, NULL, NULL, &int_data_in)) ERR;
|
||||
if (int_data_in != int_data) ERR;
|
||||
if (nc_get_vara_float(ncid, varid1, NULL, NULL, &float_data_in)) ERR;
|
||||
if (float_data_in != float_data) ERR;
|
||||
if (nc_get_vara_short(ncid, varid2, NULL, NULL, &short_data_in)) ERR;
|
||||
if (short_data_in != short_data) ERR;
|
||||
|
||||
nc_close(ncid);
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
|
||||
printf("*** testing creation of simple diskless file...");
|
||||
{
|
||||
#define NDIMS 2
|
||||
|
@ -34,14 +34,16 @@
|
||||
#define TITLE " OUTPUT FROM WRF V2.0.3.1 MODEL"
|
||||
#define ATT_NAME2 "TITLE"
|
||||
|
||||
/* Global */
|
||||
int diskless = 0;
|
||||
|
||||
#undef ERR
|
||||
#define ERR report(status,__LINE__)
|
||||
|
||||
static int status = NC_NOERR;
|
||||
|
||||
/* Control flags */
|
||||
static int persist, usenetcdf4, mmap, diskless;
|
||||
|
||||
static int diskmode;
|
||||
|
||||
void report(int stat, int lno)
|
||||
{
|
||||
fprintf(stderr,"line: %d ; %s\n",stat,nc_strerror(stat));
|
||||
@ -91,7 +93,7 @@ test_two_growing_with_att(const char *testfile)
|
||||
if((status=nc_close(ncid))) ERR;
|
||||
|
||||
/* Reopen the file and check it. */
|
||||
if((status=nc_open(testfile, NC_DISKLESS|NC_WRITE, &ncid))) ERR;
|
||||
if((status=nc_open(testfile, diskmode|NC_WRITE, &ncid))) ERR;
|
||||
if((status=nc_inq_dimlen(ncid, 0, &len_in))) ERR;
|
||||
if (len_in != r + 1) ERR;
|
||||
index[0] = r;
|
||||
@ -131,7 +133,7 @@ test_one_with_att(const char *testfile)
|
||||
if((status=nc_close(ncid))) ERR;
|
||||
|
||||
/* Reopen the file and check it. */
|
||||
if((status=nc_open(testfile, NC_DISKLESS|NC_WRITE, &ncid))) ERR;
|
||||
if((status=nc_open(testfile, diskmode|NC_WRITE, &ncid))) ERR;
|
||||
if((status=nc_inq(ncid, &ndims, &nvars, &natts, &unlimdimid))) ERR;
|
||||
if (ndims != 1 && nvars != 1 && natts != 0 && unlimdimid != 0) ERR;
|
||||
if((status=nc_get_var_text(ncid, varid, &data_in))) ERR;
|
||||
@ -146,10 +148,31 @@ test_one_with_att(const char *testfile)
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
diskless = (argc > 1);
|
||||
int i;
|
||||
|
||||
printf("\n*** Testing diskless file: create/modify %s: %s\n",
|
||||
diskless?"in-memory":"in-file",NCFILENAME);
|
||||
/* Set defaults */
|
||||
persist = 0;
|
||||
usenetcdf4 = 0;
|
||||
mmap = 0;
|
||||
diskless = 0;
|
||||
diskmode = 0;
|
||||
|
||||
for(i=1;i<argc;i++) {
|
||||
if(strcmp(argv[i],"diskless")==0) diskless=1;
|
||||
else if(strcmp(argv[i],"mmap")==0) mmap=1;
|
||||
/* ignore anything not recognized */
|
||||
}
|
||||
|
||||
if(diskless)
|
||||
diskmode |= NC_DISKLESS;
|
||||
if(diskless && mmap)
|
||||
diskmode |= NC_MMAP;
|
||||
|
||||
printf("\n*** Testing diskless file: create/modify %s",
|
||||
diskless?"in-memory":"in-file");
|
||||
if(diskless && mmap)
|
||||
printf("+mmap");
|
||||
printf(" %s\n",NCFILENAME);
|
||||
|
||||
/* case NC_FORMAT_CLASSIC: only test this format */
|
||||
nc_set_default_format(NC_FORMAT_CLASSIC, NULL);
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "netcdf.h"
|
||||
|
||||
#define FILE_NAME "tst_files.nc"
|
||||
#define URL "http://motherlode.ucar.edu:8081/dts/test.01"
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
@ -52,13 +51,6 @@ main(int argc, char **argv)
|
||||
strcpy(path_in, "");
|
||||
path_len = 0;
|
||||
|
||||
/* #ifdef USE_DAP */
|
||||
/* /\* Test with URL. *\/ */
|
||||
/* if (nc_open(URL, 0, &ncid)) ERR; */
|
||||
/* if (nc_inq_path(ncid, &path_len, path_in)) ERR; */
|
||||
/* /\*if (path_len != strlen(URL) || strcmp(path_in, URL)) ERR;*\/ */
|
||||
/* if (nc_close(ncid)) ERR; */
|
||||
/* #endif /\* USE_DAP *\/ */
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
FINAL_RESULTS;
|
||||
|
@ -8,26 +8,12 @@
|
||||
#include <nc_tests.h>
|
||||
#include "netcdf.h"
|
||||
|
||||
#define URL "http://motherlode.ucar.edu:8081/dts/test.01"
|
||||
#define FILE_NAME "tst_files6.nc"
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
printf("\n*** Testing netcdf file functions some more.\n");
|
||||
#ifdef USE_DAP
|
||||
#ifdef ENABLE_DAP_REMOTE_TESTS
|
||||
printf("*** testing simple opendap open/close...");
|
||||
{
|
||||
int ncid;
|
||||
|
||||
/* Test with URL. */
|
||||
if (nc_open(URL, 0, &ncid)) ERR;
|
||||
if (nc_close(ncid)) ERR;
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
#endif /*ENABLE_DAP_REMOTE_TESTS*/
|
||||
#endif /* USE_DAP */
|
||||
printf("*** testing Jeff Whitaker's test...");
|
||||
{
|
||||
#define DIM_NAME "xc"
|
||||
|
@ -14,12 +14,17 @@ check_PROGRAMS =
|
||||
TESTS =
|
||||
TESTS_ENVIRONMENT=TOPSRCDIR=${abs_top_srcdir}
|
||||
|
||||
# Make nctestserver be the first test to be built
|
||||
check_PROGRAMS += nctestserver
|
||||
nctestserver_SOURCES = nctestserver.c
|
||||
|
||||
TESTS += tst_ncdap3.sh
|
||||
|
||||
# remote tests are optional
|
||||
# because the server may be down or inaccessible
|
||||
|
||||
if ENABLE_DAP_REMOTE_TESTS
|
||||
|
||||
TESTS += tst_remote3.sh
|
||||
|
||||
if ENABLE_DAP_LONG_TESTS
|
||||
@ -97,5 +102,3 @@ BUILT_SOURCES = .dodsrc
|
||||
echo "#DODSRC" >.dodsrc
|
||||
|
||||
DISTCLEANFILES = .dodsrc results/* results
|
||||
|
||||
|
||||
|
25
ncdap_test/nctestserver.c
Normal file
25
ncdap_test/nctestserver.c
Normal file
@ -0,0 +1,25 @@
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "netcdf.h"
|
||||
#include "ncdispatch.h"
|
||||
|
||||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
const char* url = NULL;
|
||||
if(argc == 1) {
|
||||
fprintf(stderr,"no path specified");
|
||||
printf("%s","");
|
||||
exit(1);
|
||||
}
|
||||
url = NC_findtestserver(argv[1]);
|
||||
if(url == NULL)
|
||||
url = "";
|
||||
printf("%s",url);
|
||||
fflush(stdout);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@ Test part variable fetch code
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <netcdf.h>
|
||||
#include <ncdispatch.h>
|
||||
|
||||
/* The DDS in netcdf classic form is as follows:
|
||||
netcdf ingrid {
|
||||
@ -20,7 +21,7 @@ variables:
|
||||
*/
|
||||
|
||||
#define PARAMS ""
|
||||
#define URL "http://motherlode.ucar.edu:8081/dts/ingrid"
|
||||
#define DTSTEST "/dts/ingrid"
|
||||
#define VAR "v3H"
|
||||
#define ISTA 35
|
||||
#define IZ 44
|
||||
@ -93,9 +94,17 @@ main()
|
||||
size_t count[RANK];
|
||||
size_t offset;
|
||||
char url[4096];
|
||||
const char* svc = NULL;
|
||||
|
||||
/* Find Test Server */
|
||||
svc = NC_findtestserver("dts");
|
||||
if(svc == NULL) {
|
||||
fprintf(stderr,"Cannot locate test server\n");
|
||||
exit(1);
|
||||
}
|
||||
strcpy(url,PARAMS);
|
||||
strcat(url,URL);
|
||||
strcat(url,svc);
|
||||
strcat(url,DTSTEST);
|
||||
|
||||
printf("test_partvar: url=%s\n",url);
|
||||
|
||||
|
@ -6,6 +6,7 @@ Test part variable fetch code
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <netcdf.h>
|
||||
#include <ncdispatch.h>
|
||||
|
||||
/* The DDS in netcdf classic form is as follows:
|
||||
netcdf test {
|
||||
@ -25,8 +26,9 @@ variables:
|
||||
double PolarGrid.Data\\ Fields.Spectra(Bands\:PolarGrid, YDim\:PolarGrid, XDim\:PolarGrid) ;
|
||||
*/
|
||||
|
||||
#define DTSTEST "/dts/test.GridFile"
|
||||
|
||||
#define PARAMS ""
|
||||
#define URL "http://motherlode.ucar.edu:8081/dts/test.GridFile"
|
||||
#define VAR "UTMGrid.Data Fields.Vegetation"
|
||||
#define YDim_UTMGrid 200
|
||||
#define XDim_UTMGrid 120
|
||||
@ -82,10 +84,18 @@ main()
|
||||
size_t start[RANK];
|
||||
size_t count[RANK];
|
||||
size_t offset;
|
||||
const char* svc = NULL;
|
||||
char url[4096];
|
||||
|
||||
/* Find Test Server */
|
||||
svc = NC_findtestserver("dts");
|
||||
if(svc == NULL) {
|
||||
fprintf(stderr,"Cannot locate test server\n");
|
||||
exit(1);
|
||||
}
|
||||
strcpy(url,PARAMS);
|
||||
strcat(url,URL);
|
||||
strcat(url,svc);
|
||||
strcat(url,DTSTEST);
|
||||
|
||||
printf("test_partvar: url=%s\n",url);
|
||||
|
||||
|
@ -8,18 +8,21 @@
|
||||
# than the one containing it; so capture the path to this script
|
||||
# as the location of the source directory.
|
||||
srcdir=`dirname $0`
|
||||
cd $srcdir
|
||||
srcdir=`pwd`
|
||||
|
||||
# compute the build directory
|
||||
# Do a hack to remove e.g. c: for CYGWIN
|
||||
cd `pwd`
|
||||
builddir=`pwd`/..
|
||||
# Hack for CYGWIN
|
||||
|
||||
# Hack for CYGWIN
|
||||
cd $srcdir
|
||||
srcdir=`pwd`
|
||||
if [ `uname | cut -d "_" -f 1` == "MINGW32" ]; then
|
||||
srcdir=`pwd | sed 's/\/c\//c:\//g'`
|
||||
builddir="$srcdir"/..
|
||||
builddir=`echo $builddir | sed 's/\/c\//c:\//g'`
|
||||
fi
|
||||
|
||||
|
||||
cd ${builddir}/ncdap_test
|
||||
|
||||
|
||||
|
@ -5,8 +5,13 @@ quiet=0
|
||||
leakcheck=0
|
||||
timing=0
|
||||
|
||||
# So we can switch more easily
|
||||
PORT=8081
|
||||
# Figure our dst server
|
||||
SVC=`./nctestserver dts`
|
||||
if test "x$SVC" = "x" ; then
|
||||
echo "cannot locate test server"
|
||||
exit
|
||||
fi
|
||||
DTS="$SVC/dts"
|
||||
|
||||
PARAMS="[log]"
|
||||
#PARAMS="${PARAMS}[show=fetch]"
|
||||
@ -62,14 +67,14 @@ PARAMS="${PARAMS}${CACHE}"
|
||||
##################################################
|
||||
|
||||
# For special testing
|
||||
REMOTEURLX="http://motherlode.ucar.edu:$PORT/dts"
|
||||
REMOTEURLX="$DTS"
|
||||
REMOTETESTSX="test.03"
|
||||
|
||||
REMOTEURLXC="http://motherlode.ucar.edu:$PORT/dts"
|
||||
REMOTEURLXC="$DTS"
|
||||
REMOTETESTSXC="test.03;1;s0,s1"
|
||||
|
||||
# These shorter tests are always run
|
||||
REMOTEURLS1="http://motherlode.ucar.edu:$PORT/dts"
|
||||
REMOTEURLS1="$DTS"
|
||||
REMOTETESTSS1="\
|
||||
test.01 test.02 test.04 test.05 test.06 test.07a test.07 \
|
||||
test.21 \
|
||||
@ -102,7 +107,7 @@ TOOBIGL1="parserBug0001 test.satimage Sat_Images test.32"
|
||||
ESCAPEDFAIL="test.dfr1 test.dfr2 test.dfr3 test.GridFile test.PointFile test.SwathFile test.sds6 test.sds7"
|
||||
|
||||
# Following tests are to check constraint handling
|
||||
REMOTEURLC1="http://motherlode.ucar.edu:$PORT/dts"
|
||||
REMOTEURLC1="$DTS"
|
||||
REMOTETESTSC1="\
|
||||
test.01;1;f64 \
|
||||
test.02;1;b[1:2:10] \
|
||||
@ -131,13 +136,12 @@ argo_all.cdp;1;&location.LATITUDE<1&location.LATITUDE>-1\
|
||||
# Test string access
|
||||
# this test cannot be used because the
|
||||
# dataset has a limited lifetime
|
||||
REMOTEURLC4="http://motherlode.ucar.edu:$PORT/thredds/dodsC/station/metar"
|
||||
REMOTETESTSC4="\
|
||||
Surface_METAR_20120101_0000.nc;1;weather[0:10]\
|
||||
"
|
||||
#REMOTEURLC4="http://motherlode.ucar.edu:$PORT/thredds/dodsC/station/metar"
|
||||
#REMOTETESTSC4="\
|
||||
#Surface_METAR_20120101_0000.nc;1;weather[0:10]"
|
||||
|
||||
# Constrained long tests
|
||||
REMOTEURLLC1="http://motherlode.ucar.edu:$PORT/dts"
|
||||
REMOTEURLLC1="$DTS"
|
||||
REMOTETESTSLC1="\
|
||||
test.03;2;s1"
|
||||
|
||||
@ -238,7 +242,6 @@ for i in $WHICHTESTS ; do
|
||||
C1) TESTURL="$REMOTEURLC1" ; TESTSET="$REMOTETESTSC1" ; constrained=1 ;;
|
||||
C2) TESTURL="$REMOTEURLC2" ; TESTSET="$REMOTETESTSC2" ; constrained=1 ;ncconstrained=0 ;;
|
||||
C3) TESTURL="$REMOTEURLC3" ; TESTSET="$REMOTETESTSC3" ; constrained=1 ;ncconstrained=0 ;;
|
||||
C4) TESTURL="$REMOTEURLC4" ; TESTSET="$REMOTETESTSC4" ; constrained=1 ;ncconstrained=0 ;;
|
||||
LC1) TESTURL="$REMOTEURLLC1" ; TESTSET="$REMOTETESTSLC1" ; constrained=1 ;;
|
||||
X) TESTURL="$REMOTEURLX" ; TESTSET="$REMOTETESTSX" ; constrained=0 ;;
|
||||
XC) TESTURL="$REMOTEURLXC" ; TESTSET="$REMOTETESTSXC" ; constrained=1 ;;
|
||||
|
@ -5,12 +5,13 @@
|
||||
# than the one containing it; so capture the path to this script
|
||||
# as the location of the source directory.
|
||||
srcdir=`dirname $0`
|
||||
cd $srcdir
|
||||
srcdir=`pwd`
|
||||
|
||||
|
||||
# compute the build directory
|
||||
builddir=`pwd`/..
|
||||
# Hack for CYGWIN
|
||||
cd $srcdir
|
||||
srcdir=`pwd`
|
||||
if [ `uname | cut -d "_" -f 1` == "MINGW32" ]; then
|
||||
srcdir=`pwd | sed 's/\/c\//c:\//g'`
|
||||
builddir="$srcdir"/..
|
||||
|
@ -69,10 +69,10 @@ ctest64.c:
|
||||
$(top_builddir)/ncgen/ncgen -v2 -lc -o ctest0_64.nc $(top_srcdir)/ncgen/c0.cdl > $(srcdir)/ctest64.c
|
||||
else
|
||||
ctest.c:
|
||||
cp ref_ctest.c ctest.c
|
||||
cp $(top_srcdir)/ncdump/ref_ctest.c $(top_srcdir)/ncdump/ctest.c
|
||||
|
||||
ctest64.c:
|
||||
cp ref_ctest64.c ctest64.c
|
||||
cp $(top_srcdir)/ncdump/ref_ctest64.c $(top_srcdir)/ncdump/ctest64.c
|
||||
endif
|
||||
|
||||
#if !BUILD_DLL
|
||||
|
@ -5,30 +5,84 @@
|
||||
set -e
|
||||
if test "x$srcdir" = "x"; then
|
||||
srcdir=`dirname $0`;
|
||||
export srcdir=$srcdir
|
||||
cd $srcdir
|
||||
#srcdir=`pwd`
|
||||
#export srcdir=$srcdir
|
||||
fi
|
||||
echo ""
|
||||
echo "*** Running extra netcdf-4 tests."
|
||||
|
||||
echo "*** dumping tst_string_data.nc to tst_string_data.cdl..."
|
||||
./ncdump tst_string_data.nc > tst_string_data.cdl
|
||||
echo "*** comparing tst_string_data.cdl with ref_tst_string_data.cdl..."
|
||||
diff -b tst_string_data.cdl $srcdir/ref_tst_string_data.cdl
|
||||
#
|
||||
# In windows, these tests fail because srcdir is prepended.
|
||||
# e.g., Instead of 'ncdump ref_tst_compounds2' the file would
|
||||
# contain:
|
||||
# 'ncdump ./ref_tst_compounds2'. This causes the test to fail.
|
||||
# But, 'srcdir' is necessary for make distcheck.
|
||||
#
|
||||
# Short term solution, use sed when on windows/MSYS to
|
||||
# remove the './','../../ncdump'.
|
||||
#
|
||||
|
||||
if [ `uname | cut -d "_" -f 1` == "MINGW32" ]; then # MINGW Platforms
|
||||
|
||||
echo "*** dumping tst_string_data.nc to tst_string_data.cdl..."
|
||||
|
||||
./ncdump tst_string_data.nc > tst_string_data.cdl
|
||||
TMPNAME=`head -n 1 tst_string_data.cdl | cut -d" " -f 2`
|
||||
NEWNAME=`basename $TMPNAME`
|
||||
sed "s,$TMPNAME,$NEWNAME,g" tst_string_data.cdl > tmp.cdl
|
||||
mv tmp.cdl tst_string_data.cdl
|
||||
echo "*** comparing tst_string_data.cdl with ref_tst_string_data.cdl..."
|
||||
diff -b tst_string_data.cdl $srcdir/ref_tst_string_data.cdl
|
||||
|
||||
echo '*** testing reference file ref_tst_compounds2.nc...'
|
||||
./ncdump $srcdir/ref_tst_compounds2.nc > tst_compounds2.cdl
|
||||
TMPNAME=`head -n 1 tst_compounds2.cdl | cut -d" " -f 2`
|
||||
NEWNAME=`basename $TMPNAME`
|
||||
sed "s,$TMPNAME,$NEWNAME,g" tst_compounds2.cdl > tmp.cdl
|
||||
mv tmp.cdl tst_compounds2.cdl
|
||||
diff -b tst_compounds2.cdl $srcdir/ref_tst_compounds2.cdl
|
||||
|
||||
echo '*** testing reference file ref_tst_compounds3.nc...'
|
||||
./ncdump $srcdir/ref_tst_compounds3.nc > tst_compounds3.cdl
|
||||
TMPNAME=`head -n 1 tst_compounds3.cdl | cut -d" " -f 2`
|
||||
NEWNAME=`basename $TMPNAME`
|
||||
sed "s,$TMPNAME,$NEWNAME,g" tst_compounds3.cdl > tmp.cdl
|
||||
mv tmp.cdl tst_compounds3.cdl
|
||||
diff -b tst_compounds3.cdl $srcdir/ref_tst_compounds3.cdl
|
||||
|
||||
echo '*** testing reference file ref_tst_compounds4.nc...'
|
||||
./ncdump $srcdir/ref_tst_compounds4.nc > tst_compounds4.cdl
|
||||
TMPNAME=`head -n 1 tst_compounds4.cdl | cut -d" " -f 2`
|
||||
NEWNAME=`basename $TMPNAME`
|
||||
sed "s,$TMPNAME,$NEWNAME,g" tst_compounds4.cdl > tmp.cdl
|
||||
mv tmp.cdl tst_compounds4.cdl
|
||||
diff -b tst_compounds4.cdl $srcdir/ref_tst_compounds4.cdl
|
||||
|
||||
else # Non-MINGW Platforms
|
||||
|
||||
echo "*** dumping tst_string_data.nc to tst_string_data.cdl..."
|
||||
./ncdump tst_string_data.nc > tst_string_data.cdl
|
||||
echo "*** comparing tst_string_data.cdl with ref_tst_string_data.cdl..."
|
||||
diff -b tst_string_data.cdl $srcdir/ref_tst_string_data.cdl
|
||||
|
||||
#echo '*** testing non-coordinate variable of same name as dimension...'
|
||||
#../ncgen/ncgen -v4 -b -o tst_noncoord.nc $srcdir/ref_tst_noncoord.cdl
|
||||
|
||||
echo '*** testing reference file ref_tst_compounds2.nc...'
|
||||
./ncdump ref_tst_compounds2.nc > tst_compounds2.cdl
|
||||
diff -b tst_compounds2.cdl $srcdir/ref_tst_compounds2.cdl
|
||||
echo '*** testing reference file ref_tst_compounds2.nc...'
|
||||
./ncdump $srcdir/ref_tst_compounds2.nc > tst_compounds2.cdl
|
||||
diff -b tst_compounds2.cdl $srcdir/ref_tst_compounds2.cdl
|
||||
|
||||
echo '*** testing reference file ref_tst_compounds3.nc...'
|
||||
./ncdump ref_tst_compounds3.nc > tst_compounds3.cdl
|
||||
diff -b tst_compounds3.cdl $srcdir/ref_tst_compounds3.cdl
|
||||
echo '*** testing reference file ref_tst_compounds3.nc...'
|
||||
./ncdump $srcdir/ref_tst_compounds3.nc > tst_compounds3.cdl
|
||||
diff -b tst_compounds3.cdl $srcdir/ref_tst_compounds3.cdl
|
||||
|
||||
echo '*** testing reference file ref_tst_compounds4.nc...'
|
||||
./ncdump ref_tst_compounds4.nc > tst_compounds4.cdl
|
||||
diff -b tst_compounds4.cdl $srcdir/ref_tst_compounds4.cdl
|
||||
echo '*** testing reference file ref_tst_compounds4.nc...'
|
||||
./ncdump $srcdir/ref_tst_compounds4.nc > tst_compounds4.cdl
|
||||
diff -b tst_compounds4.cdl $srcdir/ref_tst_compounds4.cdl
|
||||
|
||||
fi
|
||||
|
||||
echo "*** All ncgen and ncdump extra test output for netCDF-4 format passed!"
|
||||
exit 0
|
||||
|
||||
|
@ -17,14 +17,16 @@ static int tohex(int c);
|
||||
|
||||
/****************************************************/
|
||||
|
||||
#if 0 /* Following definitions are for informational purposes */
|
||||
/* Set of all ascii printable characters */
|
||||
static char ascii[] = " !\"#$%&'()*+,-./:;<=>?@[]\\^_`|{}~";
|
||||
|
||||
static char* ddsworddelims =
|
||||
"{}[]:;=,";
|
||||
|
||||
/* Define the set of legal nonalphanum characters as specified in the DAP2 spec. */
|
||||
static char* daplegal ="_!~*'-\"";
|
||||
#endif
|
||||
|
||||
static char* ddsworddelims =
|
||||
"{}[]:;=,";
|
||||
|
||||
/* Define 1 and > 1st legal characters */
|
||||
static char* ddswordchars1 =
|
||||
|
12
oc/oc.c
12
oc/oc.c
@ -13,6 +13,7 @@
|
||||
#include "ocdump.h"
|
||||
#include "oclog.h"
|
||||
#include "occlientparams.h"
|
||||
#include "ochttp.h"
|
||||
|
||||
#undef TRACK
|
||||
|
||||
@ -704,7 +705,7 @@ size_t oc_typesize(OCtype etype)
|
||||
return octypesize(etype);
|
||||
}
|
||||
|
||||
char*
|
||||
const char*
|
||||
oc_typetostring(OCtype octype)
|
||||
{
|
||||
return octypetoddsstring(octype);
|
||||
@ -722,7 +723,7 @@ oc_typeprint(OCtype etype, char* buf, size_t bufsize, void* value)
|
||||
/**************************************************/
|
||||
/* Miscellaneous */
|
||||
|
||||
char*
|
||||
const char*
|
||||
oc_errstring(int err)
|
||||
{
|
||||
return ocerrstring(err);
|
||||
@ -947,3 +948,10 @@ oc_dumpnode(OCconnection conn, OCobject root0)
|
||||
ocdumpnode(root);
|
||||
return ocerr;
|
||||
}
|
||||
|
||||
OCerror
|
||||
oc_ping(const char* url)
|
||||
{
|
||||
return ocping(url);
|
||||
}
|
||||
|
||||
|
16
oc/oc.h
16
oc/oc.h
@ -100,11 +100,11 @@ typedef int OCflags;
|
||||
#define OCONDISK 1
|
||||
|
||||
typedef enum OCmode {
|
||||
OCFIELDMODE = OC_Structure,
|
||||
OCSEQUENCEMODE = OC_Sequence,
|
||||
OCARRAYMODE = OC_Dimension,
|
||||
OCPRIMITIVEMODE = OC_Primitive,
|
||||
OCNULLMODE = OC_NAT,
|
||||
OCNULLMODE = 0,
|
||||
OCFIELDMODE = 1,
|
||||
OCSEQUENCEMODE = 2,
|
||||
OCARRAYMODE = 3,
|
||||
OCPRIMITIVEMODE = 4,
|
||||
OCEMPTYMODE = 0x8000000 /* internal use only */
|
||||
} OCmode;
|
||||
|
||||
@ -364,7 +364,7 @@ extern size_t oc_typesize(OCtype);
|
||||
/* Return a canonical printable string describing a given type:
|
||||
e.g. Byte, Int16, etc.
|
||||
*/
|
||||
extern char* oc_typetostring(OCtype);
|
||||
extern const char* oc_typetostring(OCtype);
|
||||
|
||||
/* Given a value of a primitive OC type, provide a canonical
|
||||
string representing that value
|
||||
@ -387,7 +387,7 @@ extern void oc_log(int tag, const char* fmt, ...);
|
||||
/* Miscellaneous */
|
||||
|
||||
/* Convert an OCerror to a human readable string */
|
||||
extern char* oc_errstring(int err);
|
||||
extern const char* oc_errstring(int err);
|
||||
|
||||
/* Get client parameters from the URL
|
||||
DO NOT free the result
|
||||
@ -430,6 +430,8 @@ extern OCerror oc_update_lastmodified_data(OClink);
|
||||
/* Get last known modification time; -1 => data unknown */
|
||||
extern long oc_get_lastmodified_data(OClink);
|
||||
|
||||
extern OCerror oc_ping(const char* url);
|
||||
|
||||
/**************************************************/
|
||||
|
||||
#endif /*OCINTERNAL_H*/
|
||||
|
56
oc/ochttp.c
56
oc/ochttp.c
@ -32,7 +32,7 @@ ocfetchhttpcode(CURL* curl)
|
||||
}
|
||||
|
||||
int
|
||||
ocfetchurl_file(CURL* curl, char* url, FILE* stream,
|
||||
ocfetchurl_file(CURL* curl, const char* url, FILE* stream,
|
||||
unsigned long* sizep, long* filetime)
|
||||
{
|
||||
int stat = OC_NOERR;
|
||||
@ -85,7 +85,7 @@ fail:
|
||||
}
|
||||
|
||||
int
|
||||
ocfetchurl(CURL* curl, char* url, OCbytes* buf, long* filetime)
|
||||
ocfetchurl(CURL* curl, const char* url, OCbytes* buf, long* filetime)
|
||||
{
|
||||
int stat = OC_NOERR;
|
||||
CURLcode cstat = CURLE_OK;
|
||||
@ -107,7 +107,7 @@ ocfetchurl(CURL* curl, char* url, OCbytes* buf, long* filetime)
|
||||
goto fail;
|
||||
|
||||
/* One last thing; always try to get the last modified time */
|
||||
cstat = curl_easy_setopt(curl, CURLOPT_FILETIME, (long)1);
|
||||
cstat = curl_easy_setopt(curl, CURLOPT_FILETIME, (long)1);
|
||||
|
||||
cstat = curl_easy_perform(curl);
|
||||
if(cstat == CURLE_PARTIAL_FILE) {
|
||||
@ -286,3 +286,53 @@ fail:
|
||||
oc_log(LOGERR, "curl error: %s", curl_easy_strerror(cstat));
|
||||
return OCTHROW(OC_ECURL);
|
||||
}
|
||||
|
||||
int
|
||||
ocping(const char* url)
|
||||
{
|
||||
int stat = OC_NOERR;
|
||||
CURLcode cstat = CURLE_OK;
|
||||
CURL* curl = NULL;
|
||||
OCbytes* buf = NULL;
|
||||
|
||||
/* Create a CURL instance */
|
||||
stat = occurlopen(&curl);
|
||||
if(stat != OC_NOERR) return stat;
|
||||
|
||||
/* use a very short timeout: 10 seconds */
|
||||
cstat = curl_easy_setopt(curl, CURLOPT_TIMEOUT, (long)10);
|
||||
if (cstat != CURLE_OK)
|
||||
goto done;
|
||||
|
||||
/* fail on HTTP 400 code errors */
|
||||
cstat = curl_easy_setopt(curl, CURLOPT_FAILONERROR, (long)1);
|
||||
if (cstat != CURLE_OK)
|
||||
goto done;
|
||||
|
||||
/* Try to get the file */
|
||||
buf = ocbytesnew();
|
||||
stat = ocfetchurl(curl,url,buf,NULL);
|
||||
if(stat == OC_NOERR) {
|
||||
/* Don't trust curl to return an error when request gets 404 */
|
||||
long http_code = 0;
|
||||
cstat = curl_easy_getinfo(curl,CURLINFO_RESPONSE_CODE, &http_code);
|
||||
if (cstat != CURLE_OK)
|
||||
goto done;
|
||||
if(http_code >= 400) {
|
||||
cstat = CURLE_HTTP_RETURNED_ERROR;
|
||||
goto done;
|
||||
}
|
||||
} else
|
||||
goto done;
|
||||
|
||||
done:
|
||||
ocbytesfree(buf);
|
||||
occurlclose(curl);
|
||||
if(cstat != CURLE_OK) {
|
||||
oc_log(LOGERR, "curl error: %s", curl_easy_strerror(cstat));
|
||||
stat = OC_EDAPSVC;
|
||||
}
|
||||
return OCTHROW(stat);
|
||||
}
|
||||
|
||||
|
||||
|
@ -7,8 +7,8 @@
|
||||
extern int curlopen(CURL** curlp);
|
||||
extern void curlclose(CURL*);
|
||||
|
||||
extern int ocfetchurl(CURL*, char*, OCbytes*, long*);
|
||||
extern int ocfetchurl_file(CURL*, char*, FILE*, unsigned long*, long*);
|
||||
extern int ocfetchurl(CURL*, const char*, OCbytes*, long*);
|
||||
extern int ocfetchurl_file(CURL*, const char*, FILE*, unsigned long*, long*);
|
||||
|
||||
extern long ocfetchhttpcode(CURL* curl);
|
||||
|
||||
@ -17,4 +17,6 @@ extern int ocfetchlastmodified(CURL* curl, char* url, long* filetime);
|
||||
extern int occurlopen(CURL** curlp);
|
||||
extern void occurlclose(CURL* curlp);
|
||||
|
||||
extern int ocping(const char* url);
|
||||
|
||||
#endif /*HTTP_H*/
|
||||
|
@ -22,10 +22,10 @@
|
||||
#include "ocread.h"
|
||||
|
||||
/* Note: TMPPATH must end in '/' */
|
||||
#ifdef __WIN32__
|
||||
#ifdef __CYGWIN__
|
||||
#define TMPPATH1 "/cygdrive/c/temp/"
|
||||
#define TMPPATH2 "c:/"
|
||||
#elif defined(WIN32)
|
||||
#define TMPPATH2 "./"
|
||||
#elifdef WIN32
|
||||
#define TMPPATH1 "c:\\temp/"
|
||||
#define TMPPATH2 ".\\"
|
||||
#else
|
||||
@ -483,7 +483,6 @@ createtempfile1(char* tmppath, char** tmpnamep)
|
||||
strcat(tmpname,spid);
|
||||
# ifdef WIN32
|
||||
fd=open(tmpname,O_RDWR|O_BINARY|O_CREAT|O_EXCL|FILE_ATTRIBUTE_TEMPORARY, _S_IREAD|_S_IWRITE);
|
||||
//fd=open(tmpname,O_RDWR|O_BINARY|O_CREAT|O_EXCL|_O_SHORT_LIVED, _S_IREAD|_S_IWRITE);
|
||||
# else
|
||||
fd=open(tmpname,O_RDWR|O_CREAT|O_EXCL, S_IRWXU);
|
||||
# endif
|
||||
|
@ -69,10 +69,6 @@ typedef struct OCnode {
|
||||
ocoffset_t offset; /* position of the last indexed instance */
|
||||
} cache;
|
||||
#endif
|
||||
#ifdef OC_DAP4
|
||||
OCtypeinfo typdef;
|
||||
OCgroupinfo group;
|
||||
#endif
|
||||
} OCnode;
|
||||
|
||||
#if SIZEOF_SIZE_T == 4
|
||||
|
512
win32_config.h
512
win32_config.h
@ -1,512 +0,0 @@
|
||||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if building universal (internal helper macro) */
|
||||
/* #undef AC_APPLE_UNIVERSAL_BUILD */
|
||||
|
||||
/* default file chunk cache nelems. */
|
||||
#define CHUNK_CACHE_NELEMS 1009
|
||||
|
||||
/* default file chunk cache preemption policy. */
|
||||
#define CHUNK_CACHE_PREEMPTION 0.75
|
||||
|
||||
/* default file chunk cache size in bytes. */
|
||||
#define CHUNK_CACHE_SIZE 4194304
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
/* #undef CRAY_STACKSEG_END */
|
||||
|
||||
/* Define to 1 if using `alloca.c'. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* num chunks in default per-var chunk cache. */
|
||||
#define DEFAULT_CHUNKS_IN_CACHE 10
|
||||
|
||||
/* default chunk size in bytes */
|
||||
#define DEFAULT_CHUNK_SIZE 4194304
|
||||
|
||||
/* set this only when building a DLL under MinGW */
|
||||
/* #undef DLL_NETCDF */
|
||||
|
||||
/* if true, build DAP Client */
|
||||
/*#define ENABLE_DAP 1 */
|
||||
|
||||
/* if true, do remote tests */
|
||||
#define ENABLE_DAP_REMOTE_TESTS 1
|
||||
|
||||
/* if true, run extra tests which may not work yet */
|
||||
/* #undef EXTRA_TESTS */
|
||||
|
||||
/* use HDF5 1.6 API */
|
||||
/* #undef H5_USE_16_API */
|
||||
|
||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||
#if !defined(_WIN32)
|
||||
#define HAVE_ALLOCA 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
#define HAVE_ALLOCA_H 1
|
||||
|
||||
/* Define to 1 if you have the <ctype.h> header file. */
|
||||
#define HAVE_CTYPE_H 1
|
||||
|
||||
/* Is CURLOPT_KEYPASSWD defined */
|
||||
#define HAVE_CURLOPT_KEYPASSWD 1
|
||||
|
||||
/* Define to 1 if you have the declaration of `isfinite', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_ISFINITE 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't.
|
||||
*/
|
||||
#define HAVE_DECL_ISINF 1
|
||||
|
||||
/* Define to 1 if you have the declaration of `isnan', and to 0 if you don't.
|
||||
*/
|
||||
#define HAVE_DECL_ISNAN 1
|
||||
|
||||
/* Define to 1 if you have the declaration of `signbit', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_SIGNBIT 0
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#define HAVE_DIRENT_H 1
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
|
||||
/* #undef HAVE_DOPRNT */
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#define HAVE_ERRNO_H 1
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define to 1 if you have the `fsync' function. */
|
||||
#define HAVE_FSYNC 1
|
||||
|
||||
/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#define HAVE_GETOPT_H 1
|
||||
|
||||
/* Define to 1 if you have the `getrlimit' function. */
|
||||
#define HAVE_GETRLIMIT 1
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define to 1 if you have the `H5Pget_fapl_mpio' function. */
|
||||
/* #undef HAVE_H5PGET_FAPL_MPIO */
|
||||
|
||||
/* Define to 1 if you have the `H5Pget_fapl_mpiposix' function. */
|
||||
/* #undef HAVE_H5PGET_FAPL_MPIPOSIX */
|
||||
|
||||
/* Define to 1 if you have the `H5Pset_deflate' function. */
|
||||
/* #undef HAVE_H5PSET_DEFLATE */
|
||||
|
||||
/* Define to 1 if you have the `H5Z_SZIP' function. */
|
||||
/* #undef HAVE_H5Z_SZIP */
|
||||
|
||||
/* Define to 1 if you have the <hdf5.h> header file. */
|
||||
/* #undef HAVE_HDF5_H */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#if !defined(vxWorks) && !defined(_WIN32)
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `curl' library (-lcurl). */
|
||||
#define HAVE_LIBCURL 1
|
||||
|
||||
/* Define to 1 if you have the `df' library (-ldf). */
|
||||
/* #undef HAVE_LIBDF */
|
||||
|
||||
/* Define to 1 if you have the `m' library (-lm). */
|
||||
#define HAVE_LIBM 1
|
||||
|
||||
/* Define to 1 if you have the `mfhdf' library (-lmfhdf). */
|
||||
/* #undef HAVE_LIBMFHDF */
|
||||
|
||||
/* Define to 1 if you have the `pnetcdf' library (-lpnetcdf). */
|
||||
/* #undef HAVE_LIBPNETCDF */
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#define HAVE_LOCALE_H 1
|
||||
|
||||
/* Define to 1 if the system has the type `longlong'. */
|
||||
/* #undef HAVE_LONGLONG */
|
||||
|
||||
/* Define to 1 if the system has the type `long long int'. */
|
||||
/* #undef HAVE_LONG_LONG_INT */
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the <mfhdf.h> header file. */
|
||||
/* #undef HAVE_MFHDF_H */
|
||||
|
||||
/* Define to 1 if you have the `mktemp' function. */
|
||||
#define HAVE_MKTEMP 1
|
||||
|
||||
/* Define to 1 if you have the `MPI_Comm_f2c' function. */
|
||||
/* #undef HAVE_MPI_COMM_F2C */
|
||||
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
/* #undef HAVE_NDIR_H */
|
||||
|
||||
/* Define to 1 if the system has the type `ptrdiff_t'. */
|
||||
#define HAVE_PTRDIFF_T 1
|
||||
|
||||
/* no rpc/types.h */
|
||||
#define HAVE_RPC_TYPES_H /**/
|
||||
|
||||
/* no rpc/xdr.h */
|
||||
#define HAVE_RPC_XDR_H /**/
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#define HAVE_SNPRINTF 1
|
||||
|
||||
/* Define to 1 if the system has the type `ssize_t'. */
|
||||
#if !defined(_WIN32)
|
||||
#define HAVE_SSIZE_T 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <stdarg.h> header file. */
|
||||
#define HAVE_STDARG_H 1
|
||||
|
||||
/* Define to 1 if stdbool.h conforms to C99. */
|
||||
#if !defined(vxWorks) && !defined(_WIN32)
|
||||
#define HAVE_STDBOOL_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#if !defined(vxWorks) && !defined(_WIN32)
|
||||
#define HAVE_STDINT_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#if !defined(vxWorks) && !defined(_WIN32)
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#define HAVE_STDIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#define HAVE_STRCASECMP 1
|
||||
|
||||
/* Define to 1 if you have the `strcat' function. */
|
||||
#define HAVE_STRCAT 1
|
||||
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#define HAVE_STRCHR 1
|
||||
|
||||
/* Define to 1 if you have the `strcpy' function. */
|
||||
#define HAVE_STRCPY 1
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#if !defined(vxWorks)
|
||||
#define HAVE_STRDUP 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strlcat' function. */
|
||||
/* #undef HAVE_STRLCAT */
|
||||
|
||||
/* Define to 1 if you have the `strrchr' function. */
|
||||
#define HAVE_STRRCHR 1
|
||||
|
||||
/* Define to 1 if you have the `strtod' function. */
|
||||
#define HAVE_STRTOD 1
|
||||
|
||||
/* Define to 1 if you have the `strtoll' function. */
|
||||
#define HAVE_STRTOLL 1
|
||||
|
||||
/* Define to 1 if you have the `strtoull' function. */
|
||||
#define HAVE_STRTOULL 1
|
||||
|
||||
/* Define to 1 if `st_blksize' is a member of `struct stat'. */
|
||||
#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
|
||||
|
||||
/* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use
|
||||
`HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */
|
||||
#if !defined(_WIN32)
|
||||
#define HAVE_ST_BLKSIZE 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
/* #undef HAVE_SYS_DIR_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
/* #undef HAVE_SYS_NDIR_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/resource.h> header file. */
|
||||
#define HAVE_SYS_RESOURCE_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
#define HAVE_SYS_WAIT_H 1
|
||||
|
||||
/* Define to 1 if the system has the type `uchar'. */
|
||||
/* #undef HAVE_UCHAR */
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#if !defined(_WIN32)
|
||||
#define HAVE_UNISTD_H 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if the system has the type `unsigned long long int'. */
|
||||
/* #undef HAVE_UNSIGNED_LONG_LONG_INT */
|
||||
|
||||
/* Define to 1 if you have the `vprintf' function. */
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
/* Define to 1 if the system has the type `_Bool'. */
|
||||
#if !defined(vxWorks) && !defined(_WIN32)
|
||||
#define HAVE__BOOL 1
|
||||
#endif
|
||||
|
||||
/* do large file tests */
|
||||
/* #undef LARGE_FILE_TESTS */
|
||||
|
||||
/* If true, turn on logging. */
|
||||
/* #undef LOGGING */
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* max size of the default per-var chunk cache. */
|
||||
#define MAX_DEFAULT_CACHE_SIZE 67108864
|
||||
|
||||
/* type definition */
|
||||
#define NCBYTE_T byte
|
||||
|
||||
/* min blocksize for posixio. */
|
||||
#define NCIO_MINBLOCKSIZE 256
|
||||
|
||||
/* type definition */
|
||||
#define NCSHORT_T integer*2
|
||||
|
||||
/* default */
|
||||
#define NF_DOUBLEPRECISION_IS_C_DOUBLE 1
|
||||
|
||||
/* default */
|
||||
#define NF_INT1_IS_C_SIGNED_CHAR 1
|
||||
|
||||
/* type thing */
|
||||
#define NF_INT1_T byte
|
||||
|
||||
/* default */
|
||||
#define NF_INT2_IS_C_SHORT 1
|
||||
|
||||
/* type thing */
|
||||
#define NF_INT2_T integer*2
|
||||
|
||||
/* default */
|
||||
#define NF_INT_IS_C_INT 1
|
||||
|
||||
/* default */
|
||||
#define NF_REAL_IS_C_FLOAT 1
|
||||
|
||||
/* no IEEE float on this platform */
|
||||
/* #undef NO_IEEE_FLOAT */
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
/* #undef NO_MINUS_C_MINUS_O */
|
||||
|
||||
/* do not build the netCDF version 2 API */
|
||||
/* #undef NO_NETCDF_2 */
|
||||
|
||||
/* no stdlib.h */
|
||||
/* #undef NO_STDLIB_H */
|
||||
|
||||
/* no sys_types.h */
|
||||
/* #undef NO_SYS_TYPES_H */
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "netcdf"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "support-netcdf@unidata.ucar.edu"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "netCDF"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "netCDF 4.1.3"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "netcdf"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "4.1.3"
|
||||
|
||||
/* The size of `double', as computed by sizeof. */
|
||||
#define SIZEOF_DOUBLE 8
|
||||
|
||||
/* The size of `float', as computed by sizeof. */
|
||||
#define SIZEOF_FLOAT 4
|
||||
|
||||
/* The size of `int', as computed by sizeof. */
|
||||
#define SIZEOF_INT 4
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
/* The size of `off_t', as computed by sizeof. */
|
||||
#if defined(vxWorks)
|
||||
#define SIZEOF_OFF_T 4
|
||||
#elif defined(_WIN32)
|
||||
#include <io.h>
|
||||
#include <process.h>
|
||||
#define SIZEOF_OFF_T 8
|
||||
#define lseek _lseeki64
|
||||
#define off_t __int64
|
||||
#define _off_t __int64
|
||||
#define _OFF_T_DEFINED
|
||||
#else
|
||||
#define SIZEOF_OFF_T 8
|
||||
#endif
|
||||
|
||||
/* The size of `short', as computed by sizeof. */
|
||||
#define SIZEOF_SHORT 2
|
||||
|
||||
/* The size of `size_t', as computed by sizeof. */
|
||||
#define SIZEOF_SIZE_T 4
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at runtime.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Place to put very large netCDF test files. */
|
||||
#define TEMP_LARGE "."
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* if true, build CDMREMOTE Client */
|
||||
/* #undef USE_CDMREMOTE */
|
||||
|
||||
/* if true, build DAP Client */
|
||||
/*#define USE_DAP 1 */
|
||||
|
||||
/* set this to use extreme numbers in tests */
|
||||
#define USE_EXTREME_NUMBERS 1
|
||||
|
||||
/* if true, include experimental fsync code */
|
||||
#if !defined(vxWorks) && !defined(_WIN32)
|
||||
#define USE_FSYNC 1
|
||||
#endif
|
||||
|
||||
/* if true, use HDF4 too */
|
||||
/* #undef USE_HDF4 */
|
||||
|
||||
/* If true, use use wget to fetch some sample HDF4 data, and then test against
|
||||
it. */
|
||||
/* #undef USE_HDF4_FILE_TESTS */
|
||||
|
||||
/* if true, build netCDF-4 */
|
||||
/* #undef USE_NETCDF4 */
|
||||
|
||||
/* if true, parallel netCDF-4 is in use */
|
||||
/* #undef USE_PARALLEL */
|
||||
|
||||
/* if true, compile in parallel netCDF-4 based on MPI/IO */
|
||||
/* #undef USE_PARALLEL_MPIO */
|
||||
|
||||
/* if true, compile in parallel netCDF-4 based on MPI/POSIX */
|
||||
/* #undef USE_PARALLEL_POSIX */
|
||||
|
||||
/* if true, parallel netCDF is used */
|
||||
/* #undef USE_PNETCDF */
|
||||
|
||||
/* if true, compile in szip compression in netCDF-4 variables */
|
||||
/* #undef USE_SZIP */
|
||||
|
||||
/* if true, compile in zlib compression in netCDF-4 variables */
|
||||
/* #undef USE_ZLIB */
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "4.1.3"
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||
# if defined __BIG_ENDIAN__
|
||||
# define WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# ifndef WORDS_BIGENDIAN
|
||||
/* # undef WORDS_BIGENDIAN */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
/* #undef _LARGE_FILES */
|
||||
|
||||
/* Define to 1 if type `char' is unsigned and you are not using gcc. */
|
||||
#ifndef __CHAR_UNSIGNED__
|
||||
/* # undef __CHAR_UNSIGNED__ */
|
||||
#endif
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Turned on by netCDF configure. */
|
||||
/* #undef f2cFortran */
|
||||
|
||||
/* Turned on by netCDF configure. */
|
||||
/* #undef gFortran */
|
||||
|
||||
/* Define to `long int' if <sys/types.h> does not define. */
|
||||
/* #undef off_t */
|
||||
|
||||
/* Turned on by netCDF configure. */
|
||||
#define pgiFortran 1
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
/* #undef size_t */
|
Loading…
Reference in New Issue
Block a user