summaryrefslogtreecommitdiffstats
path: root/testpar/t_2Gio.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-07-27 20:43:30 (GMT)
committerGitHub <noreply@github.com>2023-07-27 20:43:30 (GMT)
commit1e91d96fa02466ffe451319bdac1005f84dc7993 (patch)
tree4de04ef502c313dfd766497b20235188761146c0 /testpar/t_2Gio.c
parent95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff)
downloadhdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'testpar/t_2Gio.c')
-rw-r--r--testpar/t_2Gio.c418
1 files changed, 209 insertions, 209 deletions
diff --git a/testpar/t_2Gio.c b/testpar/t_2Gio.c
index 8b67dd9..a64b6c1 100644
--- a/testpar/t_2Gio.c
+++ b/testpar/t_2Gio.c
@@ -96,18 +96,18 @@ MPI_Comm test_comm = MPI_COMM_WORLD;
static void
usage(void)
{
- HDprintf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] "
- "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n");
- HDprintf("\t-m<n_datasets>"
- "\tset number of datasets for the multiple dataset test\n");
- HDprintf("\t-n<n_groups>"
- "\tset number of groups for the multiple group test\n");
- HDprintf("\t-f <prefix>\tfilename prefix\n");
- HDprintf("\t-2\t\tuse Split-file together with MPIO\n");
- HDprintf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", BIG_X_FACTOR,
- BIG_Y_FACTOR);
- HDprintf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n");
- HDprintf("\n");
+ printf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] "
+ "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n");
+ printf("\t-m<n_datasets>"
+ "\tset number of datasets for the multiple dataset test\n");
+ printf("\t-n<n_groups>"
+ "\tset number of groups for the multiple group test\n");
+ printf("\t-f <prefix>\tfilename prefix\n");
+ printf("\t-2\t\tuse Split-file together with MPIO\n");
+ printf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", BIG_X_FACTOR,
+ BIG_Y_FACTOR);
+ printf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n");
+ printf("\n");
}
/*
@@ -189,7 +189,7 @@ parse_options(int argc, char **argv)
case 'h': /* print help message--return with nerrors set */
return (1);
default:
- HDprintf("Illegal option(%s)\n", *argv);
+ printf("Illegal option(%s)\n", *argv);
nerrors++;
return (1);
}
@@ -198,12 +198,12 @@ parse_options(int argc, char **argv)
/* check validity of dimension and chunk sizes */
if (dim0 <= 0 || dim1 <= 0) {
- HDprintf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
+ printf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
nerrors++;
return (1);
}
if (chunkdim0 <= 0 || chunkdim1 <= 0) {
- HDprintf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
+ printf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
nerrors++;
return (1);
}
@@ -211,7 +211,7 @@ parse_options(int argc, char **argv)
/* Make sure datasets can be divided into equal portions by the processes */
if ((dim0 % mpi_size) || (dim1 % mpi_size)) {
if (MAINPROCESS)
- HDprintf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size);
+ printf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size);
nerrors++;
return (1);
}
@@ -224,15 +224,15 @@ parse_options(int argc, char **argv)
for (i = 0; i < n; i++)
if (h5_fixname(FILENAME[i], fapl, filenames[i], PATH_MAX) == NULL) {
- HDprintf("h5_fixname failed\n");
+ printf("h5_fixname failed\n");
nerrors++;
return (1);
}
if (MAINPROCESS) {
- HDprintf("Test filenames are:\n");
+ printf("Test filenames are:\n");
for (i = 0; i < n; i++)
- HDprintf(" %s\n", filenames[i]);
+ printf(" %s\n", filenames[i]);
}
}
@@ -317,7 +317,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = (hsize_t)mpi_rank * block[0];
start[1] = 0;
if (VERBOSE_MED)
- HDprintf("slab_set BYROW\n");
+ printf("slab_set BYROW\n");
break;
case BYCOL:
/* Each process takes a block of columns. */
@@ -330,7 +330,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = 0;
start[1] = (hsize_t)mpi_rank * block[1];
if (VERBOSE_MED)
- HDprintf("slab_set BYCOL\n");
+ printf("slab_set BYCOL\n");
break;
case ZROW:
/* Similar to BYROW except process 0 gets 0 row */
@@ -343,7 +343,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = (hsize_t)(mpi_rank ? (hsize_t)mpi_rank * block[0] : 0);
start[1] = 0;
if (VERBOSE_MED)
- HDprintf("slab_set ZROW\n");
+ printf("slab_set ZROW\n");
break;
case ZCOL:
/* Similar to BYCOL except process 0 gets 0 column */
@@ -356,11 +356,11 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = 0;
start[1] = (hsize_t)(mpi_rank ? (hsize_t)mpi_rank * block[1] : 0);
if (VERBOSE_MED)
- HDprintf("slab_set ZCOL\n");
+ printf("slab_set ZCOL\n");
break;
default:
/* Unknown mode. Set it to cover the whole dataset. */
- HDprintf("unknown slab_set mode (%d)\n", mode);
+ printf("unknown slab_set mode (%d)\n", mode);
block[0] = (hsize_t)dim0;
block[1] = (hsize_t)dim1;
stride[0] = block[0];
@@ -370,16 +370,16 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s
start[0] = 0;
start[1] = 0;
if (VERBOSE_MED)
- HDprintf("slab_set wholeset\n");
+ printf("slab_set wholeset\n");
break;
}
if (VERBOSE_MED) {
- HDprintf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total "
- "datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1],
- (unsigned long)(block[0] * block[1] * count[0] * count[1]));
+ printf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total "
+ "datapoints=%lu\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1],
+ (unsigned long)(block[0] * block[1] * count[0] * count[1]));
}
}
@@ -417,15 +417,15 @@ point_set(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], s
}
if (VERBOSE_MED) {
- HDprintf("start[]=(%lu, %lu), count[]=(%lu, %lu), stride[]=(%lu, %lu), block[]=(%lu, %lu), total "
- "datapoints=%lu\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1],
- (unsigned long)(block[0] * block[1] * count[0] * count[1]));
+ printf("start[]=(%lu, %lu), count[]=(%lu, %lu), stride[]=(%lu, %lu), block[]=(%lu, %lu), total "
+ "datapoints=%lu\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1],
+ (unsigned long)(block[0] * block[1] * count[0] * count[1]));
k = 0;
for (i = 0; i < num_points; i++) {
- HDprintf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]);
+ printf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]);
k += 2;
}
}
@@ -460,19 +460,19 @@ dataset_print(hsize_t start[], hsize_t block[], DATATYPE *dataset)
hsize_t i, j;
/* print the column heading */
- HDprintf("%-8s", "Cols:");
+ printf("%-8s", "Cols:");
for (j = 0; j < block[1]; j++) {
- HDprintf("%3lu ", (unsigned long)(start[1] + j));
+ printf("%3lu ", (unsigned long)(start[1] + j));
}
- HDprintf("\n");
+ printf("\n");
/* print the slab data */
for (i = 0; i < block[0]; i++) {
- HDprintf("Row %2lu: ", (unsigned long)(i + start[0]));
+ printf("Row %2lu: ", (unsigned long)(i + start[0]));
for (j = 0; j < block[1]; j++) {
- HDprintf("%03d ", *dataptr++);
+ printf("%03d ", *dataptr++);
}
- HDprintf("\n");
+ printf("\n");
}
}
@@ -488,14 +488,14 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[]
/* print it if VERBOSE_MED */
if (VERBOSE_MED) {
- HDprintf("dataset_vrfy dumping:::\n");
- HDprintf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
- (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
- (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
- (unsigned long)block[0], (unsigned long)block[1]);
- HDprintf("original values:\n");
+ printf("dataset_vrfy dumping:::\n");
+ printf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n",
+ (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0],
+ (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1],
+ (unsigned long)block[0], (unsigned long)block[1]);
+ printf("original values:\n");
dataset_print(start, block, original);
- HDprintf("compared values:\n");
+ printf("compared values:\n");
dataset_print(start, block, dataset);
}
@@ -504,9 +504,9 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[]
for (j = 0; j < block[1]; j++) {
if (*dataset != *original) {
if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED) {
- HDprintf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n",
- (unsigned long)i, (unsigned long)j, (unsigned long)(i + start[0]),
- (unsigned long)(j + start[1]), *(original), *(dataset));
+ printf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n",
+ (unsigned long)i, (unsigned long)j, (unsigned long)(i + start[0]),
+ (unsigned long)(j + start[1]), *(original), *(dataset));
}
dataset++;
original++;
@@ -514,9 +514,9 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[]
}
}
if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED)
- HDprintf("[more errors ...]\n");
+ printf("[more errors ...]\n");
if (vrfyerrs)
- HDprintf("%d errors found in dataset_vrfy\n", vrfyerrs);
+ printf("%d errors found in dataset_vrfy\n", vrfyerrs);
return (vrfyerrs);
}
@@ -577,9 +577,9 @@ MpioTest2G(MPI_Comm comm)
MPI_Comm_rank(comm, &mpi_rank);
if (mpi_rank == 0) {
- HDprintf("Using %d process on dataset shape "
- "[%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE "]\n",
- mpi_size, shape[0], shape[1], shape[2]);
+ printf("Using %d process on dataset shape "
+ "[%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE "]\n",
+ mpi_size, shape[0], shape[1], shape[2]);
}
/*
@@ -606,7 +606,7 @@ MpioTest2G(MPI_Comm comm)
tot_size_bytes *= shape[i];
}
if (mpi_rank == 0) {
- HDprintf("Dataset of %zu bytes\n", tot_size_bytes);
+ printf("Dataset of %zu bytes\n", tot_size_bytes);
}
filespace = H5Screate_simple(3, shape, NULL);
VRFY((filespace >= 0), "H5Screate_simple succeeded");
@@ -641,8 +641,8 @@ MpioTest2G(MPI_Comm comm)
hsize_t);
data_size = slice_per_process * shape[1] * shape[2];
data_size_bytes = sizeof(int) * data_size;
- data = HDmalloc(data_size_bytes);
- VRFY((data != NULL), "data HDmalloc succeeded");
+ data = malloc(data_size_bytes);
+ VRFY((data != NULL), "data malloc succeeded");
for (size_t i = 0; i < data_size; i++) {
data[i] = mpi_rank;
@@ -681,7 +681,7 @@ MpioTest2G(MPI_Comm comm)
H5Fclose(file_id);
free(data);
- HDprintf("Proc %d - MpioTest2G test succeeded\n", mpi_rank);
+ printf("Proc %d - MpioTest2G test succeeded\n", mpi_rank);
if (mpi_rank == 0)
HDremove(FILENAME[1]);
@@ -729,7 +729,7 @@ dataset_writeInd(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Independent write test on file %s\n", filename);
+ printf("Independent write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
@@ -738,8 +738,8 @@ dataset_writeInd(void)
/* allocate memory for data buffer */
data_size = sizeof(DATATYPE);
data_size *= (hsize_t)dim0 * (hsize_t)dim1;
- data_array1 = (DATATYPE *)HDmalloc(data_size);
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc(data_size);
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* ----------------------------------------
* CREATE AN HDF5 FILE WITH PARALLEL ACCESS
@@ -806,7 +806,7 @@ dataset_writeInd(void)
/* setup dimensions again to write with zero rows for process 0 */
if (VERBOSE_MED)
- HDprintf("writeInd by some with zero row\n");
+ printf("writeInd by some with zero row\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -841,7 +841,7 @@ dataset_writeInd(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
}
/* Example of using the parallel HDF5 library to read a dataset */
@@ -869,17 +869,17 @@ dataset_readInd(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Independent read test on file %s\n", filename);
+ printf("Independent read test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
MPI_Comm_rank(test_comm, &mpi_rank);
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
/* setup file access template */
acc_tpl = create_faccess_plist(comm, info, facc_type);
@@ -949,9 +949,9 @@ dataset_readInd(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
/*
@@ -1002,7 +1002,7 @@ dataset_writeAll(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Collective write test on file %s\n", filename);
+ printf("Collective write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
@@ -1010,12 +1010,12 @@ dataset_writeAll(void)
/* set up the coords array selection */
num_points = (size_t)dim1;
- coords = (hsize_t *)HDmalloc((size_t)dim1 * (size_t)MAX_RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc((size_t)dim1 * (size_t)MAX_RANK * sizeof(hsize_t));
VRFY((coords != NULL), "coords malloc succeeded");
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* -------------------
* START AN HDF5 FILE
@@ -1121,7 +1121,7 @@ dataset_writeAll(void)
/* setup dimensions again to writeAll with zero rows for process 0 */
if (VERBOSE_MED)
- HDprintf("writeAll by some with zero row\n");
+ printf("writeAll by some with zero row\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -1186,7 +1186,7 @@ dataset_writeAll(void)
/* setup dimensions again to writeAll with zero columns for process 0 */
if (VERBOSE_MED)
- HDprintf("writeAll by some with zero col\n");
+ printf("writeAll by some with zero col\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZCOL);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -1326,7 +1326,7 @@ dataset_writeAll(void)
if (data_array1)
free(data_array1);
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
block[0] = 1;
@@ -1475,9 +1475,9 @@ dataset_writeAll(void)
/* release data buffers */
if (coords)
- HDfree(coords);
+ free(coords);
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
}
/*
@@ -1518,7 +1518,7 @@ dataset_readAll(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Collective read test on file %s\n", filename);
+ printf("Collective read test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
@@ -1526,14 +1526,14 @@ dataset_readAll(void)
/* set up the coords array selection */
num_points = (size_t)dim1;
- coords = (hsize_t *)HDmalloc((size_t)dim0 * (size_t)dim1 * MAX_RANK * sizeof(hsize_t));
+ coords = (hsize_t *)malloc((size_t)dim0 * (size_t)dim1 * MAX_RANK * sizeof(hsize_t));
VRFY((coords != NULL), "coords malloc succeeded");
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
/* -------------------
* OPEN AN HDF5 FILE
@@ -1615,7 +1615,7 @@ dataset_readAll(void)
/* setup dimensions again to readAll with zero columns for process 0 */
if (VERBOSE_MED)
- HDprintf("readAll by some with zero col\n");
+ printf("readAll by some with zero col\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZCOL);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -1682,7 +1682,7 @@ dataset_readAll(void)
/* setup dimensions again to readAll with zero rows for process 0 */
if (VERBOSE_MED)
- HDprintf("readAll by some with zero row\n");
+ printf("readAll by some with zero row\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW);
ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -1709,9 +1709,9 @@ dataset_readAll(void)
free(data_array1);
if (data_origin1)
free(data_origin1);
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
block[0] = 1;
@@ -1770,7 +1770,7 @@ dataset_readAll(void)
if (data_array1)
free(data_array1);
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* Dataset6: point selection in File - Point selection in Memory*/
@@ -1816,7 +1816,7 @@ dataset_readAll(void)
if (data_array1)
free(data_array1);
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* Dataset7: point selection in memory - All selection in file*/
@@ -1884,11 +1884,11 @@ dataset_readAll(void)
/* release data buffers */
if (coords)
- HDfree(coords);
+ free(coords);
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
/*
@@ -1932,7 +1932,7 @@ extend_writeInd(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend independent write test on file %s\n", filename);
+ printf("Extend independent write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
@@ -1943,8 +1943,8 @@ extend_writeInd(void)
chunk_dims[1] = (hsize_t)chunkdim1;
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* -------------------
* START AN HDF5 FILE
@@ -1984,7 +1984,7 @@ extend_writeInd(void)
/* set up dataset storage chunk sizes and creation property list */
if (VERBOSE_MED)
- HDprintf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
+ printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
dataset_pl = H5Pcreate(H5P_DATASET_CREATE);
VRFY((dataset_pl >= 0), "H5Pcreate succeeded");
ret = H5Pset_chunk(dataset_pl, MAX_RANK, chunk_dims);
@@ -2116,7 +2116,7 @@ extend_writeInd(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
}
/*
@@ -2148,7 +2148,7 @@ extend_writeInd2(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend independent write test #2 on file %s\n", filename);
+ printf("Extend independent write test #2 on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
@@ -2205,8 +2205,8 @@ extend_writeInd2(void)
if (VERBOSE_MED) {
MESG("writing at offset zero: ");
for (i = 0; i < (int)orig_size; i++)
- HDprintf("%s%d", i ? ", " : "", written[i]);
- HDprintf("\n");
+ printf("%s%d", i ? ", " : "", written[i]);
+ printf("\n");
}
ret = H5Dwrite(dataset, H5T_NATIVE_INT, ms, fs, H5P_DEFAULT, written);
VRFY((ret >= 0), "H5Dwrite succeeded");
@@ -2218,15 +2218,15 @@ extend_writeInd2(void)
VRFY((ret >= 0), "H5Dread succeeded");
for (i = 0; i < (int)orig_size; i++)
if (written[i] != retrieved[i]) {
- HDprintf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i,
- written[i], i, retrieved[i]);
+ printf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i,
+ written[i], i, retrieved[i]);
nerrors++;
}
if (VERBOSE_MED) {
MESG("read at offset zero: ");
for (i = 0; i < (int)orig_size; i++)
- HDprintf("%s%d", i ? ", " : "", retrieved[i]);
- HDprintf("\n");
+ printf("%s%d", i ? ", " : "", retrieved[i]);
+ printf("\n");
}
/* -------------------------
@@ -2248,8 +2248,8 @@ extend_writeInd2(void)
if (VERBOSE_MED) {
MESG("writing at offset 10: ");
for (i = 0; i < (int)orig_size; i++)
- HDprintf("%s%d", i ? ", " : "", written[i]);
- HDprintf("\n");
+ printf("%s%d", i ? ", " : "", written[i]);
+ printf("\n");
}
ret = H5Sselect_hyperslab(fs, H5S_SELECT_SET, &orig_size, NULL, &one, &orig_size);
VRFY((ret >= 0), "H5Sselect_hyperslab succeeded");
@@ -2263,15 +2263,15 @@ extend_writeInd2(void)
VRFY((ret >= 0), "H5Dread succeeded");
for (i = 0; i < (int)orig_size; i++)
if (written[i] != retrieved[i]) {
- HDprintf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i,
- written[i], i, retrieved[i]);
+ printf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i,
+ written[i], i, retrieved[i]);
nerrors++;
}
if (VERBOSE_MED) {
MESG("read at offset 10: ");
for (i = 0; i < (int)orig_size; i++)
- HDprintf("%s%d", i ? ", " : "", retrieved[i]);
- HDprintf("\n");
+ printf("%s%d", i ? ", " : "", retrieved[i]);
+ printf("\n");
}
/* Close dataset collectively */
@@ -2310,19 +2310,19 @@ extend_readInd(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend independent read test on file %s\n", filename);
+ printf("Extend independent read test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
MPI_Comm_rank(test_comm, &mpi_rank);
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
- data_array2 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array2 != NULL), "data_array2 HDmalloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
+ data_array2 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array2 != NULL), "data_array2 malloc succeeded");
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
/* -------------------
* OPEN AN HDF5 FILE
@@ -2443,11 +2443,11 @@ extend_readInd(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_array2)
- HDfree(data_array2);
+ free(data_array2);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
/*
@@ -2492,7 +2492,7 @@ extend_writeAll(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend independent write test on file %s\n", filename);
+ printf("Extend independent write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
@@ -2503,8 +2503,8 @@ extend_writeAll(void)
chunk_dims[1] = (hsize_t)chunkdim1;
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
/* -------------------
* START AN HDF5 FILE
@@ -2544,7 +2544,7 @@ extend_writeAll(void)
/* set up dataset storage chunk sizes and creation property list */
if (VERBOSE_MED)
- HDprintf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
+ printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
dataset_pl = H5Pcreate(H5P_DATASET_CREATE);
VRFY((dataset_pl >= 0), "H5Pcreate succeeded");
ret = H5Pset_chunk(dataset_pl, MAX_RANK, chunk_dims);
@@ -2699,7 +2699,7 @@ extend_writeAll(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
}
/* Example of using the parallel HDF5 library to read an extendible dataset */
@@ -2730,19 +2730,19 @@ extend_readAll(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend independent read test on file %s\n", filename);
+ printf("Extend independent read test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
MPI_Comm_rank(test_comm, &mpi_rank);
/* allocate memory for data buffer */
- data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded");
- data_array2 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_array2 != NULL), "data_array2 HDmalloc succeeded");
- data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
- VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded");
+ data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array1 != NULL), "data_array1 malloc succeeded");
+ data_array2 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_array2 != NULL), "data_array2 malloc succeeded");
+ data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE));
+ VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded");
/* -------------------
* OPEN AN HDF5 FILE
@@ -2885,11 +2885,11 @@ extend_readAll(void)
/* release data buffers */
if (data_array1)
- HDfree(data_array1);
+ free(data_array1);
if (data_array2)
- HDfree(data_array2);
+ free(data_array2);
if (data_origin1)
- HDfree(data_origin1);
+ free(data_origin1);
}
/*
@@ -2921,17 +2921,17 @@ compress_readAll(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Collective chunked dataset read test on file %s\n", filename);
+ printf("Collective chunked dataset read test on file %s\n", filename);
/* Retrieve MPI parameters */
MPI_Comm_size(comm, &mpi_size);
MPI_Comm_rank(comm, &mpi_rank);
/* Allocate data buffer */
- data_orig = (DATATYPE *)HDmalloc((size_t)dim * sizeof(DATATYPE));
- VRFY((data_orig != NULL), "data_origin1 HDmalloc succeeded");
- data_read = (DATATYPE *)HDmalloc((size_t)dim * sizeof(DATATYPE));
- VRFY((data_read != NULL), "data_array1 HDmalloc succeeded");
+ data_orig = (DATATYPE *)malloc((size_t)dim * sizeof(DATATYPE));
+ VRFY((data_orig != NULL), "data_origin1 malloc succeeded");
+ data_read = (DATATYPE *)malloc((size_t)dim * sizeof(DATATYPE));
+ VRFY((data_read != NULL), "data_array1 malloc succeeded");
/* Initialize data buffers */
for (u = 0; u < dim; u++)
@@ -3041,8 +3041,8 @@ compress_readAll(void)
/* Verify data read */
for (u = 0; u < dim; u++)
if (data_orig[u] != data_read[u]) {
- HDprintf("Line #%d: written!=retrieved: data_orig[%u]=%d, data_read[%u]=%d\n", __LINE__,
- (unsigned)u, data_orig[u], (unsigned)u, data_read[u]);
+ printf("Line #%d: written!=retrieved: data_orig[%u]=%d, data_read[%u]=%d\n", __LINE__,
+ (unsigned)u, data_orig[u], (unsigned)u, data_read[u]);
nerrors++;
}
@@ -3064,9 +3064,9 @@ compress_readAll(void)
/* release data buffers */
if (data_read)
- HDfree(data_read);
+ free(data_read);
if (data_orig)
- HDfree(data_orig);
+ free(data_orig);
}
#endif /* H5_HAVE_FILTER_DEFLATE */
@@ -3113,7 +3113,7 @@ none_selection_chunk(void)
filename = GetTestParameters();
if (VERBOSE_MED)
- HDprintf("Extend independent write test on file %s\n", filename);
+ printf("Extend independent write test on file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
@@ -3144,7 +3144,7 @@ none_selection_chunk(void)
/* set up dataset storage chunk sizes and creation property list */
if (VERBOSE_MED)
- HDprintf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
+ printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]);
dataset_pl = H5Pcreate(H5P_DATASET_CREATE);
VRFY((dataset_pl >= 0), "H5Pcreate succeeded");
ret = H5Pset_chunk(dataset_pl, MAX_RANK, chunk_dims);
@@ -3177,11 +3177,11 @@ none_selection_chunk(void)
/* allocate memory for data buffer. Only allocate enough buffer for
* each processor's data. */
if (mpi_rank) {
- data_origin = (DATATYPE *)HDmalloc(block[0] * block[1] * sizeof(DATATYPE));
- VRFY((data_origin != NULL), "data_origin HDmalloc succeeded");
+ data_origin = (DATATYPE *)malloc(block[0] * block[1] * sizeof(DATATYPE));
+ VRFY((data_origin != NULL), "data_origin malloc succeeded");
- data_array = (DATATYPE *)HDmalloc(block[0] * block[1] * sizeof(DATATYPE));
- VRFY((data_array != NULL), "data_array HDmalloc succeeded");
+ data_array = (DATATYPE *)malloc(block[0] * block[1] * sizeof(DATATYPE));
+ VRFY((data_array != NULL), "data_array malloc succeeded");
/* put some trivial data in the data_array */
mstart[0] = mstart[1] = 0;
@@ -3276,9 +3276,9 @@ none_selection_chunk(void)
/* release data buffers */
if (data_origin)
- HDfree(data_origin);
+ free(data_origin);
if (data_array)
- HDfree(data_array);
+ free(data_array);
}
/* Function: test_actual_io_mode
@@ -3408,13 +3408,13 @@ test_actual_io_mode(int selection_mode)
MPI_Barrier(test_comm);
- HDassert(mpi_size >= 1);
+ assert(mpi_size >= 1);
mpi_comm = test_comm;
mpi_info = MPI_INFO_NULL;
filename = (const char *)GetTestParameters();
- HDassert(filename != NULL);
+ assert(filename != NULL);
/* Setup the file access template */
fapl_id = create_faccess_plist(mpi_comm, mpi_info, facc_type);
@@ -3625,8 +3625,8 @@ test_actual_io_mode(int selection_mode)
length = dim0 * dim1;
/* Allocate and initialize the buffer */
- buffer = (int *)HDmalloc(sizeof(int) * (size_t)length);
- VRFY((buffer != NULL), "HDmalloc of buffer succeeded");
+ buffer = (int *)malloc(sizeof(int) * (size_t)length);
+ VRFY((buffer != NULL), "malloc of buffer succeeded");
for (i = 0; i < length; i++)
buffer[i] = i;
@@ -3710,8 +3710,8 @@ test_actual_io_mode(int selection_mode)
VRFY((actual_io_mode_write == actual_io_mode_expected), message);
}
else {
- HDfprintf(stderr, "%s %d -> (%d,%d)\n", test_name, mpi_rank, actual_chunk_opt_mode_write,
- actual_io_mode_write);
+ fprintf(stderr, "%s %d -> (%d,%d)\n", test_name, mpi_rank, actual_chunk_opt_mode_write,
+ actual_io_mode_write);
}
/* To test that the property is successfully reset to the default, we perform some
@@ -3767,7 +3767,7 @@ test_actual_io_mode(int selection_mode)
ret = H5Sclose(mem_space);
ret = H5Sclose(file_space);
ret = H5Fclose(fid);
- HDfree(buffer);
+ free(buffer);
return;
}
@@ -3798,7 +3798,7 @@ actual_io_mode_tests(void)
if (mpi_size > 2)
test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_MIX);
else
- HDfprintf(stdout, "Multi Chunk Mixed test requires 3 processes minimum\n");
+ fprintf(stdout, "Multi Chunk Mixed test requires 3 processes minimum\n");
test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_MIX_DISAGREE);
@@ -3906,7 +3906,7 @@ test_no_collective_cause_mode(int selection_mode)
MPI_Barrier(test_comm);
- HDassert(mpi_size >= 1);
+ assert(mpi_size >= 1);
mpi_comm = test_comm;
mpi_info = MPI_INFO_NULL;
@@ -3948,7 +3948,7 @@ test_no_collective_cause_mode(int selection_mode)
}
filename = (const char *)GetTestParameters();
- HDassert(filename != NULL);
+ assert(filename != NULL);
/* Setup the file access template */
fapl_id = create_faccess_plist(mpi_comm, mpi_info, l_facc_type);
@@ -4063,8 +4063,8 @@ test_no_collective_cause_mode(int selection_mode)
H5_CHECKED_ASSIGN(length, int, dims[0] * dims[1], hsize_t);
/* Allocate and initialize the buffer */
- buffer = (int *)HDmalloc(sizeof(int) * (size_t)length);
- VRFY((buffer != NULL), "HDmalloc of buffer succeeded");
+ buffer = (int *)malloc(sizeof(int) * (size_t)length);
+ VRFY((buffer != NULL), "malloc of buffer succeeded");
for (i = 0; i < length; i++)
buffer[i] = i;
@@ -4150,11 +4150,11 @@ test_no_collective_cause_mode(int selection_mode)
"reading and writing are the same for global cause of Broken Collective I/O");
/* Test values */
- HDmemset(message, 0, sizeof(message));
+ memset(message, 0, sizeof(message));
HDsnprintf(message, sizeof(message),
"Local cause of Broken Collective I/O has the correct value for %s.\n", test_name);
VRFY((no_collective_cause_local_write == no_collective_cause_local_expected), message);
- HDmemset(message, 0, sizeof(message));
+ memset(message, 0, sizeof(message));
HDsnprintf(message, sizeof(message),
"Global cause of Broken Collective I/O has the correct value for %s.\n", test_name);
VRFY((no_collective_cause_global_write == no_collective_cause_global_expected), message);
@@ -4178,7 +4178,7 @@ test_no_collective_cause_mode(int selection_mode)
H5Sclose(file_space);
if (fid)
H5Fclose(fid);
- HDfree(buffer);
+ free(buffer);
/* clean up external file */
if (selection_mode & TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL)
@@ -4260,11 +4260,11 @@ dataset_atomicity(void)
dim1 = 32;
filename = GetTestParameters();
if (facc_type != FACC_MPIO) {
- HDprintf("Atomicity tests will not work without the MPIO VFD\n");
+ printf("Atomicity tests will not work without the MPIO VFD\n");
return;
}
if (VERBOSE_MED)
- HDprintf("atomic writes to file %s\n", filename);
+ printf("atomic writes to file %s\n", filename);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
@@ -4272,11 +4272,11 @@ dataset_atomicity(void)
buf_size = dim0 * dim1;
/* allocate memory for data buffer */
- write_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int));
- VRFY((write_buf != NULL), "write_buf HDcalloc succeeded");
+ write_buf = (int *)calloc((size_t)buf_size, sizeof(int));
+ VRFY((write_buf != NULL), "write_buf calloc succeeded");
/* allocate memory for data buffer */
- read_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int));
- VRFY((read_buf != NULL), "read_buf HDcalloc succeeded");
+ read_buf = (int *)calloc((size_t)buf_size, sizeof(int));
+ VRFY((read_buf != NULL), "read_buf calloc succeeded");
/* setup file access template */
acc_tpl = create_faccess_plist(comm, info, facc_type);
@@ -4394,9 +4394,9 @@ dataset_atomicity(void)
j = 0;
k = 0;
for (i = 0; i < dim0; i++) {
- HDprintf("\n");
+ printf("\n");
for (j = 0; j < dim1; j++)
- HDprintf("%d ", read_buf[k++]);
+ printf("%d ", read_buf[k++]);
}
}
@@ -4410,8 +4410,8 @@ dataset_atomicity(void)
"Atomicity Test Failed Process %d: Value read should be 0 or 5\n");
for (i = 1; i < buf_size; i++) {
if (read_buf[i] != compare) {
- HDprintf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank, i,
- read_buf[i], compare);
+ printf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank, i,
+ read_buf[i], compare);
nerrors++;
}
}
@@ -4422,20 +4422,20 @@ dataset_atomicity(void)
/* release data buffers */
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
/* open dataset2 (non-contiguous case) */
dataset2 = H5Dopen2(fid, DATASETNAME6, H5P_DEFAULT);
VRFY((dataset2 >= 0), "H5Dopen2 succeeded");
/* allocate memory for data buffer */
- write_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int));
- VRFY((write_buf != NULL), "write_buf HDcalloc succeeded");
+ write_buf = (int *)calloc((size_t)buf_size, sizeof(int));
+ VRFY((write_buf != NULL), "write_buf calloc succeeded");
/* allocate memory for data buffer */
- read_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int));
- VRFY((read_buf != NULL), "read_buf HDcalloc succeeded");
+ read_buf = (int *)calloc((size_t)buf_size, sizeof(int));
+ VRFY((read_buf != NULL), "read_buf calloc succeeded");
for (i = 0; i < buf_size; i++) {
write_buf[i] = 5;
@@ -4494,11 +4494,11 @@ dataset_atomicity(void)
j = 0;
k = 0;
for (i = 0; i < dim0; i++) {
- HDprintf("\n");
+ printf("\n");
for (j = 0; j < dim1; j++)
- HDprintf("%d ", read_buf[k++]);
+ printf("%d ", read_buf[k++]);
}
- HDprintf("\n");
+ printf("\n");
}
}
@@ -4531,8 +4531,8 @@ dataset_atomicity(void)
continue;
}
else if (compare != read_buf[k]) {
- HDprintf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank,
- k, read_buf[k], compare);
+ printf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank,
+ k, read_buf[k], compare);
nerrors++;
}
k++;
@@ -4549,9 +4549,9 @@ dataset_atomicity(void)
/* release data buffers */
if (write_buf)
- HDfree(write_buf);
+ free(write_buf);
if (read_buf)
- HDfree(read_buf);
+ free(read_buf);
ret = H5Fclose(fid);
VRFY((ret >= 0), "H5Fclose succeeded");
@@ -4577,7 +4577,7 @@ test_dense_attr(void)
/* get filename */
filename = (const char *)GetTestParameters();
- HDassert(filename != NULL);
+ assert(filename != NULL);
/* set up MPI parameters */
MPI_Comm_size(test_comm, &mpi_size);
@@ -4638,29 +4638,29 @@ main(int argc, char **argv)
MPI_Comm_size(test_comm, &mpi_size);
MPI_Comm_rank(test_comm, &mpi_rank);
- HDmemset(filenames, 0, sizeof(filenames));
+ memset(filenames, 0, sizeof(filenames));
dim0 = BIG_X_FACTOR;
dim1 = BIG_Y_FACTOR;
dim2 = BIG_Z_FACTOR;
if (MAINPROCESS) {
- HDprintf("===================================\n");
- HDprintf("2 GByte IO TESTS START\n");
- HDprintf("2 MPI ranks will run the tests...\n");
- HDprintf("===================================\n");
+ printf("===================================\n");
+ printf("2 GByte IO TESTS START\n");
+ printf("2 MPI ranks will run the tests...\n");
+ printf("===================================\n");
h5_show_hostname();
}
if (H5dont_atexit() < 0) {
- HDprintf("Failed to turn off atexit processing. Continue.\n");
+ printf("Failed to turn off atexit processing. Continue.\n");
};
H5open();
- HDmemset(filenames, 0, sizeof(filenames));
+ memset(filenames, 0, sizeof(filenames));
for (int i = 0; i < NFILENAME; i++) {
- if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) {
- HDprintf("couldn't allocate filename array\n");
+ if (NULL == (filenames[i] = malloc(PATH_MAX))) {
+ printf("couldn't allocate filename array\n");
MPI_Abort(MPI_COMM_WORLD, -1);
}
}
@@ -4675,7 +4675,7 @@ main(int argc, char **argv)
if (mpi_rank >= 2)
rank_color = 1;
if (MPI_Comm_split(test_comm, rank_color, mpi_rank, &test_comm) != MPI_SUCCESS) {
- HDprintf("MPI returned an error. Exiting\n");
+ printf("MPI returned an error. Exiting\n");
}
}
@@ -4730,7 +4730,7 @@ main(int argc, char **argv)
HDremove(FILENAME[0]);
for (int i = 0; i < NFILENAME; i++) {
- HDfree(filenames[i]);
+ free(filenames[i]);
filenames[i] = NULL;
}