mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
fixes to get large file tests working again
This commit is contained in:
parent
d0d5e7c8c3
commit
9000e1b546
@ -228,6 +228,7 @@ main()
|
||||
#define DIM2 2097153 /* DIM1*DIM2*sizeof(char) > 2**32 */
|
||||
#define DIM_WITHOUT_VARIABLE "This is a netCDF dimension but not a netCDF variable."
|
||||
#define VAR_NAME2 "var"
|
||||
#define MAX_DIMS 255
|
||||
|
||||
printf("*** large file test for HDF5...");
|
||||
{
|
||||
@ -235,8 +236,8 @@ main()
|
||||
hid_t dim1_dimscaleid, dim2_dimscaleid, plistid, datasetid2, file_spaceid;
|
||||
hid_t mem_spaceid, xfer_plistid, native_typeid;
|
||||
hsize_t *chunksize, dims[1], maxdims[1], *dimsize, *maxdimsize;
|
||||
hsize_t fdims[NC_MAX_DIMS], fmaxdims[NC_MAX_DIMS];
|
||||
hsize_t start[NC_MAX_DIMS], count[NC_MAX_DIMS];
|
||||
hsize_t fdims[MAX_DIMS], fmaxdims[MAX_DIMS];
|
||||
hsize_t start[MAX_DIMS], count[MAX_DIMS];
|
||||
char file_name[STR_LEN + 1];
|
||||
char dimscale_wo_var[STR_LEN];
|
||||
void *bufr;
|
||||
@ -299,7 +300,8 @@ main()
|
||||
/* Now create the 2D dataset. */
|
||||
if ((plistid = H5Pcreate(H5P_DATASET_CREATE)) < 0) ERR;
|
||||
if (!(fillp = malloc(1))) ERR;
|
||||
*(signed char *)fillp = NC_FILL_BYTE;
|
||||
#define FILL_BYTE 255
|
||||
*(signed char *)fillp = FILL_BYTE;
|
||||
if (H5Pset_fill_value(plistid, H5T_NATIVE_SCHAR, fillp) < 0) ERR;
|
||||
if (!(chunksize = malloc(NDIMS2 * sizeof(hsize_t)))) ERR;
|
||||
chunksize[0] = 1024;
|
||||
|
@ -6,7 +6,7 @@
|
||||
include $(top_srcdir)/lib_flags.am
|
||||
|
||||
# Link to the netCDF library.
|
||||
LDADD = ${top_builddir}/liblib/libnetcdf.la -lm
|
||||
LDADD = ${top_builddir}/liblib/libnetcdf.la @EXTERN_LDFLAGS@
|
||||
|
||||
# Build ncgen from the listed sources.
|
||||
bin_PROGRAMS = ncgen3
|
||||
|
Loading…
Reference in New Issue
Block a user