mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-27 08:49:16 +08:00
This commit is contained in:
commit
6e2f543a0e
@ -247,12 +247,6 @@ vpt::
|
||||
date; ./vpt.exe "[compile]http://oceanwatch.pfeg.noaa.gov/opendap/GLOBEC/GLOBEC_vpt" vpt.year; date
|
||||
|
||||
##################################################
|
||||
T=test_partvar
|
||||
|
||||
v::
|
||||
cc -g -c ${T}.c ${INCL}
|
||||
cc -g -o v ${T}.o ${LIBS} ${RPATH}
|
||||
|
||||
do::
|
||||
pushd ..; make; popd ; $(MAKE) -f Make0 ncd
|
||||
##################################################
|
||||
@ -262,3 +256,11 @@ fix::
|
||||
rm -f ./$${f}.c ;\
|
||||
sed -e 's/oc_log/nclog/g' -e 's/OCLOG/NCLOG/g' <ckp1/$${f}.c >./$${f}.c ; \
|
||||
done
|
||||
|
||||
##################################################
|
||||
T=civ
|
||||
|
||||
v::
|
||||
cc -g -c ${T}.c ${INCL}
|
||||
cc -g -o v ${T}.o ${LIBS} ${RPATH}
|
||||
|
||||
|
@ -91,6 +91,7 @@ NC_check_file_type(const char *path, int use_parallel, void *mpi_info,
|
||||
/* Get the 4-byte magic from the beginning of the file. Don't use posix
|
||||
* for parallel, use the MPI functions instead. */
|
||||
#ifdef USE_PARALLEL_MPIO
|
||||
/* Note that this assumes netcdf-4 support is enabled */
|
||||
if (use_parallel)
|
||||
{
|
||||
MPI_File fh;
|
||||
|
@ -10,10 +10,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include "netcdf.h"
|
||||
#include "nc3internal.h"
|
||||
#include "ncx.h"
|
||||
|
@ -252,6 +252,11 @@ nc4_create_file(const char *path, int cmode, MPI_Comm comm, MPI_Info info,
|
||||
nc4_info = NC4_DATA(nc);
|
||||
assert(nc4_info && nc4_info->root_grp);
|
||||
|
||||
#ifdef USE_PNETCDF
|
||||
if (cmode & NC_PNETCDF)
|
||||
return NC_NOERR;
|
||||
#endif
|
||||
|
||||
/* Need this access plist to control how HDF5 handles open onjects
|
||||
* on file close. (Setting H5F_CLOSE_SEMI will cause H5Fclose to
|
||||
* fail if there are any open objects in the file. */
|
||||
|
@ -22,7 +22,8 @@
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int i, j, rank, nprocs, err, ncid, cmode, varid[NVARS], dimid[2], *buf;
|
||||
int i, j, rank, nprocs, ncid, cmode, varid[NVARS], dimid[2], *buf;
|
||||
int err = 0;
|
||||
char str[32];
|
||||
size_t start[2], count[2];
|
||||
MPI_Comm comm=MPI_COMM_SELF;
|
||||
@ -87,8 +88,8 @@ int main(int argc, char* argv[])
|
||||
if (nc_close(ncid)) ERR;
|
||||
if (info != MPI_INFO_NULL) MPI_Info_free(&info);
|
||||
|
||||
/* re-open the file with netCDF and enter define mode */
|
||||
if (nc_open(FILENAME, NC_WRITE, &ncid)) ERR_RET;
|
||||
/* re-open the file with netCDF (parallel) and enter define mode */
|
||||
if (nc_open_par(FILENAME, NC_WRITE|NC_PNETCDF, comm, info, &ncid)) ERR_RET;
|
||||
if (nc_redef(ncid)) ERR;
|
||||
|
||||
/* add attributes to make header grow */
|
||||
|
Loading…
Reference in New Issue
Block a user