Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions cf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FAST=1
HDF5=1
DAP=1
#HDF4=1
#PNETCDF=1
PNETCDF=1
#PAR4=1

if test $# != 0 ; then
Expand Down Expand Up @@ -152,19 +152,11 @@ FLAGS="$FLAGS --disable-dap"
fi

if test "x$MPIO" = x1 ; then
if test -f /machine/local_mpich2 ; then
MPI1=/machine/local_mpich2
MPI2=/machine/local_par7
MPI3=/machine/local_par
else
MPI1=/usr/local
MPI2=${MPI1}
MPI3=${MPI1}
fi
PATH=${PATH}:${MPI1}/bin
CC="${MPI1}/bin/mpicc"
CPPFLAGS="-I${MPI2}/include -I${MPI1}/include -I${MPI3}/include"
LDFLAGS="-L${MPI2}/lib -L${MPI1}/lib -L${MPI3}/lib"
MPIDIR=/usr/lib64/mpich
PATH="${PATH}:${MPIDIR}/bin"
CC="${MPIDIR}/bin/mpicc"
CPPFLAGS="-I${MPIDIR}/include"
LDFLAGS="$LDFLAGS -L${MPIDIR}"
LDLIBS="-lmpich"
FLAGS="$FLAGS --enable-pnetcdf"
FLAGS="$FLAGS --enable-parallel-tests"
Expand Down
1 change: 1 addition & 0 deletions cf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ FLAGS="$FLAGS -DENABLE_TESTS=true"
FLAGS="$FLAGS -DENABLE_EXAMPLES=false"
#FLAGS="$FLAGS -DENABLE_HDF4=true"
FLAGS="$FLAGS -DENABLE_DYNAMIC_LOADING=false"
#FLAGS="$FLAGS -DENABLE_LARGE_FILE_TESTS=true"

rm -fr build
mkdir build
Expand Down
5 changes: 4 additions & 1 deletion include/nc.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ typedef struct NC {
void* dispatchdata; /*per-'file' data; points to e.g. NC3_INFO data*/
char* path;
int mode; /* as provided to nc_open/nc_create */
int model; /* as determined by libdispatch/dfile.c */
#ifdef USE_REFCOUNT
int refcount; /* To enable multiple name-based opens */
#endif
Expand Down Expand Up @@ -68,6 +69,8 @@ extern int nc__pseudofd(void);
/* This function gets a current default create flag */
extern int nc_get_default_format(void);

extern int NC_check_file_type(const char *path, int flags, void *parameters, int* model, int* version);

extern int add_to_NCList(NC*);
extern void del_from_NCList(NC*);/* does not free object */
extern NC* find_in_NCList(int ext_ncid);
Expand All @@ -78,7 +81,7 @@ extern int iterate_NCList(int i,NC**); /* Walk from 0 ...; ERANGE return => stop

/* Defined in nc.c */
extern void free_NC(NC*);
extern int new_NC(struct NC_Dispatch*, const char*, int, NC**);
extern int new_NC(struct NC_Dispatch*, const char*, int, int, NC**);

/* Defined in nc.c */
extern int ncdebug;
Expand Down
3 changes: 2 additions & 1 deletion include/ncdispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
#define X_INT_MAX 2147483647

/* Given a filename, check its magic number */
#define MAGIC_NUMBER_LEN 4
/* Change magic number size from 4 to 8 to be more precise for HDF5 */
#define MAGIC_NUMBER_LEN 8
#define MAGIC_HDF5_FILE 1
#define MAGIC_HDF4_FILE 2
#define MAGIC_CDF1_FILE 1 /* std classic format */
Expand Down
Loading