/* Create a netcdf-4 file with a large variable for the purpose of doing performance test on the new NC4_get/put_vars functions. WARNING: do not attempt to run this under windows because of the use of gettimeofday(). WARNING: This test can only be run manually and should not be run as part of the testsuite. */ #include "config.h" #include #include #include #include #include "netcdf.h" #include "nc4dispatch.h" #include "err_macros.h" #define FILE "tst_varsperf_bigvars.nc" #define VAR "bigvar" #define NDIMS 2 #define DIM0 "d0" #define DIM1 "d1" #define DIMSIZE0 512 #define DIMSIZE1 512 #define TOTALSIZE (DIMSIZE0*DIMSIZE1) static int data[TOTALSIZE]; static int read[TOTALSIZE]; int buildfile(void) { int ncid, varid; int dimids[NDIMS]; int* p; int index; if(nc_create(FILE, NC_NETCDF4, &ncid)) ERR; if(nc_def_dim(ncid,DIM0,(size_t)DIMSIZE0,&dimids[0])) ERR; if(nc_def_dim(ncid,DIM1,(size_t)DIMSIZE1,&dimids[1])) ERR; if(nc_def_var(ncid,VAR,NC_INT,NDIMS,dimids,&varid)) ERR; if(nc_enddef(ncid)) ERR; for(p=data,index=0;index