From b1d38e368d078b21eff523e66a1a10918ea3ab6b Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Wed, 15 May 2019 06:11:50 -0600 Subject: [PATCH] changes as suggested by Jayesh --- tests/cunit/test_iosystem2_simple.c | 6 +++--- tests/cunit/test_iosystem2_simple2.c | 4 ++-- tests/cunit/test_iosystem3_simple2.c | 2 +- tests/cunit/test_pioc.c | 14 +++++++------- tests/cunit/test_pioc_unlim.c | 2 +- tests/general/test_memleak.c | 10 +++++----- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/cunit/test_iosystem2_simple.c b/tests/cunit/test_iosystem2_simple.c index db94bf0ed41..065e181e324 100644 --- a/tests/cunit/test_iosystem2_simple.c +++ b/tests/cunit/test_iosystem2_simple.c @@ -152,8 +152,8 @@ int main(int argc, char **argv) int ncid2; for (int i = 0; i < num_flavors; i++) { - char fn[NUM_FILES][NC_MAX_NAME + 1]; - char dimname[NUM_FILES][NC_MAX_NAME + 1]; + char fn[NUM_FILES][PIO_MAX_NAME + 1]; + char dimname[NUM_FILES][PIO_MAX_NAME + 1]; /* Create the test files. */ for (int f = 0; f < NUM_FILES; f++) @@ -193,7 +193,7 @@ int main(int argc, char **argv) return ret; /* Check the first file. */ - char dimname_in[NC_MAX_NAME + 1]; + char dimname_in[PIO_MAX_NAME + 1]; if ((ret = PIOc_inq_dimname(ncid, 0, dimname_in))) return ret; if (strcmp(dimname_in, dimname[0])) diff --git a/tests/cunit/test_iosystem2_simple2.c b/tests/cunit/test_iosystem2_simple2.c index fe3b2388a87..00ebc7cdd6c 100644 --- a/tests/cunit/test_iosystem2_simple2.c +++ b/tests/cunit/test_iosystem2_simple2.c @@ -76,12 +76,12 @@ int main(int argc, char **argv) for (int flv = 0; flv < num_flavors; flv++) { - char filename[NUM_SAMPLES][NC_MAX_NAME + 1]; /* Test filename. */ + char filename[NUM_SAMPLES][PIO_MAX_NAME + 1]; /* Test filename. */ int sample_ncid[NUM_SAMPLES]; for (int sample = 0; sample < NUM_SAMPLES; sample++) { - char iotype_name[NC_MAX_NAME + 1]; + char iotype_name[PIO_MAX_NAME + 1]; /* Create a filename. */ if ((ret = get_iotype_name(flavor[flv], iotype_name))) diff --git a/tests/cunit/test_iosystem3_simple2.c b/tests/cunit/test_iosystem3_simple2.c index 7253412557c..7f43f64aad7 100644 --- a/tests/cunit/test_iosystem3_simple2.c +++ b/tests/cunit/test_iosystem3_simple2.c @@ -29,7 +29,7 @@ int main(int argc, char **argv) int my_rank; /* Zero-based rank of processor. */ int ntasks; /* Number of processors involved in current execution. */ int iosysid_world; /* The ID for the parallel I/O system. */ - char fname0[NC_MAX_NAME + 1]; + char fname0[PIO_MAX_NAME + 1]; int ncid; int num_flavors; /* Number of PIO netCDF flavors in this build. */ int flavor[NUM_FLAVORS]; /* iotypes for the supported netCDF IO flavors. */ diff --git a/tests/cunit/test_pioc.c b/tests/cunit/test_pioc.c index 7509db9f54d..4e44e31fcd5 100644 --- a/tests/cunit/test_pioc.c +++ b/tests/cunit/test_pioc.c @@ -1903,8 +1903,8 @@ int test_decomp_internal(int my_test_size, int my_rank, int iosysid, int dim_len MPI_Comm test_comm, int async) { int ioid; - char filename[NC_MAX_NAME + 1]; /* Test decomp filename. */ - char nc_filename[NC_MAX_NAME + 1]; /* Test decomp filename (netcdf version). */ + char filename[PIO_MAX_NAME + 1]; /* Test decomp filename. */ + char nc_filename[PIO_MAX_NAME + 1]; /* Test decomp filename (netcdf version). */ iosystem_desc_t *ios; /* IO system info. */ int ret; @@ -2092,7 +2092,7 @@ int test_decomp_public(int my_test_size, int my_rank, int iosysid, int dim_len, MPI_Comm test_comm, int async) { int ioid; - char nc_filename[NC_MAX_NAME + 1]; /* Test decomp filename (netcdf version). */ + char nc_filename[PIO_MAX_NAME + 1]; /* Test decomp filename (netcdf version). */ int ret; /* This will be our file name for writing out decompositions. */ @@ -2237,7 +2237,7 @@ int test_decomp_public_2(int my_test_size, int my_rank, int iosysid, int dim_len MPI_Comm test_comm, int async) { int ioid; - char nc_filename[NC_MAX_NAME + 1]; /* Test decomp filename (netcdf version). */ + char nc_filename[PIO_MAX_NAME + 1]; /* Test decomp filename (netcdf version). */ int ret; /* This will be our file name for writing out decompositions. */ @@ -2263,7 +2263,7 @@ int test_decomp_2(int my_test_size, int my_rank, int iosysid, int dim_len, MPI_Comm test_comm, int async) { int ioid; - char nc_filename[NC_MAX_NAME + 1]; /* Test decomp filename (netcdf version). */ + char nc_filename[PIO_MAX_NAME + 1]; /* Test decomp filename (netcdf version). */ int ret; /* This will be our file name for writing out decompositions. */ @@ -2317,8 +2317,8 @@ int test_all(int iosysid, int num_flavors, int *flavor, int my_rank, MPI_Comm te { int ioid; int my_test_size; - char filename[NC_MAX_NAME + 1]; - char nc_filename[NC_MAX_NAME + 1]; + char filename[PIO_MAX_NAME + 1]; + char nc_filename[PIO_MAX_NAME + 1]; int ret; /* Return code. */ if ((ret = MPI_Comm_size(test_comm, &my_test_size))) diff --git a/tests/cunit/test_pioc_unlim.c b/tests/cunit/test_pioc_unlim.c index 725132cdfce..115b30bca7f 100644 --- a/tests/cunit/test_pioc_unlim.c +++ b/tests/cunit/test_pioc_unlim.c @@ -236,7 +236,7 @@ int test_all(int iosysid, int num_flavors, int *flavor, int my_rank, MPI_Comm te int ncid; int varid; int my_test_size; - char filename[NC_MAX_NAME + 1]; + char filename[PIO_MAX_NAME + 1]; int ret; /* Return code. */ if ((ret = MPI_Comm_size(test_comm, &my_test_size))) diff --git a/tests/general/test_memleak.c b/tests/general/test_memleak.c index f9ecbd720df..48abc4a00a2 100644 --- a/tests/general/test_memleak.c +++ b/tests/general/test_memleak.c @@ -66,7 +66,7 @@ char err_buffer[MPI_MAX_ERROR_STRING]; int resultlen; /** The dimension names. */ -char dim_name[NDIM][NC_MAX_NAME + 1] = {"timestep", "x", "y"}; +char dim_name[NDIM][PIO_MAX_NAME + 1] = {"timestep", "x", "y"}; /** Length of the dimensions in the sample data. */ int dim_len[NDIM] = {NC_UNLIMITED, X_DIM_LEN, Y_DIM_LEN}; @@ -109,10 +109,10 @@ main(int argc, char **argv) * (serial4 and parallel4) will be in netCDF-4/HDF5 * format. All four can be read by the netCDF library, and all * will contain the same contents. */ - char filename[NUM_NETCDF_FLAVORS][NC_MAX_NAME + 1] = {"test_nc4_pnetcdf.nc", - "test_nc4_classic.nc", - "test_nc4_serial4.nc", - "test_nc4_parallel4.nc"}; + char filename[NUM_NETCDF_FLAVORS][PIO_MAX_NAME + 1] = {"test_nc4_pnetcdf.nc", + "test_nc4_classic.nc", + "test_nc4_serial4.nc", + "test_nc4_parallel4.nc"}; /** Number of processors that will do IO. In this example we * will do IO from all processors. */