diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-06-28 22:48:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-28 22:48:12 (GMT) |
commit | aebac33a1f290fa5065bce96bb0512317a34c283 (patch) | |
tree | cdbae6dbd65a2eb4e6f786921ee907cec92c92d3 /testpar | |
parent | 605cea4af60cfcbe03a54f697de392eec75e5a85 (diff) | |
download | hdf5-aebac33a1f290fa5065bce96bb0512317a34c283.zip hdf5-aebac33a1f290fa5065bce96bb0512317a34c283.tar.gz hdf5-aebac33a1f290fa5065bce96bb0512317a34c283.tar.bz2 |
Remove HD from memory allocate/free calls (#3195)
* HDcalloc
* HDfree
* HDmalloc
* HDrealloc
Diffstat (limited to 'testpar')
41 files changed, 1502 insertions, 1503 deletions
diff --git a/testpar/API/H5_api_async_test_parallel.c b/testpar/API/H5_api_async_test_parallel.c index 97944df..d6f55b1 100644 --- a/testpar/API/H5_api_async_test_parallel.c +++ b/testpar/API/H5_api_async_test_parallel.c @@ -125,13 +125,13 @@ test_one_dataset_io(void) data_size *= dims[i]; data_size *= sizeof(int); - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); TEST_ERROR; } - if (NULL == (read_buf = HDmalloc(data_size))) { + if (NULL == (read_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); TEST_ERROR; @@ -364,17 +364,17 @@ test_one_dataset_io(void) TEST_ERROR; if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -395,11 +395,11 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (dims) - HDfree(dims); + free(dims); H5Sclose(space_id); H5Sclose(mspace_id); H5Dclose(dset_id); @@ -483,13 +483,13 @@ test_multi_dataset_io(void) data_size *= sizeof(int); data_size *= MULTI_DATASET_IO_TEST_NDSETS; - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); TEST_ERROR; } - if (NULL == (read_buf = HDmalloc(data_size))) { + if (NULL == (read_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); TEST_ERROR; @@ -687,17 +687,17 @@ test_multi_dataset_io(void) TEST_ERROR; if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -718,11 +718,11 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (dims) - HDfree(dims); + free(dims); H5Sclose(space_id); H5Sclose(mspace_id); for (i = 0; i < MULTI_DATASET_IO_TEST_NDSETS; i++) @@ -805,13 +805,13 @@ test_multi_file_dataset_io(void) data_size *= sizeof(int); data_size *= MULTI_FILE_DATASET_IO_TEST_NFILES; - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); TEST_ERROR; } - if (NULL == (read_buf = HDmalloc(data_size))) { + if (NULL == (read_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); TEST_ERROR; @@ -1111,17 +1111,17 @@ test_multi_file_dataset_io(void) TEST_ERROR; if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -1142,11 +1142,11 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (dims) - HDfree(dims); + free(dims); H5Sclose(space_id); H5Sclose(mspace_id); for (i = 0; i < MULTI_FILE_DATASET_IO_TEST_NFILES; i++) { @@ -1228,13 +1228,13 @@ test_multi_file_grp_dset_io(void) data_size *= sizeof(int); data_size *= MULTI_FILE_GRP_DSET_IO_TEST_NFILES; - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); TEST_ERROR; } - if (NULL == (read_buf = HDmalloc(data_size))) { + if (NULL == (read_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); TEST_ERROR; @@ -1527,17 +1527,17 @@ test_multi_file_grp_dset_io(void) TEST_ERROR; if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -1558,11 +1558,11 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (dims) - HDfree(dims); + free(dims); H5Sclose(space_id); H5Sclose(mspace_id); H5Dclose(dset_id); @@ -1633,13 +1633,13 @@ test_set_extent(void) if (generate_random_parallel_dimensions(SET_EXTENT_TEST_SPACE_RANK, &dims) < 0) TEST_ERROR; - if (NULL == (maxdims = HDmalloc(SET_EXTENT_TEST_SPACE_RANK * sizeof(hsize_t)))) { + if (NULL == (maxdims = malloc(SET_EXTENT_TEST_SPACE_RANK * sizeof(hsize_t)))) { H5_FAILED(); printf(" couldn't allocate max dataspace dimension buffer\n"); TEST_ERROR; } - if (NULL == (cdims = HDmalloc(SET_EXTENT_TEST_SPACE_RANK * sizeof(hsize_t)))) { + if (NULL == (cdims = malloc(SET_EXTENT_TEST_SPACE_RANK * sizeof(hsize_t)))) { H5_FAILED(); printf(" couldn't allocate chunk dimension buffer\n"); TEST_ERROR; @@ -1685,13 +1685,13 @@ test_set_extent(void) data_size *= sizeof(int); data_size *= SET_EXTENT_TEST_NUM_EXTENDS; - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); TEST_ERROR; } - if (NULL == (read_buf = HDmalloc(data_size))) { + if (NULL == (read_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); TEST_ERROR; @@ -1844,27 +1844,27 @@ test_set_extent(void) FAIL_PUTS_ERROR(" dataspaces are not equal\n"); if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (cdims) { - HDfree(cdims); + free(cdims); cdims = NULL; } if (maxdims) { - HDfree(maxdims); + free(maxdims); maxdims = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -1897,15 +1897,15 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (cdims) - HDfree(cdims); + free(cdims); if (maxdims) - HDfree(maxdims); + free(maxdims); if (dims) - HDfree(dims); + free(dims); H5Sclose(space_id); H5Sclose(mspace_id); H5Sclose(space_id_out); @@ -2045,7 +2045,7 @@ test_attribute_exists(void) TEST_ERROR; if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -2060,7 +2060,7 @@ error: H5E_BEGIN_TRY { if (dims) - HDfree(dims); + free(dims); H5Sclose(space_id); H5Aclose(attr_id); H5Dclose(dset_id); @@ -2150,13 +2150,13 @@ test_attribute_io(void) data_size *= dims[i]; data_size *= sizeof(int); - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for attribute write\n"); TEST_ERROR; } - if (NULL == (read_buf = HDmalloc(data_size))) { + if (NULL == (read_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for attribute read\n"); TEST_ERROR; @@ -2240,17 +2240,17 @@ test_attribute_io(void) TEST_ERROR; if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -2265,11 +2265,11 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (dims) - HDfree(dims); + free(dims); H5Sclose(space_id); H5Aclose(attr_id); H5Dclose(dset_id); @@ -2348,13 +2348,13 @@ test_attribute_io_tconv(void) data_size *= dims[i]; data_size *= sizeof(int); - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for attribute write\n"); TEST_ERROR; } - if (NULL == (read_buf = HDmalloc(data_size))) { + if (NULL == (read_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for attribute read\n"); TEST_ERROR; @@ -2433,17 +2433,17 @@ test_attribute_io_tconv(void) TEST_ERROR; if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -2460,11 +2460,11 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (dims) - HDfree(dims); + free(dims); H5Sclose(space_id); H5Aclose(attr_id); H5Dclose(dset_id); @@ -2577,19 +2577,19 @@ test_attribute_io_compound(void) data_size *= dims[i]; data_size *= sizeof(tattr_cmpd_t); - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for attribute write\n"); TEST_ERROR; } - if (NULL == (read_buf = HDmalloc(data_size))) { + if (NULL == (read_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for attribute read\n"); TEST_ERROR; } - if (NULL == (fbuf = HDmalloc(data_size))) { + if (NULL == (fbuf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for attribute read verification\n"); TEST_ERROR; @@ -2835,22 +2835,22 @@ test_attribute_io_compound(void) TEST_ERROR; if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (fbuf) { - HDfree(fbuf); + free(fbuf); fbuf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -2867,13 +2867,13 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (fbuf) - HDfree(fbuf); + free(fbuf); if (dims) - HDfree(dims); + free(dims); H5Sclose(space_id); H5Tclose(mtype_id); H5Tclose(ftype_id); @@ -3457,7 +3457,7 @@ test_ocopy_orefresh(void) TEST_ERROR; if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -3474,7 +3474,7 @@ error: H5E_BEGIN_TRY { if (dims) - HDfree(dims); + free(dims); H5Sclose(space_id); H5Dclose(dset_id); H5Gclose(parent_group_id); diff --git a/testpar/API/H5_api_dataset_test_parallel.c b/testpar/API/H5_api_dataset_test_parallel.c index 59e4248..6f9bf05 100644 --- a/testpar/API/H5_api_dataset_test_parallel.c +++ b/testpar/API/H5_api_dataset_test_parallel.c @@ -215,7 +215,7 @@ test_write_dataset_data_verification(void) data_size *= dims[i]; data_size *= DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE; - if (NULL != (write_buf = HDmalloc(data_size))) { + if (NULL != (write_buf = malloc(data_size))) { for (i = 0; i < data_size / DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE; i++) ((int *)write_buf)[i] = (int)i; @@ -227,7 +227,7 @@ test_write_dataset_data_verification(void) op_failed = TRUE; if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } } @@ -317,7 +317,7 @@ test_write_dataset_data_verification(void) } if (NULL == - (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE))) { + (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); PART_ERROR(H5Dwrite_all_read); @@ -338,7 +338,7 @@ test_write_dataset_data_verification(void) } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } @@ -347,11 +347,11 @@ test_write_dataset_data_verification(void) PART_END(H5Dwrite_all_read); if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (fspace_id >= 0) { @@ -379,7 +379,7 @@ test_write_dataset_data_verification(void) data_size *= dims[i]; data_size *= DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE; - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); PART_ERROR(H5Dwrite_hyperslab_read); @@ -442,7 +442,7 @@ test_write_dataset_data_verification(void) } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -525,7 +525,7 @@ test_write_dataset_data_verification(void) } if (NULL == - (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE))) { + (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); PART_ERROR(H5Dwrite_hyperslab_read); @@ -553,7 +553,7 @@ test_write_dataset_data_verification(void) } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } @@ -562,11 +562,11 @@ test_write_dataset_data_verification(void) PART_END(H5Dwrite_hyperslab_read); if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (fspace_id >= 0) { @@ -602,7 +602,7 @@ test_write_dataset_data_verification(void) data_size *= dims[i]; data_size *= DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE; - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); PART_ERROR(H5Dwrite_point_sel_read); @@ -612,9 +612,9 @@ test_write_dataset_data_verification(void) for (i = 0; i < data_size / DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE; i++) ((int *)write_buf)[i] = mpi_size - mpi_rank; - if (NULL == (points = HDmalloc(DATASET_WRITE_DATA_VERIFY_TEST_SPACE_RANK * - (data_size / DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE) * - sizeof(hsize_t)))) { + if (NULL == (points = malloc(DATASET_WRITE_DATA_VERIFY_TEST_SPACE_RANK * + (data_size / DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE) * + sizeof(hsize_t)))) { H5_FAILED(); printf(" couldn't allocate buffer for point selection\n"); PART_ERROR(H5Dwrite_point_sel_read); @@ -676,7 +676,7 @@ test_write_dataset_data_verification(void) } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -759,7 +759,7 @@ test_write_dataset_data_verification(void) } if (NULL == - (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE))) { + (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); PART_ERROR(H5Dwrite_point_sel_read); @@ -787,7 +787,7 @@ test_write_dataset_data_verification(void) } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } @@ -796,15 +796,15 @@ test_write_dataset_data_verification(void) PART_END(H5Dwrite_point_sel_read); if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (points) { - HDfree(points); + free(points); points = NULL; } if (fspace_id >= 0) { @@ -837,22 +837,22 @@ test_write_dataset_data_verification(void) TESTING_2("test cleanup"); if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (points) { - HDfree(points); + free(points); points = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -873,13 +873,13 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (points) - HDfree(points); + free(points); if (dims) - HDfree(dims); + free(dims); H5Sclose(mspace_id); H5Sclose(fspace_id); H5Dclose(dset_id); @@ -988,7 +988,7 @@ test_write_dataset_independent(void) data_size *= dims[i]; data_size *= DATASET_INDEPENDENT_WRITE_TEST_DTYPE_SIZE; - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); goto error; @@ -1066,7 +1066,7 @@ test_write_dataset_independent(void) END_INDEPENDENT_OP(dset_write); if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } @@ -1139,7 +1139,7 @@ test_write_dataset_independent(void) goto error; } - if (NULL == (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_INDEPENDENT_WRITE_TEST_DTYPE_SIZE))) { + if (NULL == (read_buf = malloc((hsize_t)space_npoints * DATASET_INDEPENDENT_WRITE_TEST_DTYPE_SIZE))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); goto error; @@ -1186,12 +1186,12 @@ test_write_dataset_independent(void) } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -1218,11 +1218,11 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (dims) - HDfree(dims); + free(dims); H5Sclose(mspace_id); H5Sclose(fspace_id); H5Dclose(dset_id1); @@ -1319,7 +1319,7 @@ test_write_dataset_one_proc_0_selection(void) BEGIN_INDEPENDENT_OP(write_buf_alloc) { if (!MAINPROCESS) { - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(write_buf_alloc); @@ -1376,7 +1376,7 @@ test_write_dataset_one_proc_0_selection(void) END_INDEPENDENT_OP(dset_write); if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -1457,8 +1457,7 @@ test_write_dataset_one_proc_0_selection(void) goto error; } - if (NULL == - (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_ONE_PROC_0_SEL_TEST_DTYPE_SIZE))) { + if (NULL == (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_ONE_PROC_0_SEL_TEST_DTYPE_SIZE))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); goto error; @@ -1487,12 +1486,12 @@ test_write_dataset_one_proc_0_selection(void) } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -1517,11 +1516,11 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (dims) - HDfree(dims); + free(dims); H5Sclose(mspace_id); H5Sclose(fspace_id); H5Dclose(dset_id); @@ -1617,7 +1616,7 @@ test_write_dataset_one_proc_none_selection(void) BEGIN_INDEPENDENT_OP(write_buf_alloc) { if (!MAINPROCESS) { - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(write_buf_alloc); @@ -1687,7 +1686,7 @@ test_write_dataset_one_proc_none_selection(void) END_INDEPENDENT_OP(dset_write); if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -1770,7 +1769,7 @@ test_write_dataset_one_proc_none_selection(void) } if (NULL == - (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DTYPE_SIZE))) { + (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DTYPE_SIZE))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); goto error; @@ -1800,12 +1799,12 @@ test_write_dataset_one_proc_none_selection(void) } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -1830,11 +1829,11 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (dims) - HDfree(dims); + free(dims); H5Sclose(mspace_id); H5Sclose(fspace_id); H5Dclose(dset_id); @@ -1927,7 +1926,7 @@ test_write_dataset_one_proc_all_selection(void) BEGIN_INDEPENDENT_OP(write_buf_alloc) { if (MAINPROCESS) { - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(write_buf_alloc); @@ -1983,7 +1982,7 @@ test_write_dataset_one_proc_all_selection(void) END_INDEPENDENT_OP(dset_write); if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -2066,7 +2065,7 @@ test_write_dataset_one_proc_all_selection(void) } if (NULL == - (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DTYPE_SIZE))) { + (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DTYPE_SIZE))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); goto error; @@ -2088,12 +2087,12 @@ test_write_dataset_one_proc_all_selection(void) } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -2118,11 +2117,11 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (dims) - HDfree(dims); + free(dims); H5Sclose(mspace_id); H5Sclose(fspace_id); H5Dclose(dset_id); @@ -2221,7 +2220,7 @@ test_write_dataset_hyper_file_all_mem(void) data_size *= dims[i]; data_size *= DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DTYPE_SIZE; - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); goto error; @@ -2258,7 +2257,7 @@ test_write_dataset_hyper_file_all_mem(void) } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (fspace_id >= 0) { @@ -2333,7 +2332,7 @@ test_write_dataset_hyper_file_all_mem(void) } if (NULL == - (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DTYPE_SIZE))) { + (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DTYPE_SIZE))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); goto error; @@ -2360,12 +2359,12 @@ test_write_dataset_hyper_file_all_mem(void) } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -2394,11 +2393,11 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (dims) - HDfree(dims); + free(dims); H5Sclose(mspace_id); H5Sclose(fspace_id); H5Dclose(dset_id); @@ -2497,7 +2496,7 @@ test_write_dataset_all_file_hyper_mem(void) * buffer in order to prove that the mapping from hyperslab selection <-> all * selection works correctly. */ - if (NULL == (write_buf = HDmalloc(2 * data_size))) { + if (NULL == (write_buf = malloc(2 * data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(write_buf_alloc); @@ -2552,7 +2551,7 @@ test_write_dataset_all_file_hyper_mem(void) END_INDEPENDENT_OP(dset_write); if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -2635,7 +2634,7 @@ test_write_dataset_all_file_hyper_mem(void) } if (NULL == - (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DTYPE_SIZE))) { + (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DTYPE_SIZE))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); goto error; @@ -2657,12 +2656,12 @@ test_write_dataset_all_file_hyper_mem(void) } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -2687,11 +2686,11 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (dims) - HDfree(dims); + free(dims); H5Sclose(mspace_id); H5Sclose(fspace_id); H5Dclose(dset_id); @@ -2805,7 +2804,7 @@ test_write_dataset_all_file_point_mem(void) * buffer in order to prove that the mapping from point selection <-> all * selection works correctly. */ - if (NULL == (write_buf = HDmalloc(2 * data_size))) { + if (NULL == (write_buf = malloc(2 * data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(write_buf_alloc); @@ -2839,8 +2838,8 @@ test_write_dataset_all_file_point_mem(void) INDEPENDENT_OP_ERROR(dset_write); } - if (NULL == (points = HDmalloc((data_size / DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DTYPE_SIZE) * - sizeof(hsize_t)))) { + if (NULL == (points = malloc((data_size / DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DTYPE_SIZE) * + sizeof(hsize_t)))) { H5_FAILED(); printf(" couldn't allocate buffer for point selection\n"); INDEPENDENT_OP_ERROR(dset_write); @@ -2872,11 +2871,11 @@ test_write_dataset_all_file_point_mem(void) END_INDEPENDENT_OP(dset_write); if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (points) { - HDfree(points); + free(points); points = NULL; } if (mspace_id >= 0) { @@ -2959,7 +2958,7 @@ test_write_dataset_all_file_point_mem(void) } if (NULL == - (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DTYPE_SIZE))) { + (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DTYPE_SIZE))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); goto error; @@ -2981,12 +2980,12 @@ test_write_dataset_all_file_point_mem(void) } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -3011,13 +3010,13 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (points) - HDfree(points); + free(points); if (dims) - HDfree(dims); + free(dims); H5Sclose(mspace_id); H5Sclose(fspace_id); H5Dclose(dset_id); @@ -3117,7 +3116,7 @@ test_write_dataset_hyper_file_point_mem(void) * buffer in order to prove that the mapping from point selection <-> hyperslab * selection works correctly. */ - if (NULL == (write_buf = HDmalloc(2 * data_size))) { + if (NULL == (write_buf = malloc(2 * data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); goto error; @@ -3161,8 +3160,8 @@ test_write_dataset_hyper_file_point_mem(void) goto error; } - if (NULL == (points = HDmalloc((data_size / DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DTYPE_SIZE) * - sizeof(hsize_t)))) { + if (NULL == (points = malloc((data_size / DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DTYPE_SIZE) * + sizeof(hsize_t)))) { H5_FAILED(); printf(" couldn't allocate buffer for point selection\n"); goto error; @@ -3190,11 +3189,11 @@ test_write_dataset_hyper_file_point_mem(void) } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (points) { - HDfree(points); + free(points); points = NULL; } if (mspace_id >= 0) { @@ -3277,7 +3276,7 @@ test_write_dataset_hyper_file_point_mem(void) } if (NULL == - (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DTYPE_SIZE))) { + (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DTYPE_SIZE))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); goto error; @@ -3305,12 +3304,12 @@ test_write_dataset_hyper_file_point_mem(void) } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -3335,13 +3334,13 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (points) - HDfree(points); + free(points); if (dims) - HDfree(dims); + free(dims); H5Sclose(mspace_id); H5Sclose(fspace_id); H5Dclose(dset_id); @@ -3437,7 +3436,7 @@ test_write_dataset_point_file_hyper_mem(void) * buffer in order to prove that the mapping from hyperslab selection <-> point * selection works correctly. */ - if (NULL == (write_buf = HDmalloc(2 * data_size))) { + if (NULL == (write_buf = malloc(2 * data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); goto error; @@ -3451,8 +3450,8 @@ test_write_dataset_point_file_hyper_mem(void) ((int *)write_buf)[i] = 0; } - if (NULL == (points = HDmalloc((data_size / DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DTYPE_SIZE) * - DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_SPACE_RANK * sizeof(hsize_t)))) { + if (NULL == (points = malloc((data_size / DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DTYPE_SIZE) * + DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_SPACE_RANK * sizeof(hsize_t)))) { H5_FAILED(); printf(" couldn't allocate buffer for point selection\n"); goto error; @@ -3508,11 +3507,11 @@ test_write_dataset_point_file_hyper_mem(void) } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (points) { - HDfree(points); + free(points); points = NULL; } if (mspace_id >= 0) { @@ -3595,7 +3594,7 @@ test_write_dataset_point_file_hyper_mem(void) } if (NULL == - (read_buf = HDmalloc((hsize_t)space_npoints * DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DTYPE_SIZE))) { + (read_buf = malloc((hsize_t)space_npoints * DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DTYPE_SIZE))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); goto error; @@ -3623,12 +3622,12 @@ test_write_dataset_point_file_hyper_mem(void) } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -3653,13 +3652,13 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (points) - HDfree(points); + free(points); if (dims) - HDfree(dims); + free(dims); H5Sclose(mspace_id); H5Sclose(fspace_id); H5Dclose(dset_id); @@ -3758,7 +3757,7 @@ test_read_dataset_one_proc_0_selection(void) data_size *= dims[i]; data_size *= DATASET_READ_ONE_PROC_0_SEL_TEST_DTYPE_SIZE; - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); @@ -3793,7 +3792,7 @@ test_read_dataset_one_proc_0_selection(void) } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -3889,7 +3888,7 @@ test_read_dataset_one_proc_0_selection(void) read_buf_size = ((size_t)(space_npoints / mpi_size) * DATASET_READ_ONE_PROC_0_SEL_TEST_DTYPE_SIZE); - if (NULL == (read_buf = HDmalloc(read_buf_size))) { + if (NULL == (read_buf = malloc(read_buf_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); INDEPENDENT_OP_ERROR(read_buf_alloc); @@ -3957,12 +3956,12 @@ test_read_dataset_one_proc_0_selection(void) END_INDEPENDENT_OP(data_verify); if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -3989,11 +3988,11 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (dims) - HDfree(dims); + free(dims); H5Sclose(mspace_id); H5Sclose(fspace_id); H5Dclose(dset_id); @@ -4093,7 +4092,7 @@ test_read_dataset_one_proc_none_selection(void) data_size *= dims[i]; data_size *= DATASET_READ_ONE_PROC_NONE_SEL_TEST_DTYPE_SIZE; - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); @@ -4128,7 +4127,7 @@ test_read_dataset_one_proc_none_selection(void) } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -4225,7 +4224,7 @@ test_read_dataset_one_proc_none_selection(void) read_buf_size = ((size_t)(space_npoints / mpi_size) * DATASET_READ_ONE_PROC_NONE_SEL_TEST_DTYPE_SIZE); - if (NULL == (read_buf = HDmalloc(read_buf_size))) { + if (NULL == (read_buf = malloc(read_buf_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); INDEPENDENT_OP_ERROR(read_buf_alloc); @@ -4306,12 +4305,12 @@ test_read_dataset_one_proc_none_selection(void) END_INDEPENDENT_OP(data_verify); if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -4338,11 +4337,11 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (dims) - HDfree(dims); + free(dims); H5Sclose(mspace_id); H5Sclose(fspace_id); H5Dclose(dset_id); @@ -4439,7 +4438,7 @@ test_read_dataset_one_proc_all_selection(void) data_size *= dims[i]; data_size *= DATASET_READ_ONE_PROC_ALL_SEL_TEST_DTYPE_SIZE; - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); @@ -4474,7 +4473,7 @@ test_read_dataset_one_proc_all_selection(void) } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -4569,7 +4568,7 @@ test_read_dataset_one_proc_all_selection(void) if (MAINPROCESS) { read_buf_size = (size_t)space_npoints * DATASET_READ_ONE_PROC_ALL_SEL_TEST_DTYPE_SIZE; - if (NULL == (read_buf = HDmalloc(read_buf_size))) { + if (NULL == (read_buf = malloc(read_buf_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); INDEPENDENT_OP_ERROR(read_buf_alloc); @@ -4643,12 +4642,12 @@ test_read_dataset_one_proc_all_selection(void) END_INDEPENDENT_OP(data_verify); if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -4675,11 +4674,11 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (dims) - HDfree(dims); + free(dims); H5Sclose(mspace_id); H5Sclose(fspace_id); H5Dclose(dset_id); @@ -4791,7 +4790,7 @@ test_read_dataset_all_file_hyper_mem(void) data_size *= dims[i]; data_size *= DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DTYPE_SIZE; - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); @@ -4828,7 +4827,7 @@ test_read_dataset_all_file_hyper_mem(void) } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -4938,7 +4937,7 @@ test_read_dataset_all_file_hyper_mem(void) * selection works correctly. */ read_buf_size = (size_t)(2 * space_npoints) * DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DTYPE_SIZE; - if (NULL == (read_buf = HDcalloc(1, read_buf_size))) { + if (NULL == (read_buf = calloc(1, read_buf_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); INDEPENDENT_OP_ERROR(dset_read); @@ -4992,12 +4991,12 @@ test_read_dataset_all_file_hyper_mem(void) END_INDEPENDENT_OP(dset_read); if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -5022,11 +5021,11 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (dims) - HDfree(dims); + free(dims); H5Sclose(mspace_id); H5Sclose(fspace_id); H5Dclose(dset_id); @@ -5139,7 +5138,7 @@ test_read_dataset_all_file_point_mem(void) data_size *= dims[i]; data_size *= DATASET_READ_ALL_FILE_POINT_MEM_TEST_DTYPE_SIZE; - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); @@ -5176,7 +5175,7 @@ test_read_dataset_all_file_point_mem(void) } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -5283,7 +5282,7 @@ test_read_dataset_all_file_point_mem(void) * selection works correctly. */ read_buf_size = (size_t)(2 * space_npoints) * DATASET_READ_ALL_FILE_POINT_MEM_TEST_DTYPE_SIZE; - if (NULL == (read_buf = HDcalloc(1, read_buf_size))) { + if (NULL == (read_buf = calloc(1, read_buf_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); INDEPENDENT_OP_ERROR(dset_read); @@ -5295,7 +5294,7 @@ test_read_dataset_all_file_point_mem(void) INDEPENDENT_OP_ERROR(dset_read); } - if (NULL == (points = HDmalloc((size_t)space_npoints * sizeof(hsize_t)))) { + if (NULL == (points = malloc((size_t)space_npoints * sizeof(hsize_t)))) { H5_FAILED(); printf(" couldn't allocate buffer for point selection\n"); INDEPENDENT_OP_ERROR(dset_read); @@ -5348,17 +5347,17 @@ test_read_dataset_all_file_point_mem(void) END_INDEPENDENT_OP(dset_read); if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (points) { - HDfree(points); + free(points); points = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -5383,13 +5382,13 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (points) - HDfree(points); + free(points); if (dims) - HDfree(dims); + free(dims); H5Sclose(mspace_id); H5Sclose(fspace_id); H5Dclose(dset_id); @@ -5492,7 +5491,7 @@ test_read_dataset_hyper_file_point_mem(void) data_size *= dims[i]; data_size *= DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DTYPE_SIZE; - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); @@ -5529,7 +5528,7 @@ test_read_dataset_hyper_file_point_mem(void) } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -5626,7 +5625,7 @@ test_read_dataset_hyper_file_point_mem(void) * selection works correctly. */ read_buf_size = (2 * (size_t)(space_npoints / mpi_size) * DATASET_READ_ONE_PROC_NONE_SEL_TEST_DTYPE_SIZE); - if (NULL == (read_buf = HDcalloc(1, read_buf_size))) { + if (NULL == (read_buf = calloc(1, read_buf_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); goto error; @@ -5662,7 +5661,7 @@ test_read_dataset_hyper_file_point_mem(void) goto error; } - if (NULL == (points = HDmalloc((size_t)(space_npoints / mpi_size) * sizeof(hsize_t)))) { + if (NULL == (points = malloc((size_t)(space_npoints / mpi_size) * sizeof(hsize_t)))) { H5_FAILED(); printf(" couldn't allocate buffer for point selection\n"); goto error; @@ -5706,17 +5705,17 @@ test_read_dataset_hyper_file_point_mem(void) } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (points) { - HDfree(points); + free(points); points = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -5741,13 +5740,13 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (points) - HDfree(points); + free(points); if (dims) - HDfree(dims); + free(dims); H5Sclose(mspace_id); H5Sclose(fspace_id); H5Dclose(dset_id); @@ -5846,7 +5845,7 @@ test_read_dataset_point_file_hyper_mem(void) data_size *= dims[i]; data_size *= DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DTYPE_SIZE; - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); @@ -5883,7 +5882,7 @@ test_read_dataset_point_file_hyper_mem(void) } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -5981,15 +5980,15 @@ test_read_dataset_point_file_hyper_mem(void) */ read_buf_size = (2 * (size_t)(space_npoints / mpi_size) * DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DTYPE_SIZE); - if (NULL == (read_buf = HDcalloc(1, read_buf_size))) { + if (NULL == (read_buf = calloc(1, read_buf_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset read\n"); goto error; } - if (NULL == (points = HDmalloc((size_t)((space_npoints / mpi_size) * - DATASET_READ_POINT_FILE_HYPER_MEM_TEST_SPACE_RANK) * - sizeof(hsize_t)))) { + if (NULL == (points = malloc((size_t)((space_npoints / mpi_size) * + DATASET_READ_POINT_FILE_HYPER_MEM_TEST_SPACE_RANK) * + sizeof(hsize_t)))) { H5_FAILED(); printf(" couldn't allocate buffer for point selection\n"); goto error; @@ -6061,17 +6060,17 @@ test_read_dataset_point_file_hyper_mem(void) } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (points) { - HDfree(points); + free(points); points = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -6098,13 +6097,13 @@ error: H5E_BEGIN_TRY { if (read_buf) - HDfree(read_buf); + free(read_buf); if (write_buf) - HDfree(write_buf); + free(write_buf); if (points) - HDfree(points); + free(points); if (dims) - HDfree(dims); + free(dims); H5Sclose(mspace_id); H5Sclose(fspace_id); H5Dclose(dset_id); @@ -6166,14 +6165,14 @@ test_write_multi_chunk_dataset_same_shape_read(void) } if (NULL == - (dims = HDmalloc(DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK * sizeof(hsize_t)))) { + (dims = malloc(DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK * sizeof(hsize_t)))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset dimensionality\n"); goto error; } - if (NULL == (chunk_dims = HDmalloc(DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK * - sizeof(hsize_t)))) { + if (NULL == (chunk_dims = malloc(DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK * + sizeof(hsize_t)))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset dimensionality\n"); goto error; @@ -6286,7 +6285,7 @@ test_write_multi_chunk_dataset_same_shape_read(void) } } - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); @@ -6360,7 +6359,7 @@ test_write_multi_chunk_dataset_same_shape_read(void) } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } @@ -6527,12 +6526,12 @@ test_write_multi_chunk_dataset_same_shape_read(void) } if (chunk_dims) { - HDfree(chunk_dims); + free(chunk_dims); chunk_dims = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -6559,11 +6558,11 @@ error: H5E_BEGIN_TRY { if (write_buf) - HDfree(write_buf); + free(write_buf); if (chunk_dims) - HDfree(chunk_dims); + free(chunk_dims); if (dims) - HDfree(dims); + free(dims); H5Pclose(dcpl_id); H5Sclose(mspace_id); H5Sclose(fspace_id); @@ -6629,14 +6628,14 @@ test_write_multi_chunk_dataset_diff_shape_read(void) } if (NULL == - (dims = HDmalloc(DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK * sizeof(hsize_t)))) { + (dims = malloc(DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK * sizeof(hsize_t)))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset dimensionality\n"); goto error; } - if (NULL == (chunk_dims = HDmalloc(DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK * - sizeof(hsize_t)))) { + if (NULL == (chunk_dims = malloc(DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK * + sizeof(hsize_t)))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset dimensionality\n"); goto error; @@ -6749,7 +6748,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void) } } - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); @@ -6823,7 +6822,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void) } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } @@ -6992,12 +6991,12 @@ test_write_multi_chunk_dataset_diff_shape_read(void) } if (chunk_dims) { - HDfree(chunk_dims); + free(chunk_dims); chunk_dims = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -7024,11 +7023,11 @@ error: H5E_BEGIN_TRY { if (write_buf) - HDfree(write_buf); + free(write_buf); if (chunk_dims) - HDfree(chunk_dims); + free(chunk_dims); if (dims) - HDfree(dims); + free(dims); H5Pclose(dcpl_id); H5Sclose(mspace_id); H5Sclose(fspace_id); @@ -7093,15 +7092,15 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) return 0; } - if (NULL == (dims = HDmalloc(DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK * - sizeof(hsize_t)))) { + if (NULL == (dims = malloc(DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK * + sizeof(hsize_t)))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset dimensionality\n"); goto error; } - if (NULL == (chunk_dims = HDmalloc(DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK * - sizeof(hsize_t)))) { + if (NULL == (chunk_dims = malloc(DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK * + sizeof(hsize_t)))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset dimensionality\n"); goto error; @@ -7222,7 +7221,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) } } - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); @@ -7514,17 +7513,17 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) } if (chunk_dims) { - HDfree(chunk_dims); + free(chunk_dims); chunk_dims = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } @@ -7547,11 +7546,11 @@ error: H5E_BEGIN_TRY { if (write_buf) - HDfree(write_buf); + free(write_buf); if (chunk_dims) - HDfree(chunk_dims); + free(chunk_dims); if (dims) - HDfree(dims); + free(dims); H5Pclose(dcpl_id); H5Sclose(mspace_id); H5Sclose(fspace_id); @@ -7619,15 +7618,15 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) return 0; } - if (NULL == (dims = HDmalloc(DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK * - sizeof(hsize_t)))) { + if (NULL == (dims = malloc(DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK * + sizeof(hsize_t)))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset dimensionality\n"); goto error; } - if (NULL == (chunk_dims = HDmalloc(DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK * - sizeof(hsize_t)))) { + if (NULL == (chunk_dims = malloc(DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK * + sizeof(hsize_t)))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset dimensionality\n"); goto error; @@ -7748,7 +7747,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) } } - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); @@ -8042,17 +8041,17 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) } if (chunk_dims) { - HDfree(chunk_dims); + free(chunk_dims); chunk_dims = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } @@ -8075,11 +8074,11 @@ error: H5E_BEGIN_TRY { if (write_buf) - HDfree(write_buf); + free(write_buf); if (chunk_dims) - HDfree(chunk_dims); + free(chunk_dims); if (dims) - HDfree(dims); + free(dims); H5Pclose(dcpl_id); H5Sclose(mspace_id); H5Sclose(fspace_id); diff --git a/testpar/API/H5_api_test_parallel.c b/testpar/API/H5_api_test_parallel.c index c913746..47c974d 100644 --- a/testpar/API/H5_api_test_parallel.c +++ b/testpar/API/H5_api_test_parallel.c @@ -141,7 +141,7 @@ generate_random_parallel_dimensions(int space_rank, hsize_t **dims_out) if (space_rank <= 0) goto error; - if (NULL == (dims = HDmalloc((size_t)space_rank * sizeof(hsize_t)))) + if (NULL == (dims = malloc((size_t)space_rank * sizeof(hsize_t)))) goto error; if (MAINPROCESS) { for (i = 0; i < (size_t)space_rank; i++) { @@ -164,7 +164,7 @@ generate_random_parallel_dimensions(int space_rank, hsize_t **dims_out) error: if (dims) - HDfree(dims); + free(dims); return -1; } @@ -445,7 +445,7 @@ main(int argc, char **argv) HDexit(EXIT_SUCCESS); error: - HDfree(vol_connector_string_copy); + free(vol_connector_string_copy); H5E_BEGIN_TRY { diff --git a/testpar/API/t_bigio.c b/testpar/API/t_bigio.c index 307f749..ebecbdc 100644 --- a/testpar/API/t_bigio.c +++ b/testpar/API/t_bigio.c @@ -477,7 +477,7 @@ dataset_big_write(void) B_DATATYPE *wdata; /* allocate memory for data buffer */ - wdata = (B_DATATYPE *)HDmalloc(bigcount * sizeof(B_DATATYPE)); + wdata = (B_DATATYPE *)malloc(bigcount * sizeof(B_DATATYPE)); VRFY_G((wdata != NULL), "wdata malloc succeeded"); /* setup file access template */ @@ -700,7 +700,7 @@ dataset_big_write(void) num_points = bigcount; - coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t)); VRFY_G((coords != NULL), "coords malloc succeeded"); set_coords(start, count, stride, block, num_points, coords, IN_ORDER); @@ -749,7 +749,7 @@ dataset_big_write(void) ret = H5Dclose(dataset); VRFY_G((ret >= 0), "H5Dclose1 succeeded"); - HDfree(wdata); + free(wdata); H5Fclose(fid); } @@ -782,9 +782,9 @@ dataset_big_read(void) herr_t ret; /* Generic return value */ /* allocate memory for data buffer */ - rdata = (B_DATATYPE *)HDmalloc(bigcount * sizeof(B_DATATYPE)); + rdata = (B_DATATYPE *)malloc(bigcount * sizeof(B_DATATYPE)); VRFY_G((rdata != NULL), "rdata malloc succeeded"); - wdata = (B_DATATYPE *)HDmalloc(bigcount * sizeof(B_DATATYPE)); + wdata = (B_DATATYPE *)malloc(bigcount * sizeof(B_DATATYPE)); VRFY_G((wdata != NULL), "wdata malloc succeeded"); HDmemset(rdata, 0, bigcount * sizeof(B_DATATYPE)); @@ -1020,7 +1020,7 @@ dataset_big_read(void) num_points = bigcount; - coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t)); VRFY_G((coords != NULL), "coords malloc succeeded"); set_coords(start, count, stride, block, num_points, coords, IN_ORDER); @@ -1031,7 +1031,7 @@ dataset_big_read(void) VRFY_G((ret >= 0), "H5Sselect_elements succeeded"); if (coords) - HDfree(coords); + free(coords); /* create a memory dataspace */ /* Warning: H5Screate_simple requires an array of hsize_t elements @@ -1068,8 +1068,8 @@ dataset_big_read(void) ret = H5Dclose(dataset); VRFY_G((ret >= 0), "H5Dclose1 succeeded"); - HDfree(wdata); - HDfree(rdata); + free(wdata); + free(rdata); wdata = NULL; rdata = NULL; @@ -1096,9 +1096,9 @@ dataset_big_read(void) /* release data buffers */ if (rdata) - HDfree(rdata); + free(rdata); if (wdata) - HDfree(wdata); + free(wdata); } /* dataset_large_readAll */ @@ -1448,7 +1448,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap dims[1] = space_dim2; /* allocate memory for data buffer */ - data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int)); + data_array1 = (int *)malloc(dims[0] * dims[1] * sizeof(int)); VRFY_G((data_array1 != NULL), "data_array1 malloc succeeded"); /* set up dimensions of the slab this process accesses */ @@ -1456,7 +1456,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap /* set up the coords array selection */ num_points = block[0] * block[1] * count[0] * count[1]; - coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t)); VRFY_G((coords != NULL), "coords malloc succeeded"); point_set(start, count, stride, block, num_points, coords, mode); @@ -1715,16 +1715,16 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap VRFY_G((status >= 0), ""); if (data_array1) - HDfree(data_array1); + free(data_array1); /* Use collective read to verify the correctness of collective write. */ /* allocate memory for data buffer */ - data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int)); + data_array1 = (int *)malloc(dims[0] * dims[1] * sizeof(int)); VRFY_G((data_array1 != NULL), "data_array1 malloc succeeded"); /* allocate memory for data buffer */ - data_origin1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int)); + data_origin1 = (int *)malloc(dims[0] * dims[1] * sizeof(int)); VRFY_G((data_origin1 != NULL), "data_origin1 malloc succeeded"); acc_plist = create_faccess_plist(comm, info, facc_type); @@ -1847,11 +1847,11 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap /* 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); } int diff --git a/testpar/API/t_coll_chunk.c b/testpar/API/t_coll_chunk.c index eba08f4..e68bc68 100644 --- a/testpar/API/t_coll_chunk.c +++ b/testpar/API/t_coll_chunk.c @@ -789,7 +789,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap dims[1] = SPACE_DIM2; /* allocate memory for data buffer */ - data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int)); + data_array1 = (int *)malloc(dims[0] * dims[1] * sizeof(int)); VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* set up dimensions of the slab this process accesses */ @@ -797,7 +797,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap /* set up the coords array selection */ num_points = block[0] * block[1] * count[0] * count[1]; - coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t)); VRFY((coords != NULL), "coords malloc succeeded"); point_set(start, count, stride, block, num_points, coords, mode); @@ -1054,16 +1054,16 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap VRFY((status >= 0), ""); if (data_array1) - HDfree(data_array1); + free(data_array1); /* Use collective read to verify the correctness of collective write. */ /* allocate memory for data buffer */ - data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int)); + data_array1 = (int *)malloc(dims[0] * dims[1] * sizeof(int)); VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* allocate memory for data buffer */ - data_origin1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int)); + data_origin1 = (int *)malloc(dims[0] * dims[1] * sizeof(int)); VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded"); acc_plist = create_faccess_plist(comm, info, facc_type); @@ -1182,11 +1182,11 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap /* 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); } /* Set up the selection */ diff --git a/testpar/API/t_coll_md_read.c b/testpar/API/t_coll_md_read.c index f6f99bf..805e2b7 100644 --- a/testpar/API/t_coll_md_read.c +++ b/testpar/API/t_coll_md_read.c @@ -113,7 +113,7 @@ test_partial_no_selection_coll_md_read(void) file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id); VRFY((file_id >= 0), "H5Fcreate succeeded"); - dataset_dims = HDmalloc(PARTIAL_NO_SELECTION_DATASET_NDIMS * sizeof(*dataset_dims)); + dataset_dims = malloc(PARTIAL_NO_SELECTION_DATASET_NDIMS * sizeof(*dataset_dims)); VRFY((dataset_dims != NULL), "malloc succeeded"); dataset_dims[0] = (hsize_t)PARTIAL_NO_SELECTION_Y_DIM_SCALE * (hsize_t)mpi_size; @@ -159,8 +159,8 @@ test_partial_no_selection_coll_md_read(void) mspace_id = H5Screate_simple(1, sel_dims, NULL); VRFY((mspace_id >= 0), "H5Screate_simple succeeded"); - data = HDcalloc(1, count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) * - sizeof(int)); + data = calloc(1, count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) * + sizeof(int)); VRFY((data != NULL), "calloc succeeded"); dxpl_id = H5Pcreate(H5P_DATASET_XFER); @@ -183,8 +183,8 @@ test_partial_no_selection_coll_md_read(void) VRFY((H5Pset_dxpl_mpio_chunk_opt(dxpl_id, H5FD_MPIO_CHUNK_ONE_IO) >= 0), "H5Pset_dxpl_mpio_chunk_opt succeeded"); - read_buf = HDmalloc(count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) * - sizeof(int)); + read_buf = malloc(count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) * + sizeof(int)); VRFY((read_buf != NULL), "malloc succeeded"); /* @@ -212,17 +212,17 @@ test_partial_no_selection_coll_md_read(void) } if (dataset_dims) { - HDfree(dataset_dims); + free(dataset_dims); dataset_dims = NULL; } if (data) { - HDfree(data); + free(data); data = NULL; } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } @@ -346,13 +346,13 @@ test_multi_chunk_io_addrmap_issue(void) VRFY((H5Fflush(file_id, H5F_SCOPE_GLOBAL) >= 0), "H5Fflush succeeded"); - read_buf = HDmalloc(50 * sizeof(int)); + read_buf = malloc(50 * sizeof(int)); VRFY((read_buf != NULL), "malloc succeeded"); VRFY((H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "H5Dread succeeded"); if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } @@ -509,7 +509,7 @@ test_link_chunk_io_sort_chunk_issue(void) mspace_id = H5Screate_simple(1, sel_dims, NULL); VRFY((mspace_id >= 0), "H5Screate_simple succeeded"); - data = HDcalloc(1, count[0] * sizeof(int)); + data = calloc(1, count[0] * sizeof(int)); VRFY((data != NULL), "calloc succeeded"); dxpl_id = H5Pcreate(H5P_DATASET_XFER); @@ -532,7 +532,7 @@ test_link_chunk_io_sort_chunk_issue(void) VRFY((H5Pset_dxpl_mpio_chunk_opt(dxpl_id, H5FD_MPIO_CHUNK_ONE_IO) >= 0), "H5Pset_dxpl_mpio_chunk_opt succeeded"); - read_buf = HDmalloc(count[0] * sizeof(int)); + read_buf = malloc(count[0] * sizeof(int)); VRFY((read_buf != NULL), "malloc succeeded"); VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -552,12 +552,12 @@ test_link_chunk_io_sort_chunk_issue(void) "H5Dread succeeded"); if (data) { - HDfree(data); + free(data); data = NULL; } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } diff --git a/testpar/API/t_dset.c b/testpar/API/t_dset.c index 3b7443e..14a5b6e 100644 --- a/testpar/API/t_dset.c +++ b/testpar/API/t_dset.c @@ -316,8 +316,8 @@ dataset_writeInd(void) } /* 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"); /* ---------------------------------------- * CREATE AN HDF5 FILE WITH PARALLEL ACCESS @@ -419,7 +419,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 */ @@ -467,10 +467,10 @@ dataset_readInd(void) } /* 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); @@ -540,9 +540,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); } /* @@ -611,12 +611,12 @@ dataset_writeAll(void) /* set up the coords array selection */ num_points = (size_t)dim1; - coords = (hsize_t *)HDmalloc((size_t)dim1 * (size_t)RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc((size_t)dim1 * (size_t)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 @@ -927,7 +927,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; @@ -1076,9 +1076,9 @@ dataset_writeAll(void) /* release data buffers */ if (coords) - HDfree(coords); + free(coords); if (data_array1) - HDfree(data_array1); + free(data_array1); } /* @@ -1140,14 +1140,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 * RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc((size_t)dim0 * (size_t)dim1 * 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 @@ -1323,9 +1323,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; @@ -1384,7 +1384,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*/ @@ -1430,7 +1430,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*/ @@ -1498,11 +1498,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); } /* @@ -1570,8 +1570,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 @@ -1742,7 +1742,7 @@ extend_writeInd(void) /* release data buffers */ if (data_array1) - HDfree(data_array1); + free(data_array1); } /* @@ -1969,12 +1969,12 @@ extend_readInd(void) } /* 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 @@ -2094,11 +2094,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); } /* @@ -2167,8 +2167,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 @@ -2362,7 +2362,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 */ @@ -2413,12 +2413,12 @@ extend_readAll(void) } /* 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 @@ -2560,11 +2560,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); } #ifdef H5_HAVE_FILTER_DEFLATE @@ -2614,10 +2614,10 @@ compress_readAll(void) } /* 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++) @@ -2750,9 +2750,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 */ @@ -2874,11 +2874,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; @@ -2973,9 +2973,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 @@ -3333,8 +3333,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; @@ -3484,7 +3484,7 @@ test_actual_io_mode(int selection_mode) VRFY((ret >= 0), "H5Sclose succeeded"); ret = H5Fclose(fid); VRFY((ret >= 0), "H5Fclose succeeded"); - HDfree(buffer); + free(buffer); return; } @@ -3768,8 +3768,8 @@ test_no_collective_cause_mode(int selection_mode) length = (int)(dims[0] * dims[1]); /* 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; @@ -3861,7 +3861,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) @@ -3971,11 +3971,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); @@ -4123,20 +4123,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; @@ -4249,9 +4249,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"); diff --git a/testpar/API/t_file.c b/testpar/API/t_file.c index f296c8a..3c1247f 100644 --- a/testpar/API/t_file.c +++ b/testpar/API/t_file.c @@ -192,7 +192,7 @@ test_page_buffer_access(void) ret = H5Pset_file_space_page_size(fcpl, sizeof(int) * 100); VRFY((ret == 0), ""); - data = (int *)HDmalloc(sizeof(int) * (size_t)num_elements); + data = (int *)malloc(sizeof(int) * (size_t)num_elements); /* initialize all the elements to have a value of -1 */ for (i = 0; i < num_elements; i++) @@ -441,7 +441,7 @@ test_page_buffer_access(void) api_ctx_pushed = FALSE; } - HDfree(data); + free(data); data = NULL; MPI_Barrier(MPI_COMM_WORLD); } @@ -515,8 +515,8 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str num_elements = block[0] * block[1]; /* allocate memory for data buffer */ - data_array = (DATATYPE *)HDmalloc(num_elements * sizeof(DATATYPE)); - VRFY((data_array != NULL), "data_array HDmalloc succeeded"); + data_array = (DATATYPE *)malloc(num_elements * sizeof(DATATYPE)); + VRFY((data_array != NULL), "data_array malloc succeeded"); /* put some trivial data in the data_array */ for (i = 0; i < num_elements; i++) data_array[i] = mpi_rank + 1; @@ -598,7 +598,7 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str } MPI_Barrier(MPI_COMM_WORLD); - HDfree(data_array); + free(data_array); return 0; } /* create_file */ @@ -674,8 +674,8 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t num_elements = block[0] * block[1]; /* allocate memory for data buffer */ - data_array = (DATATYPE *)HDmalloc(num_elements * sizeof(DATATYPE)); - VRFY((data_array != NULL), "data_array HDmalloc succeeded"); + data_array = (DATATYPE *)malloc(num_elements * sizeof(DATATYPE)); + VRFY((data_array != NULL), "data_array malloc succeeded"); /* create a memory dataspace independently */ mem_dataspace = H5Screate_simple(1, &num_elements, NULL); @@ -761,7 +761,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t api_ctx_pushed = FALSE; } - HDfree(data_array); + free(data_array); return nerrors; } diff --git a/testpar/API/t_file_image.c b/testpar/API/t_file_image.c index 8edf0654..16cd521 100644 --- a/testpar/API/t_file_image.c +++ b/testpar/API/t_file_image.c @@ -127,7 +127,7 @@ file_image_daisy_chain_test(void) * to -1 everywhere else. */ - vector_ptr = (int *)HDmalloc((size_t)(mpi_size) * sizeof(int)); + vector_ptr = (int *)malloc((size_t)(mpi_size) * sizeof(int)); VRFY((vector_ptr != NULL), "allocated in memory representation of vector"); vector_ptr[0] = 0; @@ -137,7 +137,7 @@ file_image_daisy_chain_test(void) err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr); VRFY((err >= 0), "wrote initial data to vector."); - HDfree(vector_ptr); + free(vector_ptr); vector_ptr = NULL; /* 3) Flush the core file, and get an image of it. Close @@ -149,7 +149,7 @@ file_image_daisy_chain_test(void) image_len = H5Fget_file_image(file_id, NULL, (size_t)0); VRFY((image_len > 0), "got image file size"); - image_ptr = (void *)HDmalloc((size_t)image_len); + image_ptr = (void *)malloc((size_t)image_len); VRFY(image_ptr != NULL, "allocated file image buffer."); bytes_read = H5Fget_file_image(file_id, image_ptr, (size_t)image_len); @@ -175,7 +175,7 @@ file_image_daisy_chain_test(void) mpi_result = MPI_Ssend((void *)image_ptr, (int)image_len, MPI_BYTE, 1, 0, MPI_COMM_WORLD); VRFY((mpi_result == MPI_SUCCESS), "sent image to process 1"); - HDfree(image_ptr); + free(image_ptr); image_ptr = NULL; image_len = 0; @@ -185,7 +185,7 @@ file_image_daisy_chain_test(void) MPI_COMM_WORLD, &rcvstat); VRFY((mpi_result == MPI_SUCCESS), "received image len from process n-1"); - image_ptr = (void *)HDmalloc((size_t)image_len); + image_ptr = (void *)malloc((size_t)image_len); VRFY(image_ptr != NULL, "allocated file image receive buffer."); mpi_result = @@ -227,7 +227,7 @@ file_image_daisy_chain_test(void) VRFY((space_ndims == 1), "verified data space num dims(2)"); VRFY((dims[0] == (hsize_t)mpi_size), "verified data space dims"); - vector_ptr = (int *)HDmalloc((size_t)(mpi_size) * sizeof(int)); + vector_ptr = (int *)malloc((size_t)(mpi_size) * sizeof(int)); VRFY((vector_ptr != NULL), "allocated in memory rep of vector"); err = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr); @@ -239,7 +239,7 @@ file_image_daisy_chain_test(void) vector_ok = FALSE; VRFY((vector_ok), "verified received vector."); - HDfree(vector_ptr); + free(vector_ptr); vector_ptr = NULL; /* 7) closes the core file and exit. */ @@ -256,7 +256,7 @@ file_image_daisy_chain_test(void) err = H5Pclose(fapl_id); VRFY((err >= 0), "closed fapl(1)."); - HDfree(image_ptr); + free(image_ptr); image_ptr = NULL; image_len = 0; } @@ -267,7 +267,7 @@ file_image_daisy_chain_test(void) MPI_COMM_WORLD, &rcvstat); VRFY((mpi_result == MPI_SUCCESS), "received image size from process mpi_rank-1"); - image_ptr = (void *)HDmalloc((size_t)image_len); + image_ptr = (void *)malloc((size_t)image_len); VRFY(image_ptr != NULL, "allocated file image receive buffer."); mpi_result = @@ -310,7 +310,7 @@ file_image_daisy_chain_test(void) VRFY((space_ndims == 1), "verified data space num dims(2)"); VRFY((dims[0] == (hsize_t)mpi_size), "verified data space dims"); - vector_ptr = (int *)HDmalloc((size_t)(mpi_size) * sizeof(int)); + vector_ptr = (int *)malloc((size_t)(mpi_size) * sizeof(int)); VRFY((vector_ptr != NULL), "allocated in memory rep of vector"); err = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr); @@ -336,7 +336,7 @@ file_image_daisy_chain_test(void) err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr); VRFY((err >= 0), "wrote modified data to vector."); - HDfree(vector_ptr); + free(vector_ptr); vector_ptr = NULL; /* 4) Flush the core file and send it to process (mpi_rank + 1) % n. */ @@ -347,7 +347,7 @@ file_image_daisy_chain_test(void) image_len = H5Fget_file_image(file_id, NULL, (size_t)0); VRFY((image_len > 0), "got (possibly modified) image file len"); - image_ptr = (void *)HDrealloc((void *)image_ptr, (size_t)image_len); + image_ptr = (void *)realloc((void *)image_ptr, (size_t)image_len); VRFY(image_ptr != NULL, "re-allocated file image buffer."); bytes_read = H5Fget_file_image(file_id, image_ptr, (size_t)image_len); @@ -361,7 +361,7 @@ file_image_daisy_chain_test(void) MPI_COMM_WORLD); VRFY((mpi_result == MPI_SUCCESS), "sent image to process (mpi_rank + 1) % mpi_size"); - HDfree(image_ptr); + free(image_ptr); image_ptr = NULL; image_len = 0; diff --git a/testpar/API/t_filter_read.c b/testpar/API/t_filter_read.c index 0ea7040..4b62e55 100644 --- a/testpar/API/t_filter_read.c +++ b/testpar/API/t_filter_read.c @@ -129,11 +129,11 @@ filter_read_internal(const char *filename, hid_t dcpl, hsize_t *dset_size) VRFY(sid >= 0, "H5Screate_simple"); /* Create buffers */ - points = (int *)HDmalloc(size[0] * size[1] * sizeof(int)); - VRFY(points != NULL, "HDmalloc"); + points = (int *)malloc(size[0] * size[1] * sizeof(int)); + VRFY(points != NULL, "malloc"); - check = (int *)HDmalloc(hs_size[0] * hs_size[1] * sizeof(int)); - VRFY(check != NULL, "HDmalloc"); + check = (int *)malloc(hs_size[0] * hs_size[1] * sizeof(int)); + VRFY(check != NULL, "malloc"); /* Initialize writing buffer with random data */ for (i = 0; i < size[0]; i++) @@ -227,8 +227,8 @@ filter_read_internal(const char *filename, hid_t dcpl, hsize_t *dset_size) hrc = H5Fclose(file); VRFY(hrc >= 0, "H5Fclose"); - HDfree(points); - HDfree(check); + free(points); + free(check); MPI_Barrier(MPI_COMM_WORLD); } diff --git a/testpar/API/t_mdset.c b/testpar/API/t_mdset.c index ccca9d2..e0e1c07 100644 --- a/testpar/API/t_mdset.c +++ b/testpar/API/t_mdset.c @@ -185,8 +185,8 @@ multiple_dset_write(void) return; } - outme = HDmalloc((size_t)size * (size_t)size * sizeof(double)); - VRFY((outme != NULL), "HDmalloc succeeded for outme"); + outme = malloc((size_t)size * (size_t)size * sizeof(double)); + VRFY((outme != NULL), "malloc succeeded for outme"); plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); VRFY((plist >= 0), "create_faccess_plist succeeded"); @@ -236,7 +236,7 @@ multiple_dset_write(void) H5Pclose(dcpl); H5Fclose(iof); - HDfree(outme); + free(outme); } /* Example of using PHDF5 to create, write, and read compact dataset. @@ -275,11 +275,11 @@ compact_dataset(void) return; } - outme = HDmalloc((size_t)((size_t)size * (size_t)size * sizeof(double))); - VRFY((outme != NULL), "HDmalloc succeeded for outme"); + outme = malloc((size_t)((size_t)size * (size_t)size * sizeof(double))); + VRFY((outme != NULL), "malloc succeeded for outme"); - inme = HDmalloc((size_t)size * (size_t)size * sizeof(double)); - VRFY((outme != NULL), "HDmalloc succeeded for inme"); + inme = malloc((size_t)size * (size_t)size * sizeof(double)); + VRFY((outme != NULL), "malloc succeeded for inme"); filename = PARATESTFILE /* GetTestParameters() */; VRFY((mpi_size <= size), "mpi_size <= size"); @@ -373,8 +373,8 @@ compact_dataset(void) H5Pclose(dxpl); H5Dclose(dataset); H5Fclose(iof); - HDfree(inme); - HDfree(outme); + free(inme); + free(outme); } /* @@ -683,10 +683,10 @@ dataset_fillvalue(void) dset_size = dset_dims[0] * dset_dims[1] * dset_dims[2] * dset_dims[3]; /* Allocate space for the buffers */ - rdata = HDmalloc((size_t)(dset_size * sizeof(int))); - VRFY((rdata != NULL), "HDcalloc succeeded for read buffer"); - wdata = HDmalloc((size_t)(dset_size * sizeof(int))); - VRFY((wdata != NULL), "HDmalloc succeeded for write buffer"); + rdata = malloc((size_t)(dset_size * sizeof(int))); + VRFY((rdata != NULL), "calloc succeeded for read buffer"); + wdata = malloc((size_t)(dset_size * sizeof(int))); + VRFY((wdata != NULL), "malloc succeeded for write buffer"); fapl = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); VRFY((fapl >= 0), "create_faccess_plist succeeded"); @@ -885,8 +885,8 @@ dataset_fillvalue(void) VRFY((ret >= 0), "H5Pclose succeeded"); /* free the buffers */ - HDfree(rdata); - HDfree(wdata); + free(rdata); + free(wdata); } /* combined cngrpw and ingrpr tests because ingrpr reads file created by cngrpw. */ @@ -945,8 +945,8 @@ collective_group_write(void) chunk_size[0] = (hsize_t)(size / 2); chunk_size[1] = (hsize_t)(size / 2); - outme = HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); - VRFY((outme != NULL), "HDmalloc succeeded for outme"); + outme = malloc((size_t)size * (size_t)size * sizeof(DATATYPE)); + VRFY((outme != NULL), "malloc succeeded for outme"); plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, plist); @@ -1011,7 +1011,7 @@ collective_group_write(void) ret1 = H5Fclose(fid); VRFY((ret1 == 0), "H5Fclose"); - HDfree(outme); + free(outme); } /* Let two sets of processes open and read different groups and chunked @@ -1086,11 +1086,11 @@ group_dataset_read(hid_t fid, int mpi_rank, int m) size = get_size(); - indata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); - VRFY((indata != NULL), "HDmalloc succeeded for indata"); + indata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE)); + VRFY((indata != NULL), "malloc succeeded for indata"); - outdata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); - VRFY((outdata != NULL), "HDmalloc succeeded for outdata"); + outdata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE)); + VRFY((outdata != NULL), "malloc succeeded for outdata"); /* open every group under root group. */ HDsnprintf(gname, sizeof(gname), "group%d", m); @@ -1118,8 +1118,8 @@ group_dataset_read(hid_t fid, int mpi_rank, int m) ret = H5Gclose(gid); VRFY((ret == 0), "H5Gclose"); - HDfree(indata); - HDfree(outdata); + free(indata); + free(outdata); } /* @@ -1263,8 +1263,8 @@ write_dataset(hid_t memspace, hid_t filespace, hid_t gid) size = get_size(); - outme = HDmalloc((size_t)size * (size_t)size * sizeof(double)); - VRFY((outme != NULL), "HDmalloc succeeded for outme"); + outme = malloc((size_t)size * (size_t)size * sizeof(double)); + VRFY((outme != NULL), "malloc succeeded for outme"); for (n = 0; n < NDATASET; n++) { HDsnprintf(dname, sizeof(dname), "dataset%d", n); @@ -1282,7 +1282,7 @@ write_dataset(hid_t memspace, hid_t filespace, hid_t gid) H5Dclose(did); } - HDfree(outme); + free(outme); } /* @@ -1426,11 +1426,11 @@ read_dataset(hid_t memspace, hid_t filespace, hid_t gid) size = get_size(); - indata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); - VRFY((indata != NULL), "HDmalloc succeeded for indata"); + indata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE)); + VRFY((indata != NULL), "malloc succeeded for indata"); - outdata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); - VRFY((outdata != NULL), "HDmalloc succeeded for outdata"); + outdata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE)); + VRFY((outdata != NULL), "malloc succeeded for outdata"); for (n = 0; n < NDATASET; n++) { HDsnprintf(dname, sizeof(dname), "dataset%d", n); @@ -1457,8 +1457,8 @@ read_dataset(hid_t memspace, hid_t filespace, hid_t gid) H5Dclose(did); } - HDfree(indata); - HDfree(outdata); + free(indata); + free(outdata); return vrfy_errors; } diff --git a/testpar/API/t_prop.c b/testpar/API/t_prop.c index 3065404..9c91906 100644 --- a/testpar/API/t_prop.c +++ b/testpar/API/t_prop.c @@ -39,7 +39,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc) ret = H5Pencode2(orig_pl, NULL, &buf_size, H5P_DEFAULT); VRFY((ret >= 0), "H5Pencode succeeded"); - sbuf = (uint8_t *)HDmalloc(buf_size); + sbuf = (uint8_t *)malloc(buf_size); ret = H5Pencode2(orig_pl, sbuf, &buf_size, H5P_DEFAULT); VRFY((ret >= 0), "H5Pencode succeeded"); @@ -58,7 +58,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc) MPI_Recv(&recv_size, 1, MPI_INT, 0, 123, MPI_COMM_WORLD, &status); VRFY((recv_size >= 0), "MPI_Recv succeeded"); buf_size = (size_t)recv_size; - rbuf = (uint8_t *)HDmalloc(buf_size); + rbuf = (uint8_t *)malloc(buf_size); MPI_Recv(rbuf, recv_size, MPI_BYTE, 0, 124, MPI_COMM_WORLD, &status); pl = H5Pdecode(rbuf); @@ -70,7 +70,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc) VRFY((ret >= 0), "H5Pclose succeeded"); if (NULL != rbuf) - HDfree(rbuf); + free(rbuf); } /* end if */ if (0 == mpi_rank) { @@ -85,7 +85,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc) } if (NULL != sbuf) - HDfree(sbuf); + free(sbuf); MPI_Barrier(MPI_COMM_WORLD); return 0; diff --git a/testpar/API/t_pshutdown.c b/testpar/API/t_pshutdown.c index 269e6dd..e1f9189 100644 --- a/testpar/API/t_pshutdown.c +++ b/testpar/API/t_pshutdown.c @@ -99,8 +99,8 @@ main(int argc, char **argv) VRFY((dset_id >= 0), "H5Dcreate succeeded"); /* allocate memory for data buffer */ - data_array = (DATATYPE *)HDmalloc(dims[0] * dims[1] * sizeof(DATATYPE)); - VRFY((data_array != NULL), "data_array HDmalloc succeeded"); + data_array = (DATATYPE *)malloc(dims[0] * dims[1] * sizeof(DATATYPE)); + VRFY((data_array != NULL), "data_array malloc succeeded"); /* Each process takes a slabs of rows. */ block[0] = dims[0] / (hsize_t)mpi_size; @@ -129,7 +129,7 @@ main(int argc, char **argv) /* release data buffers */ if (data_array) - HDfree(data_array); + free(data_array); MPI_Finalize(); diff --git a/testpar/API/t_shapesame.c b/testpar/API/t_shapesame.c index cb323e0..40e2aae 100644 --- a/testpar/API/t_shapesame.c +++ b/testpar/API/t_shapesame.c @@ -209,28 +209,28 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker tv_ptr->block_ptr = &(tv_ptr->block[PAR_SS_DR_MAX_RANK - tv_ptr->large_rank]); /* Allocate buffers */ - tv_ptr->small_ds_buf_0 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_size); + tv_ptr->small_ds_buf_0 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_size); VRFY((tv_ptr->small_ds_buf_0 != NULL), "malloc of small_ds_buf_0 succeeded"); - tv_ptr->small_ds_buf_1 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_size); + tv_ptr->small_ds_buf_1 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_size); VRFY((tv_ptr->small_ds_buf_1 != NULL), "malloc of small_ds_buf_1 succeeded"); - tv_ptr->small_ds_buf_2 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_size); + tv_ptr->small_ds_buf_2 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_size); VRFY((tv_ptr->small_ds_buf_2 != NULL), "malloc of small_ds_buf_2 succeeded"); - tv_ptr->small_ds_slice_buf = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_slice_size); + tv_ptr->small_ds_slice_buf = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_slice_size); VRFY((tv_ptr->small_ds_slice_buf != NULL), "malloc of small_ds_slice_buf succeeded"); - tv_ptr->large_ds_buf_0 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_size); + tv_ptr->large_ds_buf_0 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_size); VRFY((tv_ptr->large_ds_buf_0 != NULL), "malloc of large_ds_buf_0 succeeded"); - tv_ptr->large_ds_buf_1 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_size); + tv_ptr->large_ds_buf_1 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_size); VRFY((tv_ptr->large_ds_buf_1 != NULL), "malloc of large_ds_buf_1 succeeded"); - tv_ptr->large_ds_buf_2 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_size); + tv_ptr->large_ds_buf_2 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_size); VRFY((tv_ptr->large_ds_buf_2 != NULL), "malloc of large_ds_buf_2 succeeded"); - tv_ptr->large_ds_slice_buf = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_slice_size); + tv_ptr->large_ds_slice_buf = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_slice_size); VRFY((tv_ptr->large_ds_slice_buf != NULL), "malloc of large_ds_slice_buf succeeded"); /* initialize the buffers */ @@ -657,22 +657,22 @@ hs_dr_pio_test__takedown(struct hs_dr_pio_test_vars_t *tv_ptr) /* Free memory buffers */ if (tv_ptr->small_ds_buf_0 != NULL) - HDfree(tv_ptr->small_ds_buf_0); + free(tv_ptr->small_ds_buf_0); if (tv_ptr->small_ds_buf_1 != NULL) - HDfree(tv_ptr->small_ds_buf_1); + free(tv_ptr->small_ds_buf_1); if (tv_ptr->small_ds_buf_2 != NULL) - HDfree(tv_ptr->small_ds_buf_2); + free(tv_ptr->small_ds_buf_2); if (tv_ptr->small_ds_slice_buf != NULL) - HDfree(tv_ptr->small_ds_slice_buf); + free(tv_ptr->small_ds_slice_buf); if (tv_ptr->large_ds_buf_0 != NULL) - HDfree(tv_ptr->large_ds_buf_0); + free(tv_ptr->large_ds_buf_0); if (tv_ptr->large_ds_buf_1 != NULL) - HDfree(tv_ptr->large_ds_buf_1); + free(tv_ptr->large_ds_buf_1); if (tv_ptr->large_ds_buf_2 != NULL) - HDfree(tv_ptr->large_ds_buf_2); + free(tv_ptr->large_ds_buf_2); if (tv_ptr->large_ds_slice_buf != NULL) - HDfree(tv_ptr->large_ds_slice_buf); + free(tv_ptr->large_ds_slice_buf); return; @@ -4364,7 +4364,7 @@ main(int argc, char **argv) #if 0 HDmemset(filenames, 0, sizeof(filenames)); for (int i = 0; i < NFILENAME; i++) { - if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) { + if (NULL == (filenames[i] = malloc(PATH_MAX))) { printf("couldn't allocate filename array\n"); MPI_Abort(MPI_COMM_WORLD, -1); } @@ -4495,7 +4495,7 @@ main(int argc, char **argv) #if 0 for (int i = 0; i < NFILENAME; i++) { - HDfree(filenames[i]); + free(filenames[i]); filenames[i] = NULL; } #endif diff --git a/testpar/API/t_span_tree.c b/testpar/API/t_span_tree.c index d806e12..f8a7edb 100644 --- a/testpar/API/t_span_tree.c +++ b/testpar/API/t_span_tree.c @@ -337,9 +337,9 @@ coll_write_test(int chunk_factor) fsdim[0] = FSPACE_DIM1; fsdim[1] = (hsize_t)(FSPACE_DIM2 * mpi_size); - vector = (int *)HDmalloc(sizeof(int) * (size_t)mdim1[0] * (size_t)mpi_size); - matrix_out = (int *)HDmalloc(sizeof(int) * (size_t)mdim[0] * (size_t)mdim[1] * (size_t)mpi_size); - matrix_out1 = (int *)HDmalloc(sizeof(int) * (size_t)mdim[0] * (size_t)mdim[1] * (size_t)mpi_size); + vector = (int *)malloc(sizeof(int) * (size_t)mdim1[0] * (size_t)mpi_size); + matrix_out = (int *)malloc(sizeof(int) * (size_t)mdim[0] * (size_t)mdim[1] * (size_t)mpi_size); + matrix_out1 = (int *)malloc(sizeof(int) * (size_t)mdim[0] * (size_t)mdim[1] * (size_t)mpi_size); HDmemset(vector, 0, sizeof(int) * (size_t)mdim1[0] * (size_t)mpi_size); vector[0] = vector[MSPACE1_DIM * mpi_size - 1] = -1; @@ -718,11 +718,11 @@ coll_write_test(int chunk_factor) VRFY((ret >= 0), ""); if (vector) - HDfree(vector); + free(vector); if (matrix_out) - HDfree(matrix_out); + free(matrix_out); if (matrix_out1) - HDfree(matrix_out1); + free(matrix_out1); return; } @@ -784,8 +784,8 @@ coll_read_test(void) mdim[0] = MSPACE_DIM1; mdim[1] = (hsize_t)(MSPACE_DIM2 * mpi_size); - matrix_out = (int *)HDmalloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); - matrix_out1 = (int *)HDmalloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); + matrix_out = (int *)malloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); + matrix_out1 = (int *)malloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); /*** For testing collective hyperslab selection read ***/ @@ -945,8 +945,8 @@ coll_read_test(void) /* * Free read buffers. */ - HDfree(matrix_out); - HDfree(matrix_out1); + free(matrix_out); + free(matrix_out1); /* * Close memory file and memory dataspaces. @@ -1625,16 +1625,16 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ /* Allocate buffers */ - small_ds_buf_0 = (uint32_t *)HDmalloc(sizeof(uint32_t) * small_ds_size); + small_ds_buf_0 = (uint32_t *)malloc(sizeof(uint32_t) * small_ds_size); VRFY((small_ds_buf_0 != NULL), "malloc of small_ds_buf_0 succeeded"); - small_ds_buf_1 = (uint32_t *)HDmalloc(sizeof(uint32_t) * small_ds_size); + small_ds_buf_1 = (uint32_t *)malloc(sizeof(uint32_t) * small_ds_size); VRFY((small_ds_buf_1 != NULL), "malloc of small_ds_buf_1 succeeded"); - large_ds_buf_0 = (uint32_t *)HDmalloc(sizeof(uint32_t) * large_ds_size); + large_ds_buf_0 = (uint32_t *)malloc(sizeof(uint32_t) * large_ds_size); VRFY((large_ds_buf_0 != NULL), "malloc of large_ds_buf_0 succeeded"); - large_ds_buf_1 = (uint32_t *)HDmalloc(sizeof(uint32_t) * large_ds_size); + large_ds_buf_1 = (uint32_t *)malloc(sizeof(uint32_t) * large_ds_size); VRFY((large_ds_buf_1 != NULL), "malloc of large_ds_buf_1 succeeded"); /* initialize the buffers */ @@ -2352,14 +2352,14 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ /* Free memory buffers */ if (small_ds_buf_0 != NULL) - HDfree(small_ds_buf_0); + free(small_ds_buf_0); if (small_ds_buf_1 != NULL) - HDfree(small_ds_buf_1); + free(small_ds_buf_1); if (large_ds_buf_0 != NULL) - HDfree(large_ds_buf_0); + free(large_ds_buf_0); if (large_ds_buf_1 != NULL) - HDfree(large_ds_buf_1); + free(large_ds_buf_1); return; diff --git a/testpar/API/testphdf5.c b/testpar/API/testphdf5.c index 6d34e1d..b02d0a3 100644 --- a/testpar/API/testphdf5.c +++ b/testpar/API/testphdf5.c @@ -353,7 +353,7 @@ main(int argc, char **argv) #if 0 HDmemset(filenames, 0, sizeof(filenames)); for (int i = 0; i < NFILENAME; i++) { - if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) { + if (NULL == (filenames[i] = malloc(PATH_MAX))) { printf("couldn't allocate filename array\n"); MPI_Abort(MPI_COMM_WORLD, -1); } @@ -987,7 +987,7 @@ main(int argc, char **argv) #if 0 for (int i = 0; i < NFILENAME; i++) { - HDfree(filenames[i]); + free(filenames[i]); filenames[i] = NULL; } #endif diff --git a/testpar/t_2Gio.c b/testpar/t_2Gio.c index d3422e0..c9faa09 100644 --- a/testpar/t_2Gio.c +++ b/testpar/t_2Gio.c @@ -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; @@ -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 @@ -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 */ @@ -876,10 +876,10 @@ dataset_readInd(void) 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); } /* @@ -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 @@ -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); } /* @@ -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 @@ -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); } /* @@ -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 @@ -2116,7 +2116,7 @@ extend_writeInd(void) /* release data buffers */ if (data_array1) - HDfree(data_array1); + free(data_array1); } /* @@ -2317,12 +2317,12 @@ extend_readInd(void) 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); } /* @@ -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 @@ -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 */ @@ -2737,12 +2737,12 @@ extend_readAll(void) 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); } /* @@ -2928,10 +2928,10 @@ compress_readAll(void) 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++) @@ -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 */ @@ -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 @@ -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; @@ -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; } @@ -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; @@ -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) @@ -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); @@ -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; @@ -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"); @@ -4659,7 +4659,7 @@ main(int argc, char **argv) HDmemset(filenames, 0, sizeof(filenames)); for (int i = 0; i < NFILENAME; i++) { - if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) { + if (NULL == (filenames[i] = malloc(PATH_MAX))) { printf("couldn't allocate filename array\n"); MPI_Abort(MPI_COMM_WORLD, -1); } @@ -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; } diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c index 1130e5d..6c1161d 100644 --- a/testpar/t_bigio.c +++ b/testpar/t_bigio.c @@ -474,7 +474,7 @@ dataset_big_write(void) B_DATATYPE *wdata; /* allocate memory for data buffer */ - wdata = (B_DATATYPE *)HDmalloc(bigcount * sizeof(B_DATATYPE)); + wdata = (B_DATATYPE *)malloc(bigcount * sizeof(B_DATATYPE)); VRFY_G((wdata != NULL), "wdata malloc succeeded"); /* setup file access template */ @@ -697,7 +697,7 @@ dataset_big_write(void) num_points = bigcount; - coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t)); VRFY_G((coords != NULL), "coords malloc succeeded"); set_coords(start, count, stride, block, num_points, coords, IN_ORDER); @@ -746,7 +746,7 @@ dataset_big_write(void) ret = H5Dclose(dataset); VRFY_G((ret >= 0), "H5Dclose1 succeeded"); - HDfree(wdata); + free(wdata); H5Fclose(fid); } @@ -779,9 +779,9 @@ dataset_big_read(void) herr_t ret; /* Generic return value */ /* allocate memory for data buffer */ - rdata = (B_DATATYPE *)HDmalloc(bigcount * sizeof(B_DATATYPE)); + rdata = (B_DATATYPE *)malloc(bigcount * sizeof(B_DATATYPE)); VRFY_G((rdata != NULL), "rdata malloc succeeded"); - wdata = (B_DATATYPE *)HDmalloc(bigcount * sizeof(B_DATATYPE)); + wdata = (B_DATATYPE *)malloc(bigcount * sizeof(B_DATATYPE)); VRFY_G((wdata != NULL), "wdata malloc succeeded"); HDmemset(rdata, 0, bigcount * sizeof(B_DATATYPE)); @@ -1017,7 +1017,7 @@ dataset_big_read(void) num_points = bigcount; - coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t)); VRFY_G((coords != NULL), "coords malloc succeeded"); set_coords(start, count, stride, block, num_points, coords, IN_ORDER); @@ -1028,7 +1028,7 @@ dataset_big_read(void) VRFY_G((ret >= 0), "H5Sselect_elements succeeded"); if (coords) - HDfree(coords); + free(coords); /* create a memory dataspace */ /* Warning: H5Screate_simple requires an array of hsize_t elements @@ -1065,8 +1065,8 @@ dataset_big_read(void) ret = H5Dclose(dataset); VRFY_G((ret >= 0), "H5Dclose1 succeeded"); - HDfree(wdata); - HDfree(rdata); + free(wdata); + free(rdata); wdata = NULL; rdata = NULL; @@ -1093,9 +1093,9 @@ dataset_big_read(void) /* release data buffers */ if (rdata) - HDfree(rdata); + free(rdata); if (wdata) - HDfree(wdata); + free(wdata); } /* dataset_large_readAll */ @@ -1443,7 +1443,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap dims[1] = space_dim2; /* allocate memory for data buffer */ - data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int)); + data_array1 = (int *)malloc(dims[0] * dims[1] * sizeof(int)); VRFY_G((data_array1 != NULL), "data_array1 malloc succeeded"); /* set up dimensions of the slab this process accesses */ @@ -1451,7 +1451,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap /* set up the coords array selection */ num_points = block[0] * block[1] * count[0] * count[1]; - coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t)); VRFY_G((coords != NULL), "coords malloc succeeded"); point_set(start, count, stride, block, num_points, coords, mode); @@ -1710,16 +1710,16 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap VRFY_G((status >= 0), ""); if (data_array1) - HDfree(data_array1); + free(data_array1); /* Use collective read to verify the correctness of collective write. */ /* allocate memory for data buffer */ - data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int)); + data_array1 = (int *)malloc(dims[0] * dims[1] * sizeof(int)); VRFY_G((data_array1 != NULL), "data_array1 malloc succeeded"); /* allocate memory for data buffer */ - data_origin1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int)); + data_origin1 = (int *)malloc(dims[0] * dims[1] * sizeof(int)); VRFY_G((data_origin1 != NULL), "data_origin1 malloc succeeded"); acc_plist = create_faccess_plist(comm, info, facc_type); @@ -1842,11 +1842,11 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap /* 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); } int diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 63e086c..1de9b56 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -6853,18 +6853,18 @@ main(int argc, char **argv) goto finish; } - if (NULL == (data = HDmalloc(NUM_DATA_ENTRIES * sizeof(*data)))) { + if (NULL == (data = malloc(NUM_DATA_ENTRIES * sizeof(*data)))) { printf(" Couldn't allocate data array. Exiting.\n"); MPI_Abort(MPI_COMM_WORLD, -1); } - if (NULL == (data_index = HDmalloc(NUM_DATA_ENTRIES * sizeof(*data_index)))) { + if (NULL == (data_index = malloc(NUM_DATA_ENTRIES * sizeof(*data_index)))) { printf(" Couldn't allocate data index array. Exiting.\n"); MPI_Abort(MPI_COMM_WORLD, -1); } HDmemset(filenames, 0, sizeof(filenames)); for (int i = 0; i < NFILENAME; i++) { - if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) { + if (NULL == (filenames[i] = malloc(PATH_MAX))) { printf("couldn't allocate filename array\n"); MPI_Abort(MPI_COMM_WORLD, -1); } @@ -6986,9 +6986,9 @@ main(int argc, char **argv) finish: if (data_index) - HDfree(data_index); + free(data_index); if (data) - HDfree(data); + free(data); /* make sure all processes are finished before final report, cleanup * and exit. diff --git a/testpar/t_coll_chunk.c b/testpar/t_coll_chunk.c index 1a483f4..3a59c6f 100644 --- a/testpar/t_coll_chunk.c +++ b/testpar/t_coll_chunk.c @@ -600,7 +600,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap dims[1] = SPACE_DIM2; /* allocate memory for data buffer */ - data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int)); + data_array1 = (int *)malloc(dims[0] * dims[1] * sizeof(int)); VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* set up dimensions of the slab this process accesses */ @@ -608,7 +608,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap /* set up the coords array selection */ num_points = block[0] * block[1] * count[0] * count[1]; - coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t)); VRFY((coords != NULL), "coords malloc succeeded"); point_set(start, count, stride, block, num_points, coords, mode); @@ -869,16 +869,16 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap VRFY((status >= 0), ""); if (data_array1) - HDfree(data_array1); + free(data_array1); /* Use collective read to verify the correctness of collective write. */ /* allocate memory for data buffer */ - data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int)); + data_array1 = (int *)malloc(dims[0] * dims[1] * sizeof(int)); VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* allocate memory for data buffer */ - data_origin1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int)); + data_origin1 = (int *)malloc(dims[0] * dims[1] * sizeof(int)); VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded"); acc_plist = create_faccess_plist(comm, info, facc_type); @@ -997,11 +997,11 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap /* 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); } /* Set up the selection */ diff --git a/testpar/t_coll_md.c b/testpar/t_coll_md.c index aa72486..2ff6f77 100644 --- a/testpar/t_coll_md.c +++ b/testpar/t_coll_md.c @@ -99,7 +99,7 @@ test_partial_no_selection_coll_md_read(void) file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id); VRFY((file_id >= 0), "H5Fcreate succeeded"); - dataset_dims = HDmalloc(PARTIAL_NO_SELECTION_DATASET_NDIMS * sizeof(*dataset_dims)); + dataset_dims = malloc(PARTIAL_NO_SELECTION_DATASET_NDIMS * sizeof(*dataset_dims)); VRFY((dataset_dims != NULL), "malloc succeeded"); dataset_dims[0] = (hsize_t)PARTIAL_NO_SELECTION_Y_DIM_SCALE * (hsize_t)mpi_size; @@ -145,8 +145,8 @@ test_partial_no_selection_coll_md_read(void) mspace_id = H5Screate_simple(1, sel_dims, NULL); VRFY((mspace_id >= 0), "H5Screate_simple succeeded"); - data = HDcalloc(1, count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) * - sizeof(int)); + data = calloc(1, count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) * + sizeof(int)); VRFY((data != NULL), "calloc succeeded"); dxpl_id = H5Pcreate(H5P_DATASET_XFER); @@ -169,8 +169,8 @@ test_partial_no_selection_coll_md_read(void) VRFY((H5Pset_dxpl_mpio_chunk_opt(dxpl_id, H5FD_MPIO_CHUNK_ONE_IO) >= 0), "H5Pset_dxpl_mpio_chunk_opt succeeded"); - read_buf = HDmalloc(count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) * - sizeof(int)); + read_buf = malloc(count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) * + sizeof(int)); VRFY((read_buf != NULL), "malloc succeeded"); /* @@ -198,17 +198,17 @@ test_partial_no_selection_coll_md_read(void) } if (dataset_dims) { - HDfree(dataset_dims); + free(dataset_dims); dataset_dims = NULL; } if (data) { - HDfree(data); + free(data); data = NULL; } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } @@ -319,13 +319,13 @@ test_multi_chunk_io_addrmap_issue(void) VRFY((H5Fflush(file_id, H5F_SCOPE_GLOBAL) >= 0), "H5Fflush succeeded"); - read_buf = HDmalloc(50 * sizeof(int)); + read_buf = malloc(50 * sizeof(int)); VRFY((read_buf != NULL), "malloc succeeded"); VRFY((H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "H5Dread succeeded"); if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } @@ -469,7 +469,7 @@ test_link_chunk_io_sort_chunk_issue(void) mspace_id = H5Screate_simple(1, sel_dims, NULL); VRFY((mspace_id >= 0), "H5Screate_simple succeeded"); - data = HDcalloc(1, count[0] * sizeof(int)); + data = calloc(1, count[0] * sizeof(int)); VRFY((data != NULL), "calloc succeeded"); dxpl_id = H5Pcreate(H5P_DATASET_XFER); @@ -492,7 +492,7 @@ test_link_chunk_io_sort_chunk_issue(void) VRFY((H5Pset_dxpl_mpio_chunk_opt(dxpl_id, H5FD_MPIO_CHUNK_ONE_IO) >= 0), "H5Pset_dxpl_mpio_chunk_opt succeeded"); - read_buf = HDmalloc(count[0] * sizeof(int)); + read_buf = malloc(count[0] * sizeof(int)); VRFY((read_buf != NULL), "malloc succeeded"); VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -512,12 +512,12 @@ test_link_chunk_io_sort_chunk_issue(void) "H5Dread succeeded"); if (data) { - HDfree(data); + free(data); data = NULL; } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } diff --git a/testpar/t_dset.c b/testpar/t_dset.c index 9ed753e..81edf17 100644 --- a/testpar/t_dset.c +++ b/testpar/t_dset.c @@ -302,8 +302,8 @@ dataset_writeInd(void) MPI_Comm_rank(MPI_COMM_WORLD, &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_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* ---------------------------------------- * CREATE AN HDF5 FILE WITH PARALLEL ACCESS @@ -405,7 +405,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 */ @@ -440,10 +440,10 @@ dataset_readInd(void) MPI_Comm_rank(MPI_COMM_WORLD, &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); @@ -513,9 +513,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); } /* @@ -571,12 +571,12 @@ dataset_writeAll(void) /* set up the coords array selection */ num_points = (size_t)dim1; - coords = (hsize_t *)HDmalloc((size_t)dim1 * (size_t)RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc((size_t)dim1 * (size_t)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 @@ -887,7 +887,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; @@ -1036,9 +1036,9 @@ dataset_writeAll(void) /* release data buffers */ if (coords) - HDfree(coords); + free(coords); if (data_array1) - HDfree(data_array1); + free(data_array1); } /* @@ -1087,14 +1087,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 * RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc((size_t)dim0 * (size_t)dim1 * 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 @@ -1270,9 +1270,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; @@ -1331,7 +1331,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*/ @@ -1377,7 +1377,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*/ @@ -1445,11 +1445,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); } /* @@ -1504,8 +1504,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 @@ -1676,7 +1676,7 @@ extend_writeInd(void) /* release data buffers */ if (data_array1) - HDfree(data_array1); + free(data_array1); } /* @@ -1878,12 +1878,12 @@ extend_readInd(void) MPI_Comm_rank(MPI_COMM_WORLD, &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 @@ -2003,11 +2003,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); } /* @@ -2063,8 +2063,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 @@ -2258,7 +2258,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 */ @@ -2296,12 +2296,12 @@ extend_readAll(void) MPI_Comm_rank(MPI_COMM_WORLD, &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_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); } /* @@ -2486,10 +2486,10 @@ compress_readAll(void) 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++) @@ -2622,9 +2622,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 */ @@ -2735,11 +2735,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; @@ -2834,9 +2834,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 @@ -3183,8 +3183,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; @@ -3334,7 +3334,7 @@ test_actual_io_mode(int selection_mode) VRFY((ret >= 0), "H5Sclose succeeded"); ret = H5Fclose(fid); VRFY((ret >= 0), "H5Fclose succeeded"); - HDfree(buffer); + free(buffer); return; } @@ -3647,8 +3647,8 @@ test_no_collective_cause_mode(int selection_mode) H5_CHECKED_ASSIGN(length, int, dims[0] * dims[1], uint64_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; @@ -3767,7 +3767,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) @@ -3861,11 +3861,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); @@ -4013,20 +4013,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; @@ -4141,9 +4141,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"); diff --git a/testpar/t_file.c b/testpar/t_file.c index 868af65..3c410dc 100644 --- a/testpar/t_file.c +++ b/testpar/t_file.c @@ -178,7 +178,7 @@ test_page_buffer_access(void) ret = H5Pset_file_space_page_size(fcpl, sizeof(int) * 100); VRFY((ret == 0), ""); - data = (int *)HDmalloc(sizeof(int) * (size_t)num_elements); + data = (int *)malloc(sizeof(int) * (size_t)num_elements); /* initialize all the elements to have a value of -1 */ for (i = 0; i < num_elements; i++) @@ -427,7 +427,7 @@ test_page_buffer_access(void) api_ctx_pushed = FALSE; } - HDfree(data); + free(data); data = NULL; MPI_Barrier(MPI_COMM_WORLD); } @@ -500,8 +500,8 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str num_elements = block[0] * block[1]; /* allocate memory for data buffer */ - data_array = (DATATYPE *)HDmalloc(num_elements * sizeof(DATATYPE)); - VRFY((data_array != NULL), "data_array HDmalloc succeeded"); + data_array = (DATATYPE *)malloc(num_elements * sizeof(DATATYPE)); + VRFY((data_array != NULL), "data_array malloc succeeded"); /* put some trivial data in the data_array */ for (i = 0; i < num_elements; i++) data_array[i] = mpi_rank + 1; @@ -583,7 +583,7 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str } MPI_Barrier(MPI_COMM_WORLD); - HDfree(data_array); + free(data_array); return 0; } /* create_file */ @@ -658,8 +658,8 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t num_elements = block[0] * block[1]; /* allocate memory for data buffer */ - data_array = (DATATYPE *)HDmalloc(num_elements * sizeof(DATATYPE)); - VRFY((data_array != NULL), "data_array HDmalloc succeeded"); + data_array = (DATATYPE *)malloc(num_elements * sizeof(DATATYPE)); + VRFY((data_array != NULL), "data_array malloc succeeded"); /* create a memory dataspace independently */ mem_dataspace = H5Screate_simple(1, &num_elements, NULL); @@ -744,7 +744,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t api_ctx_pushed = FALSE; } - HDfree(data_array); + free(data_array); return nerrors; } diff --git a/testpar/t_file_image.c b/testpar/t_file_image.c index 676978c..471494c 100644 --- a/testpar/t_file_image.c +++ b/testpar/t_file_image.c @@ -112,7 +112,7 @@ file_image_daisy_chain_test(void) * to -1 everywhere else. */ - vector_ptr = (int *)HDmalloc((size_t)(mpi_size) * sizeof(int)); + vector_ptr = (int *)malloc((size_t)(mpi_size) * sizeof(int)); VRFY((vector_ptr != NULL), "allocated in memory representation of vector"); vector_ptr[0] = 0; @@ -122,7 +122,7 @@ file_image_daisy_chain_test(void) err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr); VRFY((err >= 0), "wrote initial data to vector."); - HDfree(vector_ptr); + free(vector_ptr); vector_ptr = NULL; /* 3) Flush the core file, and get an image of it. Close @@ -134,7 +134,7 @@ file_image_daisy_chain_test(void) image_len = H5Fget_file_image(file_id, NULL, (size_t)0); VRFY((image_len > 0), "got image file size"); - image_ptr = (void *)HDmalloc((size_t)image_len); + image_ptr = (void *)malloc((size_t)image_len); VRFY(image_ptr != NULL, "allocated file image buffer."); bytes_read = H5Fget_file_image(file_id, image_ptr, (size_t)image_len); @@ -160,7 +160,7 @@ file_image_daisy_chain_test(void) mpi_result = MPI_Ssend((void *)image_ptr, (int)image_len, MPI_BYTE, 1, 0, MPI_COMM_WORLD); VRFY((mpi_result == MPI_SUCCESS), "sent image to process 1"); - HDfree(image_ptr); + free(image_ptr); image_ptr = NULL; image_len = 0; @@ -170,7 +170,7 @@ file_image_daisy_chain_test(void) MPI_COMM_WORLD, &rcvstat); VRFY((mpi_result == MPI_SUCCESS), "received image len from process n-1"); - image_ptr = (void *)HDmalloc((size_t)image_len); + image_ptr = (void *)malloc((size_t)image_len); VRFY(image_ptr != NULL, "allocated file image receive buffer."); mpi_result = @@ -212,7 +212,7 @@ file_image_daisy_chain_test(void) VRFY((space_ndims == 1), "verified data space num dims(2)"); VRFY((dims[0] == (hsize_t)mpi_size), "verified data space dims"); - vector_ptr = (int *)HDmalloc((size_t)(mpi_size) * sizeof(int)); + vector_ptr = (int *)malloc((size_t)(mpi_size) * sizeof(int)); VRFY((vector_ptr != NULL), "allocated in memory rep of vector"); err = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr); @@ -224,7 +224,7 @@ file_image_daisy_chain_test(void) vector_ok = FALSE; VRFY((vector_ok), "verified received vector."); - HDfree(vector_ptr); + free(vector_ptr); vector_ptr = NULL; /* 7) closes the core file and exit. */ @@ -241,7 +241,7 @@ file_image_daisy_chain_test(void) err = H5Pclose(fapl_id); VRFY((err >= 0), "closed fapl(1)."); - HDfree(image_ptr); + free(image_ptr); image_ptr = NULL; image_len = 0; } @@ -252,7 +252,7 @@ file_image_daisy_chain_test(void) MPI_COMM_WORLD, &rcvstat); VRFY((mpi_result == MPI_SUCCESS), "received image size from process mpi_rank-1"); - image_ptr = (void *)HDmalloc((size_t)image_len); + image_ptr = (void *)malloc((size_t)image_len); VRFY(image_ptr != NULL, "allocated file image receive buffer."); mpi_result = @@ -295,7 +295,7 @@ file_image_daisy_chain_test(void) VRFY((space_ndims == 1), "verified data space num dims(2)"); VRFY((dims[0] == (hsize_t)mpi_size), "verified data space dims"); - vector_ptr = (int *)HDmalloc((size_t)(mpi_size) * sizeof(int)); + vector_ptr = (int *)malloc((size_t)(mpi_size) * sizeof(int)); VRFY((vector_ptr != NULL), "allocated in memory rep of vector"); err = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr); @@ -321,7 +321,7 @@ file_image_daisy_chain_test(void) err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr); VRFY((err >= 0), "wrote modified data to vector."); - HDfree(vector_ptr); + free(vector_ptr); vector_ptr = NULL; /* 4) Flush the core file and send it to process (mpi_rank + 1) % n. */ @@ -332,7 +332,7 @@ file_image_daisy_chain_test(void) image_len = H5Fget_file_image(file_id, NULL, (size_t)0); VRFY((image_len > 0), "got (possibly modified) image file len"); - image_ptr = (void *)HDrealloc((void *)image_ptr, (size_t)image_len); + image_ptr = (void *)realloc((void *)image_ptr, (size_t)image_len); VRFY(image_ptr != NULL, "re-allocated file image buffer."); bytes_read = H5Fget_file_image(file_id, image_ptr, (size_t)image_len); @@ -346,7 +346,7 @@ file_image_daisy_chain_test(void) MPI_COMM_WORLD); VRFY((mpi_result == MPI_SUCCESS), "sent image to process (mpi_rank + 1) % mpi_size"); - HDfree(image_ptr); + free(image_ptr); image_ptr = NULL; image_len = 0; diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c index d700da2..aa0fcb1 100644 --- a/testpar/t_filter_read.c +++ b/testpar/t_filter_read.c @@ -80,11 +80,11 @@ filter_read_internal(const char *filename, hid_t dcpl, hsize_t *dset_size) VRFY(sid >= 0, "H5Screate_simple"); /* Create buffers */ - points = (int *)HDmalloc(size[0] * size[1] * sizeof(int)); - VRFY(points != NULL, "HDmalloc"); + points = (int *)malloc(size[0] * size[1] * sizeof(int)); + VRFY(points != NULL, "malloc"); - check = (int *)HDmalloc(hs_size[0] * hs_size[1] * sizeof(int)); - VRFY(check != NULL, "HDmalloc"); + check = (int *)malloc(hs_size[0] * hs_size[1] * sizeof(int)); + VRFY(check != NULL, "malloc"); /* Initialize writing buffer with random data */ for (i = 0; i < size[0]; i++) @@ -176,8 +176,8 @@ filter_read_internal(const char *filename, hid_t dcpl, hsize_t *dset_size) hrc = H5Fclose(file); VRFY(hrc >= 0, "H5Fclose"); - HDfree(points); - HDfree(check); + free(points); + free(check); MPI_Barrier(MPI_COMM_WORLD); } diff --git a/testpar/t_filters_parallel.c b/testpar/t_filters_parallel.c index 4024c34..8933e3a 100644 --- a/testpar/t_filters_parallel.c +++ b/testpar/t_filters_parallel.c @@ -490,11 +490,11 @@ test_write_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t fil (hsize_t)WRITE_ONE_CHUNK_FILTERED_DATASET_NCOLS * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -512,13 +512,13 @@ test_write_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t fil verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_ONE_CHUNK_FILTERED_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -529,9 +529,9 @@ test_write_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t fil VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -645,11 +645,11 @@ test_write_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fi data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -665,13 +665,13 @@ test_write_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fi verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -682,9 +682,9 @@ test_write_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fi VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -792,11 +792,11 @@ test_write_filtered_dataset_no_overlap_partial(const char *parent_group, H5Z_fil data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -821,13 +821,13 @@ test_write_filtered_dataset_no_overlap_partial(const char *parent_group, H5Z_fil verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -838,9 +838,9 @@ test_write_filtered_dataset_no_overlap_partial(const char *parent_group, H5Z_fil VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -953,11 +953,11 @@ test_write_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filte data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -975,13 +975,13 @@ test_write_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filte verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_SHARED_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -992,9 +992,9 @@ test_write_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filte VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1077,11 +1077,11 @@ test_write_filtered_dataset_single_unlim_dim_no_overlap(const char *parent_group /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - read_buf = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != read_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -1148,9 +1148,9 @@ test_write_filtered_dataset_single_unlim_dim_no_overlap(const char *parent_group } if (data) - HDfree(data); + free(data); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1231,11 +1231,11 @@ test_write_filtered_dataset_single_unlim_dim_overlap(const char *parent_group, H /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - read_buf = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != read_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -1301,9 +1301,9 @@ test_write_filtered_dataset_single_unlim_dim_overlap(const char *parent_group, H } if (data) - HDfree(data); + free(data); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1394,12 +1394,12 @@ test_write_filtered_dataset_multi_unlim_dim_no_overlap(const char *parent_group, /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); - tmp_realloc = (C_DATATYPE *)HDrealloc(data, data_size); - VRFY((NULL != tmp_realloc), "HDrealloc succeeded"); + tmp_realloc = (C_DATATYPE *)realloc(data, data_size); + VRFY((NULL != tmp_realloc), "realloc succeeded"); data = tmp_realloc; - tmp_realloc = (C_DATATYPE *)HDrealloc(read_buf, data_size); - VRFY((NULL != tmp_realloc), "HDrealloc succeeded"); + tmp_realloc = (C_DATATYPE *)realloc(read_buf, data_size); + VRFY((NULL != tmp_realloc), "realloc succeeded"); read_buf = tmp_realloc; for (j = 0; j < data_size / sizeof(*data); j++) @@ -1470,9 +1470,9 @@ test_write_filtered_dataset_multi_unlim_dim_no_overlap(const char *parent_group, } if (data) - HDfree(data); + free(data); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1561,12 +1561,12 @@ test_write_filtered_dataset_multi_unlim_dim_overlap(const char *parent_group, H5 /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); - tmp_realloc = (C_DATATYPE *)HDrealloc(data, data_size); - VRFY((NULL != tmp_realloc), "HDrealloc succeeded"); + tmp_realloc = (C_DATATYPE *)realloc(data, data_size); + VRFY((NULL != tmp_realloc), "realloc succeeded"); data = tmp_realloc; - tmp_realloc = (C_DATATYPE *)HDrealloc(read_buf, data_size); - VRFY((NULL != tmp_realloc), "HDrealloc succeeded"); + tmp_realloc = (C_DATATYPE *)realloc(read_buf, data_size); + VRFY((NULL != tmp_realloc), "realloc succeeded"); read_buf = tmp_realloc; for (j = 0; j < data_size / sizeof(*data); j++) @@ -1633,9 +1633,9 @@ test_write_filtered_dataset_multi_unlim_dim_overlap(const char *parent_group, H5 } if (data) - HDfree(data); + free(data); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1758,15 +1758,15 @@ test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fi correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); if (mpi_rank != WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC) { - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); } - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) + @@ -1785,13 +1785,13 @@ test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fi verify_space_alloc_status(dset_id, plist_id, (mpi_size > 1 ? SOME_CHUNKS_WRITTEN : NO_CHUNKS_WRITTEN)); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -1802,9 +1802,9 @@ test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fi VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1894,11 +1894,11 @@ test_write_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filte data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -1910,13 +1910,13 @@ test_write_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filte verify_space_alloc_status(dset_id, plist_id, NO_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -1927,9 +1927,9 @@ test_write_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filte VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -2013,8 +2013,8 @@ test_write_filtered_dataset_point_selection(const char *parent_group, H5Z_filter num_points = (hsize_t)WRITE_POINT_SELECTION_FILTERED_CHUNKS_NROWS * (hsize_t)WRITE_POINT_SELECTION_FILTERED_CHUNKS_NCOLS / (hsize_t)mpi_size; - coords = (hsize_t *)HDcalloc(1, 2 * num_points * sizeof(*coords)); - VRFY((NULL != coords), "Coords HDcalloc succeeded"); + coords = (hsize_t *)calloc(1, 2 * num_points * sizeof(*coords)); + VRFY((NULL != coords), "Coords calloc succeeded"); for (i = 0; i < num_points; i++) for (j = 0; j < WRITE_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS; j++) @@ -2030,11 +2030,11 @@ test_write_filtered_dataset_point_selection(const char *parent_group, H5Z_filter data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -2052,13 +2052,13 @@ test_write_filtered_dataset_point_selection(const char *parent_group, H5Z_filter verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_POINT_SELECTION_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -2069,11 +2069,11 @@ test_write_filtered_dataset_point_selection(const char *parent_group, H5Z_filter VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (coords) - HDfree(coords); + free(coords); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -2190,11 +2190,11 @@ test_write_filtered_dataset_interleaved_write(const char *parent_group, H5Z_filt data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -2220,13 +2220,13 @@ test_write_filtered_dataset_interleaved_write(const char *parent_group, H5Z_filt verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, INTERLEAVED_WRITE_FILTERED_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -2237,9 +2237,9 @@ test_write_filtered_dataset_interleaved_write(const char *parent_group, H5Z_filt VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -2361,11 +2361,11 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -2385,13 +2385,13 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z "Dataset write succeeded"); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -2409,9 +2409,9 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -2534,11 +2534,11 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_grou data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -2553,13 +2553,13 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_grou verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -2570,9 +2570,9 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_grou VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -2696,11 +2696,11 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -2716,13 +2716,13 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -2733,9 +2733,9 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -2857,11 +2857,11 @@ test_write_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fi data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -2891,13 +2891,13 @@ test_write_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fi verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_SHARED_FILTERED_CHUNKS_3D_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -2908,9 +2908,9 @@ test_write_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fi VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -3041,14 +3041,14 @@ test_write_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), "Hyperslab selection succeeded"); - data = (COMPOUND_C_DATATYPE *)HDcalloc( + data = (COMPOUND_C_DATATYPE *)calloc( 1, (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_ENTRIES_PER_PROC * sizeof(*data)); - VRFY((NULL != data), "HDcalloc succeeded"); + VRFY((NULL != data), "calloc succeeded"); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE); - correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); /* Fill data buffer */ for (i = 0; i < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_ENTRIES_PER_PROC; i++) { @@ -3071,13 +3071,13 @@ test_write_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_NAME, H5P_DEFAULT); @@ -3088,9 +3088,9 @@ test_write_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -3222,14 +3222,14 @@ test_write_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), "Hyperslab selection succeeded"); - data = (COMPOUND_C_DATATYPE *)HDcalloc( + data = (COMPOUND_C_DATATYPE *)calloc( 1, (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_ENTRIES_PER_PROC * sizeof(*data)); - VRFY((NULL != data), "HDcalloc succeeded"); + VRFY((NULL != data), "calloc succeeded"); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE); - correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); /* Fill data buffer */ for (i = 0; i < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_ENTRIES_PER_PROC; i++) { @@ -3258,13 +3258,13 @@ test_write_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_NAME, H5P_DEFAULT); @@ -3275,9 +3275,9 @@ test_write_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -3429,14 +3429,14 @@ test_write_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_gro VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), "Hyperslab selection succeeded"); - data = (COMPOUND_C_DATATYPE *)HDcalloc( + data = (COMPOUND_C_DATATYPE *)calloc( 1, (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_ENTRIES_PER_PROC * sizeof(*data)); - VRFY((NULL != data), "HDcalloc succeeded"); + VRFY((NULL != data), "calloc succeeded"); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE); - correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); /* Fill data buffer */ for (i = 0; i < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_ENTRIES_PER_PROC; i++) { @@ -3456,13 +3456,13 @@ test_write_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_gro verify_space_alloc_status(dset_id, plist_id, NO_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); /* Verify that no data was written */ VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); - read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_NAME, H5P_DEFAULT); @@ -3473,9 +3473,9 @@ test_write_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_gro VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -3628,14 +3628,14 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), "Hyperslab selection succeeded"); - data = (COMPOUND_C_DATATYPE *)HDcalloc( + data = (COMPOUND_C_DATATYPE *)calloc( 1, (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_ENTRIES_PER_PROC * sizeof(*data)); - VRFY((NULL != data), "HDcalloc succeeded"); + VRFY((NULL != data), "calloc succeeded"); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE); - correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); /* Fill data buffer */ for (i = 0; i < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_ENTRIES_PER_PROC; i++) { @@ -3655,13 +3655,13 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group verify_space_alloc_status(dset_id, plist_id, NO_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); /* Verify that no data was written */ VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); - read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_NAME, H5P_DEFAULT); @@ -3672,9 +3672,9 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -3732,8 +3732,8 @@ test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filt /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = ((C_DATATYPE)i % (READ_ONE_CHUNK_FILTERED_DATASET_CH_NROWS / mpi_size * @@ -3842,24 +3842,24 @@ test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filt read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* Collect each piece of data from all ranks into a global buffer on all ranks */ - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) recvcounts[i] = (int)flat_dims[0]; - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) displs[i] = (int)(i * flat_dims[0]); @@ -3871,15 +3871,15 @@ test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filt VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -3934,8 +3934,8 @@ test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fil correct_buf_size = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_NROWS * (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_NCOLS * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) + @@ -4042,24 +4042,24 @@ test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fil read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* Collect each piece of data from all ranks into a global buffer on all ranks */ - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) recvcounts[i] = (int)flat_dims[0]; - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) displs[i] = (int)(i * flat_dims[0]); @@ -4071,15 +4071,15 @@ test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fil VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -4134,8 +4134,8 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = @@ -4244,14 +4244,14 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* * Since these chunks are shared, run multiple rounds of MPI_Allgatherv @@ -4263,11 +4263,11 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter size_t loop_count = count[0]; size_t total_recvcounts = 0; - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) { recvcounts[i] = (int)dataset_dims[1]; @@ -4289,15 +4289,15 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -4353,8 +4353,8 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) + @@ -4474,8 +4474,8 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); if (mpi_rank == READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC) { VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, NULL) >= 0), @@ -4486,20 +4486,20 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil "Dataset read succeeded"); } - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* Collect each piece of data from all ranks into a global buffer on all ranks */ - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) recvcounts[i] = (int)(READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_CH_NROWS * READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NCOLS); recvcounts[READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC] = 0; - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) displs[i] = (int)(i * (size_t)(READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_CH_NROWS * @@ -4517,15 +4517,15 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -4573,8 +4573,8 @@ test_read_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filter /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); if (MAINPROCESS) { plist_id = H5Pcreate(H5P_FILE_ACCESS); @@ -4651,8 +4651,8 @@ test_read_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filter read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); @@ -4660,9 +4660,9 @@ test_read_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filter VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -4715,8 +4715,8 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_ /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = @@ -4801,8 +4801,8 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_ num_points = (hsize_t)READ_POINT_SELECTION_FILTERED_CHUNKS_NROWS * (hsize_t)READ_POINT_SELECTION_FILTERED_CHUNKS_NCOLS / (hsize_t)mpi_size; - coords = (hsize_t *)HDcalloc(1, 2 * num_points * sizeof(*coords)); - VRFY((NULL != coords), "Coords HDcalloc succeeded"); + coords = (hsize_t *)calloc(1, 2 * num_points * sizeof(*coords)); + VRFY((NULL != coords), "Coords calloc succeeded"); for (i = 0; i < num_points; i++) for (j = 0; j < READ_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS; j++) @@ -4816,14 +4816,14 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_ read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* * Since these chunks are shared, run multiple rounds of MPI_Allgatherv @@ -4836,11 +4836,11 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_ size_t cur_loop_count = original_loop_count; size_t total_recvcounts = 0; - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) { recvcounts[i] = (int)dataset_dims[1]; @@ -4863,17 +4863,17 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_ VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); - HDfree(coords); + free(coords); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -4931,8 +4931,8 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) /* Add Column Index */ @@ -5051,14 +5051,14 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* * Since these chunks are shared, run multiple rounds of MPI_Allgatherv @@ -5070,11 +5070,11 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter size_t loop_count = count[0]; size_t total_recvcounts = 0; - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) { recvcounts[i] = (int)dataset_dims[1]; @@ -5096,15 +5096,15 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -5160,8 +5160,8 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = (C_DATATYPE)((i % (hsize_t)mpi_size) + (i / (hsize_t)mpi_size)); @@ -5277,14 +5277,14 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* * Due to the nature of 3-dimensional reading, create an MPI vector type that allows each @@ -5312,11 +5312,11 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group VRFY((MPI_SUCCESS == MPI_Type_free(&resized_vector_type)), "MPI_Type_free succeeded"); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -5379,8 +5379,8 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_ correct_buf_size = (hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_NROWS * (hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_NCOLS * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) + @@ -5509,24 +5509,24 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_ read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, plist_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* Collect each piece of data from all ranks into a global buffer on all ranks */ - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) recvcounts[i] = (int)flat_dims[0]; - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) displs[i] = (int)(i * flat_dims[0]); @@ -5538,15 +5538,15 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_ VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -5604,8 +5604,8 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5 /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] * dataset_dims[1])) + @@ -5721,24 +5721,24 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5 read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* Collect each piece of data from all ranks into a global buffer on all ranks */ - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) recvcounts[i] = (int)flat_dims[0]; - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) displs[i] = (int)(i * flat_dims[0]); @@ -5750,15 +5750,15 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5 VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -5815,8 +5815,8 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) /* Add the Column Index */ @@ -5943,14 +5943,14 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); { size_t run_length = @@ -5987,11 +5987,11 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil VRFY((MPI_SUCCESS == MPI_Type_free(&resized_vector_type)), "MPI_Type_free succeeded"); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -6055,8 +6055,8 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group, /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) { correct_buf[i].field1 = (short)((i % dataset_dims[1]) + (i / dataset_dims[1])); @@ -6181,23 +6181,23 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group, read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (COMPOUND_C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, memtype, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* Collect each piece of data from all ranks into a global buffer on all ranks */ - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) recvcounts[i] = (int)(flat_dims[0] * sizeof(*read_buf)); - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) displs[i] = (int)(i * flat_dims[0] * sizeof(*read_buf)); @@ -6209,15 +6209,15 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group, VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -6282,8 +6282,8 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) { correct_buf[i].field1 = @@ -6414,23 +6414,23 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (COMPOUND_C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, memtype, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* Collect each piece of data from all ranks into a global buffer on all ranks */ - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) recvcounts[i] = (int)(flat_dims[0] * sizeof(*read_buf)); - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) displs[i] = (int)(i * flat_dims[0] * sizeof(*read_buf)); @@ -6442,15 +6442,15 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -6515,8 +6515,8 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) { correct_buf[i].field1 = (short)((i % dataset_dims[1]) + (i / dataset_dims[1])); @@ -6649,23 +6649,23 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (COMPOUND_C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, memtype, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* Collect each piece of data from all ranks into a global buffer on all ranks */ - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) recvcounts[i] = (int)(flat_dims[0] * sizeof(*read_buf)); - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) displs[i] = (int)(i * flat_dims[0] * sizeof(*read_buf)); @@ -6677,15 +6677,15 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -6751,8 +6751,8 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group, /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) { correct_buf[i].field1 = @@ -6891,23 +6891,23 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group, read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (COMPOUND_C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, memtype, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* Collect each piece of data from all ranks into a global buffer on all ranks */ - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) recvcounts[i] = (int)(flat_dims[0] * sizeof(*read_buf)); - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) displs[i] = (int)(i * flat_dims[0] * sizeof(*read_buf)); @@ -6919,15 +6919,15 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group, VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -7016,8 +7016,8 @@ test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id data_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*data); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -7029,7 +7029,7 @@ test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -7039,11 +7039,11 @@ test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = (long)i; @@ -7064,9 +7064,9 @@ test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Gclose(group_id) >= 0), "Group close succeeded"); @@ -7186,8 +7186,8 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(*data); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -7199,7 +7199,7 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -7228,11 +7228,11 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] * dataset_dims[1])) + @@ -7247,8 +7247,8 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id VRFY((H5Gclose(group_id) >= 0), "Group close succeeded"); VRFY((H5Fclose(file_id) >= 0), "File close succeeded"); - HDfree(correct_buf); - HDfree(read_buf); + free(correct_buf); + free(read_buf); } return; @@ -7352,11 +7352,11 @@ test_shrinking_growing_chunks(const char *parent_group, H5Z_filter_t filter_id, data_size = sel_dims[0] * sel_dims[1] * sizeof(double); - data = (double *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (double *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - read_buf = (double *)HDcalloc(1, data_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (double *)calloc(1, data_size); + VRFY((NULL != read_buf), "calloc succeeded"); for (i = 0; i < SHRINKING_GROWING_CHUNKS_NLOOPS; i++) { /* Continually write random float data, followed by zeroed-out data */ @@ -7389,9 +7389,9 @@ test_shrinking_growing_chunks(const char *parent_group, H5Z_filter_t filter_id, } if (read_buf) - HDfree(read_buf); + free(read_buf); if (data) - HDfree(data); + free(data); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -7501,11 +7501,11 @@ test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hi /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - read_buf = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != read_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -7592,9 +7592,9 @@ test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hi VRFY((0 == HDmemcmp(read_buf, data, data_size)), "Data verification succeeded"); if (data) - HDfree(data); + free(data); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -7704,11 +7704,11 @@ test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - read_buf = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != read_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -7796,9 +7796,9 @@ test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t VRFY((0 == HDmemcmp(read_buf, data, data_size)), "Data verification succeeded"); if (data) - HDfree(data); + free(data); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -7900,11 +7900,11 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id /* Allocate buffer for reading entire dataset */ read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*read_buf); - read_buf = HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); - correct_buf = HDcalloc(1, read_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = calloc(1, read_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); /* Read entire dataset and verify that the fill value is returned */ VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), @@ -7949,8 +7949,8 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -7974,11 +7974,11 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id * Each MPI rank communicates their written piece of data * into each other rank's correctness-checking buffer */ - recvcounts = HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); - displs = HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) { recvcounts[i] = (int)(count[1] * block[1]); @@ -8174,15 +8174,15 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id VRFY((read_buf[i] != FILL_VALUES_TEST_FILL_VAL), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (data) - HDfree(data); + free(data); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -8263,8 +8263,8 @@ test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_ /* Allocate buffer for reading entire dataset */ read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*read_buf); - read_buf = HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); /* * Read entire dataset - nothing to verify since there's no fill value. @@ -8316,8 +8316,8 @@ test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_ /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -8380,9 +8380,9 @@ test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_ "Dataset read succeeded"); if (data) - HDfree(data); + free(data); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -8486,11 +8486,11 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap /* Allocate buffer for reading entire dataset */ read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*read_buf); - read_buf = HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); - fill_buf = HDcalloc(1, read_buf_size); - VRFY((NULL != fill_buf), "HDcalloc succeeded"); + fill_buf = calloc(1, read_buf_size); + VRFY((NULL != fill_buf), "calloc succeeded"); /* Read entire dataset and verify that the fill value isn't returned */ VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), @@ -8540,8 +8540,8 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -8565,11 +8565,11 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap * Each MPI rank communicates their written piece of data * into each other rank's correctness-checking buffer */ - recvcounts = HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); - displs = HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) { recvcounts[i] = (int)(count[1] * block[1]); @@ -8634,15 +8634,15 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap VRFY((read_buf[i] != FILL_TIME_NEVER_TEST_FILL_VAL), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (data) - HDfree(data); + free(data); if (read_buf) - HDfree(read_buf); + free(read_buf); if (fill_buf) - HDfree(fill_buf); + free(fill_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c index a7498a8..2db7eff 100644 --- a/testpar/t_mdset.c +++ b/testpar/t_mdset.c @@ -156,8 +156,8 @@ multiple_dset_write(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); - outme = HDmalloc((size_t)size * (size_t)size * sizeof(double)); - VRFY((outme != NULL), "HDmalloc succeeded for outme"); + outme = malloc((size_t)size * (size_t)size * sizeof(double)); + VRFY((outme != NULL), "malloc succeeded for outme"); plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); VRFY((plist >= 0), "create_faccess_plist succeeded"); @@ -207,7 +207,7 @@ multiple_dset_write(void) H5Pclose(dcpl); H5Fclose(iof); - HDfree(outme); + free(outme); } /* Example of using PHDF5 to create, write, and read compact dataset. @@ -235,11 +235,11 @@ compact_dataset(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); - outme = HDmalloc((size_t)((size_t)size * (size_t)size * sizeof(double))); - VRFY((outme != NULL), "HDmalloc succeeded for outme"); + outme = malloc((size_t)((size_t)size * (size_t)size * sizeof(double))); + VRFY((outme != NULL), "malloc succeeded for outme"); - inme = HDmalloc((size_t)size * (size_t)size * sizeof(double)); - VRFY((outme != NULL), "HDmalloc succeeded for inme"); + inme = malloc((size_t)size * (size_t)size * sizeof(double)); + VRFY((outme != NULL), "malloc succeeded for inme"); filename = GetTestParameters(); VRFY((mpi_size <= size), "mpi_size <= size"); @@ -333,8 +333,8 @@ compact_dataset(void) H5Pclose(dxpl); H5Dclose(dataset); H5Fclose(iof); - HDfree(inme); - HDfree(outme); + free(inme); + free(outme); } /* @@ -602,10 +602,10 @@ dataset_fillvalue(void) dset_size = dset_dims[0] * dset_dims[1] * dset_dims[2] * dset_dims[3]; /* Allocate space for the buffers */ - rdata = HDmalloc((size_t)(dset_size * sizeof(int))); - VRFY((rdata != NULL), "HDcalloc succeeded for read buffer"); - wdata = HDmalloc((size_t)(dset_size * sizeof(int))); - VRFY((wdata != NULL), "HDmalloc succeeded for write buffer"); + rdata = malloc((size_t)(dset_size * sizeof(int))); + VRFY((rdata != NULL), "calloc succeeded for read buffer"); + wdata = malloc((size_t)(dset_size * sizeof(int))); + VRFY((wdata != NULL), "malloc succeeded for write buffer"); fapl = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); VRFY((fapl >= 0), "create_faccess_plist succeeded"); @@ -804,8 +804,8 @@ dataset_fillvalue(void) VRFY((ret >= 0), "H5Pclose succeeded"); /* free the buffers */ - HDfree(rdata); - HDfree(wdata); + free(rdata); + free(wdata); } /* combined cngrpw and ingrpr tests because ingrpr reads file created by cngrpw. */ @@ -847,8 +847,8 @@ collective_group_write(void) chunk_size[0] = (hsize_t)(size / 2); chunk_size[1] = (hsize_t)(size / 2); - outme = HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); - VRFY((outme != NULL), "HDmalloc succeeded for outme"); + outme = malloc((size_t)size * (size_t)size * sizeof(DATATYPE)); + VRFY((outme != NULL), "malloc succeeded for outme"); plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, plist); @@ -913,7 +913,7 @@ collective_group_write(void) ret1 = H5Fclose(fid); VRFY((ret1 == 0), "H5Fclose"); - HDfree(outme); + free(outme); } /* Let two sets of processes open and read different groups and chunked @@ -971,11 +971,11 @@ group_dataset_read(hid_t fid, int mpi_rank, int m) size = get_size(); - indata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); - VRFY((indata != NULL), "HDmalloc succeeded for indata"); + indata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE)); + VRFY((indata != NULL), "malloc succeeded for indata"); - outdata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); - VRFY((outdata != NULL), "HDmalloc succeeded for outdata"); + outdata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE)); + VRFY((outdata != NULL), "malloc succeeded for outdata"); /* open every group under root group. */ HDsnprintf(gname, sizeof(gname), "group%d", m); @@ -1003,8 +1003,8 @@ group_dataset_read(hid_t fid, int mpi_rank, int m) ret = H5Gclose(gid); VRFY((ret == 0), "H5Gclose"); - HDfree(indata); - HDfree(outdata); + free(indata); + free(outdata); } /* @@ -1131,8 +1131,8 @@ write_dataset(hid_t memspace, hid_t filespace, hid_t gid) size = get_size(); - outme = HDmalloc((size_t)size * (size_t)size * sizeof(double)); - VRFY((outme != NULL), "HDmalloc succeeded for outme"); + outme = malloc((size_t)size * (size_t)size * sizeof(double)); + VRFY((outme != NULL), "malloc succeeded for outme"); for (n = 0; n < NDATASET; n++) { HDsnprintf(dname, sizeof(dname), "dataset%d", n); @@ -1150,7 +1150,7 @@ write_dataset(hid_t memspace, hid_t filespace, hid_t gid) H5Dclose(did); } - HDfree(outme); + free(outme); } /* @@ -1277,11 +1277,11 @@ read_dataset(hid_t memspace, hid_t filespace, hid_t gid) size = get_size(); - indata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); - VRFY((indata != NULL), "HDmalloc succeeded for indata"); + indata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE)); + VRFY((indata != NULL), "malloc succeeded for indata"); - outdata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); - VRFY((outdata != NULL), "HDmalloc succeeded for outdata"); + outdata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE)); + VRFY((outdata != NULL), "malloc succeeded for outdata"); for (n = 0; n < NDATASET; n++) { HDsnprintf(dname, sizeof(dname), "dataset%d", n); @@ -1308,8 +1308,8 @@ read_dataset(hid_t memspace, hid_t filespace, hid_t gid) H5Dclose(did); } - HDfree(indata); - HDfree(outdata); + free(indata); + free(outdata); return vrfy_errors; } diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c index 4dd6a95..48d0cc1 100644 --- a/testpar/t_mpi.c +++ b/testpar/t_mpi.c @@ -70,7 +70,7 @@ test_mpio_overlap_writes(char *filename) } bufsize = 4093; /* use some prime number for size */ - if (NULL == (buf = HDmalloc((size_t)bufsize))) { + if (NULL == (buf = malloc((size_t)bufsize))) { if (MAINPROCESS) printf("couldn't allocate buffer\n"); return 1; @@ -166,7 +166,7 @@ test_mpio_overlap_writes(char *filename) mrc = MPI_Barrier(MPI_COMM_WORLD); VRFY((mrc == MPI_SUCCESS), "Sync before leaving test"); - HDfree(buf); + free(buf); return (nerrs); } @@ -282,7 +282,7 @@ test_mpio_gb_file(char *filename) "because MPI_Offset cannot support it\n"); } else { - buf = (char *)HDmalloc(MB); + buf = (char *)malloc(MB); VRFY((buf != NULL), "malloc succeed"); /* open a new file. Remove it first in case it exists. */ @@ -399,7 +399,7 @@ test_mpio_gb_file(char *filename) finish: if (buf) - HDfree(buf); + free(buf); return (nerrs); } diff --git a/testpar/t_pflush1.c b/testpar/t_pflush1.c index d5a8d83..6a7a346 100644 --- a/testpar/t_pflush1.c +++ b/testpar/t_pflush1.c @@ -145,7 +145,7 @@ main(int argc, char *argv[]) HDexit(EXIT_FAILURE); } - if (NULL == (data_g = HDmalloc(100 * 100 * sizeof(*data_g)))) + if (NULL == (data_g = malloc(100 * 100 * sizeof(*data_g)))) goto error; if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) @@ -195,7 +195,7 @@ main(int argc, char *argv[]) HDfflush(stderr); if (data_g) { - HDfree(data_g); + free(data_g); data_g = NULL; } @@ -217,7 +217,7 @@ error: HDfflush(stdout); if (data_g) - HDfree(data_g); + free(data_g); HD_exit(EXIT_FAILURE); } /* end main() */ diff --git a/testpar/t_pflush2.c b/testpar/t_pflush2.c index f12168a..6148bb6 100644 --- a/testpar/t_pflush2.c +++ b/testpar/t_pflush2.c @@ -170,7 +170,7 @@ main(int argc, char *argv[]) HDexit(EXIT_SUCCESS); } - if (NULL == (data_g = HDmalloc(100 * 100 * sizeof(*data_g)))) + if (NULL == (data_g = malloc(100 * 100 * sizeof(*data_g)))) goto error; if ((fapl_id1 = H5Pcreate(H5P_FILE_ACCESS)) < 0) @@ -217,7 +217,7 @@ main(int argc, char *argv[]) h5_clean_files(&FILENAME[1], fapl_id2); if (data_g) { - HDfree(data_g); + free(data_g); data_g = NULL; } @@ -227,7 +227,7 @@ main(int argc, char *argv[]) error: if (data_g) - HDfree(data_g); + free(data_g); HDexit(EXIT_FAILURE); } /* end main() */ diff --git a/testpar/t_pmulti_dset.c b/testpar/t_pmulti_dset.c index dd9a71a..145a427 100644 --- a/testpar/t_pmulti_dset.c +++ b/testpar/t_pmulti_dset.c @@ -160,15 +160,15 @@ test_pmdset(size_t niter, unsigned flags) dcpl_id[i] = -1; /* Allocate buffers */ - if (NULL == (rbuf = (unsigned *)HDmalloc(buf_size))) + if (NULL == (rbuf = (unsigned *)malloc(buf_size))) T_PMD_ERROR; - if (NULL == (erbuf = (unsigned *)HDmalloc(buf_size))) + if (NULL == (erbuf = (unsigned *)malloc(buf_size))) T_PMD_ERROR; - if (NULL == (wbuf = (unsigned *)HDmalloc(buf_size))) + if (NULL == (wbuf = (unsigned *)malloc(buf_size))) T_PMD_ERROR; - if (NULL == (efbuf = (unsigned *)HDmalloc(buf_size))) + if (NULL == (efbuf = (unsigned *)malloc(buf_size))) T_PMD_ERROR; - if (NULL == (dset_usage = (unsigned char *)HDmalloc(max_dsets * MAX_DSET_X * MAX_DSET_Y))) + if (NULL == (dset_usage = (unsigned char *)malloc(max_dsets * MAX_DSET_X * MAX_DSET_Y))) T_PMD_ERROR; /* Initialize buffer indices */ diff --git a/testpar/t_pread.c b/testpar/t_pread.c index d0bc09b..55e6516 100644 --- a/testpar/t_pread.c +++ b/testpar/t_pread.c @@ -162,7 +162,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id) /* setup data to write */ if (pass) { - if ((data_slice = (float *)HDmalloc(COUNT * sizeof(float))) == NULL) { + if ((data_slice = (float *)malloc(COUNT * sizeof(float))) == NULL) { pass = FALSE; failure_mssg = "malloc of data_slice failed.\n"; } @@ -439,7 +439,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id) /* free data_slice if it has been allocated */ if (data_slice != NULL) { - HDfree(data_slice); + free(data_slice); data_slice = NULL; } @@ -536,7 +536,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id) /* allocate space for the data_slice array */ if (pass) { - if ((data_slice = (float *)HDmalloc(COUNT * sizeof(float))) == NULL) { + if ((data_slice = (float *)malloc(COUNT * sizeof(float))) == NULL) { pass = FALSE; failure_mssg = "malloc of data_slice failed.\n"; } @@ -670,7 +670,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id) /* free data_slice if it has been allocated */ if (data_slice != NULL) { - HDfree(data_slice); + free(data_slice); data_slice = NULL; } @@ -710,7 +710,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id) failure_mssg = "H5Tclose failed.\n"; }; - if ((data_slice = (float *)HDmalloc((size_t)dset_size * filetype_size)) == NULL) { + if ((data_slice = (float *)malloc((size_t)dset_size * filetype_size)) == NULL) { pass = FALSE; failure_mssg = "malloc of data_slice failed.\n"; } @@ -861,7 +861,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id) /* free data_slice if it has been allocated */ if (data_slice != NULL) { - HDfree(data_slice); + free(data_slice); data_slice = NULL; } @@ -869,7 +869,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id) * Read an H5S_ALL filespace into a hyperslab defined memory space */ - if ((data_slice = (float *)HDmalloc((size_t)(dset_size * 2) * filetype_size)) == NULL) { + if ((data_slice = (float *)malloc((size_t)(dset_size * 2) * filetype_size)) == NULL) { pass = FALSE; failure_mssg = "malloc of data_slice failed.\n"; } @@ -958,7 +958,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id) /* free data_slice if it has been allocated */ if (data_slice != NULL) { - HDfree(data_slice); + free(data_slice); data_slice = NULL; } diff --git a/testpar/t_prestart.c b/testpar/t_prestart.c index c80a78d..b3c9035 100644 --- a/testpar/t_prestart.c +++ b/testpar/t_prestart.c @@ -74,8 +74,8 @@ main(int argc, char **argv) VRFY(dims[1] == (hsize_t)(COL_FACTOR * mpi_size), "Wrong dataset dimensions"); /* allocate memory for data buffer */ - data_array = (DATATYPE *)HDmalloc(dims[0] * dims[1] * sizeof(DATATYPE)); - VRFY((data_array != NULL), "data_array HDmalloc succeeded"); + data_array = (DATATYPE *)malloc(dims[0] * dims[1] * sizeof(DATATYPE)); + VRFY((data_array != NULL), "data_array malloc succeeded"); /* Each process takes a slabs of rows. */ block[0] = dims[0] / (hsize_t)mpi_size; @@ -116,7 +116,7 @@ main(int argc, char **argv) /* release data buffers */ if (data_array) - HDfree(data_array); + free(data_array); nerrors += GetTestNumErrs(); diff --git a/testpar/t_prop.c b/testpar/t_prop.c index 6768649..c6eb99c 100644 --- a/testpar/t_prop.c +++ b/testpar/t_prop.c @@ -35,7 +35,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc) ret = H5Pencode2(orig_pl, NULL, &buf_size, H5P_DEFAULT); VRFY((ret >= 0), "H5Pencode succeeded"); - sbuf = (uint8_t *)HDmalloc(buf_size); + sbuf = (uint8_t *)malloc(buf_size); ret = H5Pencode2(orig_pl, sbuf, &buf_size, H5P_DEFAULT); VRFY((ret >= 0), "H5Pencode succeeded"); @@ -53,7 +53,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc) MPI_Recv(&recv_size, 1, MPI_INT, 0, 123, MPI_COMM_WORLD, &status); buf_size = (size_t)recv_size; - rbuf = (uint8_t *)HDmalloc(buf_size); + rbuf = (uint8_t *)malloc(buf_size); MPI_Recv(rbuf, recv_size, MPI_BYTE, 0, 124, MPI_COMM_WORLD, &status); pl = H5Pdecode(rbuf); @@ -65,7 +65,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc) VRFY((ret >= 0), "H5Pclose succeeded"); if (NULL != rbuf) - HDfree(rbuf); + free(rbuf); } /* end if */ if (0 == mpi_rank) { @@ -80,7 +80,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc) } if (NULL != sbuf) - HDfree(sbuf); + free(sbuf); MPI_Barrier(MPI_COMM_WORLD); return 0; diff --git a/testpar/t_pshutdown.c b/testpar/t_pshutdown.c index af98a76..7629b9f 100644 --- a/testpar/t_pshutdown.c +++ b/testpar/t_pshutdown.c @@ -73,8 +73,8 @@ main(int argc, char **argv) VRFY((dset_id >= 0), "H5Dcreate succeeded"); /* allocate memory for data buffer */ - data_array = (DATATYPE *)HDmalloc(dims[0] * dims[1] * sizeof(DATATYPE)); - VRFY((data_array != NULL), "data_array HDmalloc succeeded"); + data_array = (DATATYPE *)malloc(dims[0] * dims[1] * sizeof(DATATYPE)); + VRFY((data_array != NULL), "data_array malloc succeeded"); /* Each process takes a slabs of rows. */ block[0] = dims[0] / (hsize_t)mpi_size; @@ -103,7 +103,7 @@ main(int argc, char **argv) /* release data buffers */ if (data_array) - HDfree(data_array); + free(data_array); MPI_Finalize(); diff --git a/testpar/t_select_io_dset.c b/testpar/t_select_io_dset.c index 14fc592..13c6743 100644 --- a/testpar/t_select_io_dset.c +++ b/testpar/t_select_io_dset.c @@ -353,11 +353,11 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) curr_nerrors = nerrors; - if ((wbuf = (char *)HDmalloc((size_t)(4 * DSET_SELECT_DIM))) == NULL) + if ((wbuf = (char *)malloc((size_t)(4 * DSET_SELECT_DIM))) == NULL) P_TEST_ERROR; - if (mwbuf && (wbuf_bak = (char *)HDmalloc((size_t)(4 * DSET_SELECT_DIM))) == NULL) + if (mwbuf && (wbuf_bak = (char *)malloc((size_t)(4 * DSET_SELECT_DIM))) == NULL) P_TEST_ERROR; - if ((rbuf = (char *)HDmalloc((size_t)(4 * DSET_SELECT_DIM))) == NULL) + if ((rbuf = (char *)malloc((size_t)(4 * DSET_SELECT_DIM))) == NULL) P_TEST_ERROR; /* Create 1d data space */ @@ -467,13 +467,13 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) P_TEST_ERROR; if (wbuf) - HDfree(wbuf); + free(wbuf); if (wbuf_bak) - HDfree(wbuf_bak); + free(wbuf_bak); if (rbuf) - HDfree(rbuf); + free(rbuf); CHECK_PASSED(); @@ -826,17 +826,17 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) curr_nerrors = nerrors; /* Allocate buffers for datasets */ - if (NULL == (s1_wbuf = (s1_t *)HDmalloc(sizeof(s1_t) * DSET_SELECT_DIM))) + if (NULL == (s1_wbuf = (s1_t *)malloc(sizeof(s1_t) * DSET_SELECT_DIM))) P_TEST_ERROR; - if (mwbuf && NULL == (s1_wbuf_bak = (s1_t *)HDmalloc(sizeof(s1_t) * DSET_SELECT_DIM))) + if (mwbuf && NULL == (s1_wbuf_bak = (s1_t *)malloc(sizeof(s1_t) * DSET_SELECT_DIM))) P_TEST_ERROR; - if (NULL == (s1_rbuf = (s1_t *)HDmalloc(sizeof(s1_t) * DSET_SELECT_DIM))) + if (NULL == (s1_rbuf = (s1_t *)malloc(sizeof(s1_t) * DSET_SELECT_DIM))) P_TEST_ERROR; - if (NULL == (s2_wbuf = (s2_t *)HDmalloc(sizeof(s2_t) * DSET_SELECT_DIM))) + if (NULL == (s2_wbuf = (s2_t *)malloc(sizeof(s2_t) * DSET_SELECT_DIM))) P_TEST_ERROR; - if (mwbuf && NULL == (s2_wbuf_bak = (s2_t *)HDmalloc(sizeof(s2_t) * DSET_SELECT_DIM))) + if (mwbuf && NULL == (s2_wbuf_bak = (s2_t *)malloc(sizeof(s2_t) * DSET_SELECT_DIM))) P_TEST_ERROR; - if (NULL == (s2_rbuf = (s2_t *)HDmalloc(sizeof(s2_t) * DSET_SELECT_DIM))) + if (NULL == (s2_rbuf = (s2_t *)malloc(sizeof(s2_t) * DSET_SELECT_DIM))) P_TEST_ERROR; /* Create the memory data type */ @@ -1093,12 +1093,12 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) P_TEST_ERROR; /* Release buffers */ - HDfree(s1_wbuf); - HDfree(s1_wbuf_bak); - HDfree(s1_rbuf); - HDfree(s2_wbuf); - HDfree(s2_wbuf_bak); - HDfree(s2_rbuf); + free(s1_wbuf); + free(s1_wbuf_bak); + free(s1_rbuf); + free(s2_wbuf); + free(s2_wbuf_bak); + free(s2_rbuf); CHECK_PASSED(); @@ -1495,24 +1495,24 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m buf_size = ndsets * DSET_SELECT_DIM * sizeof(int); /* Allocate buffers for all datasets */ - if (NULL == (total_wbuf = (int *)HDmalloc(buf_size))) + if (NULL == (total_wbuf = (int *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (total_wbuf_bak = (int *)HDmalloc(buf_size))) + if (mwbuf && NULL == (total_wbuf_bak = (int *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_trans_wbuf = (int *)HDmalloc(buf_size))) + if (NULL == (total_trans_wbuf = (int *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_rbuf = (int *)HDmalloc(buf_size))) + if (NULL == (total_rbuf = (int *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(long); - if (NULL == (total_lwbuf = (long *)HDmalloc(buf_size))) + if (NULL == (total_lwbuf = (long *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (total_lwbuf_bak = (long *)HDmalloc(buf_size))) + if (mwbuf && NULL == (total_lwbuf_bak = (long *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_trans_lwbuf = (long *)HDmalloc(buf_size))) + if (NULL == (total_trans_lwbuf = (long *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_lrbuf = (long *)HDmalloc(buf_size))) + if (NULL == (total_lrbuf = (long *)malloc(buf_size))) P_TEST_ERROR; /* Initialize buffer indices */ @@ -1651,14 +1651,14 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m P_TEST_ERROR; } - HDfree(total_wbuf); - HDfree(total_wbuf_bak); - HDfree(total_rbuf); - HDfree(total_trans_wbuf); - HDfree(total_lwbuf); - HDfree(total_lwbuf_bak); - HDfree(total_trans_lwbuf); - HDfree(total_lrbuf); + free(total_wbuf); + free(total_wbuf_bak); + free(total_rbuf); + free(total_trans_wbuf); + free(total_lwbuf); + free(total_lwbuf_bak); + free(total_trans_lwbuf); + free(total_lrbuf); CHECK_PASSED(); @@ -1805,18 +1805,18 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) s2_buf_size = ndsets * DSET_SELECT_DIM * sizeof(s2_t); /* Allocate buffers for all datasets */ - if (NULL == (total_wbuf = (s1_t *)HDmalloc(buf_size))) + if (NULL == (total_wbuf = (s1_t *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (total_wbuf_bak = (s1_t *)HDmalloc(buf_size))) + if (mwbuf && NULL == (total_wbuf_bak = (s1_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_rbuf = (s1_t *)HDmalloc(buf_size))) + if (NULL == (total_rbuf = (s1_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (s2_total_wbuf = (s2_t *)HDmalloc(s2_buf_size))) + if (NULL == (s2_total_wbuf = (s2_t *)malloc(s2_buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (s2_total_wbuf_bak = (s2_t *)HDmalloc(s2_buf_size))) + if (mwbuf && NULL == (s2_total_wbuf_bak = (s2_t *)malloc(s2_buf_size))) P_TEST_ERROR; - if (NULL == (s2_total_rbuf = (s2_t *)HDmalloc(s2_buf_size))) + if (NULL == (s2_total_rbuf = (s2_t *)malloc(s2_buf_size))) P_TEST_ERROR; /* Initialize buffer indices */ @@ -2129,12 +2129,12 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) P_TEST_ERROR; } - HDfree(total_wbuf); - HDfree(total_wbuf_bak); - HDfree(total_rbuf); - HDfree(s2_total_wbuf); - HDfree(s2_total_wbuf_bak); - HDfree(s2_total_rbuf); + free(total_wbuf); + free(total_wbuf_bak); + free(total_rbuf); + free(s2_total_wbuf); + free(s2_total_wbuf_bak); + free(s2_total_rbuf); CHECK_PASSED(); @@ -2254,11 +2254,11 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) buf_size = ndsets * ss * DSET_SELECT_DIM; /* Allocate buffers for all datasets */ - if (NULL == (total_wbuf = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_wbuf = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_wbuf_bak = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_wbuf_bak = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_rbuf = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_rbuf = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; /* Initialize buffer indices */ @@ -2323,11 +2323,11 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) buf_size = ndsets * (ss * DSET_SELECT_DIM); /* Allocate buffers for all datasets */ - if (NULL == (total_lwbuf = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_lwbuf = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_lwbuf_bak = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_lwbuf_bak = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_lrbuf = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_lrbuf = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; /* Initialize buffer indices */ @@ -2398,11 +2398,11 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) buf_size = ndsets * (ss * DSET_SELECT_DIM); /* Allocate buffers for all datasets */ - if (NULL == (total_swbuf = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_swbuf = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_swbuf_bak = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_swbuf_bak = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_srbuf = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_srbuf = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; /* Initialize buffer indices */ @@ -2467,15 +2467,15 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) P_TEST_ERROR; } - HDfree(total_wbuf); - HDfree(total_wbuf_bak); - HDfree(total_rbuf); - HDfree(total_lwbuf); - HDfree(total_lwbuf_bak); - HDfree(total_lrbuf); - HDfree(total_swbuf); - HDfree(total_swbuf_bak); - HDfree(total_srbuf); + free(total_wbuf); + free(total_wbuf_bak); + free(total_rbuf); + free(total_lwbuf); + free(total_lwbuf_bak); + free(total_lrbuf); + free(total_swbuf); + free(total_swbuf_bak); + free(total_srbuf); CHECK_PASSED(); @@ -2598,13 +2598,13 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un buf_size = ndsets * DSET_SELECT_DIM * sizeof(int); /* Allocate buffers for all datasets */ - if (NULL == (total_wbuf = (int *)HDmalloc(buf_size))) + if (NULL == (total_wbuf = (int *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_wbuf_bak = (int *)HDmalloc(buf_size))) + if (NULL == (total_wbuf_bak = (int *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_trans_wbuf = (int *)HDmalloc(buf_size))) + if (NULL == (total_trans_wbuf = (int *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_lrbuf = (long *)HDmalloc(ndsets * DSET_SELECT_DIM * sizeof(long)))) + if (NULL == (total_lrbuf = (long *)malloc(ndsets * DSET_SELECT_DIM * sizeof(long)))) P_TEST_ERROR; /* Initialize buffer indices */ @@ -2826,10 +2826,10 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un P_TEST_ERROR; } - HDfree(total_wbuf); - HDfree(total_wbuf_bak); - HDfree(total_trans_wbuf); - HDfree(total_lrbuf); + free(total_wbuf); + free(total_wbuf_bak); + free(total_trans_wbuf); + free(total_lrbuf); CHECK_PASSED(); @@ -3064,49 +3064,49 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf) /* DSET_WITH_NO_CONV */ buf_size = ndsets * DSET_SELECT_DIM * sizeof(int); - if (NULL == (total_wbuf1 = (int *)HDmalloc(buf_size))) + if (NULL == (total_wbuf1 = (int *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (total_wbuf1_bak = (int *)HDmalloc(buf_size))) + if (mwbuf && NULL == (total_wbuf1_bak = (int *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_rbuf1 = (int *)HDmalloc(buf_size))) + if (NULL == (total_rbuf1 = (int *)malloc(buf_size))) P_TEST_ERROR; /* DSET_WITH_CONV_AND_NO_BKG */ buf_size = ndsets * DSET_SELECT_DIM * sizeof(unsigned long); - if (NULL == (ul_total_wbuf2 = (unsigned long *)HDmalloc(buf_size))) + if (NULL == (ul_total_wbuf2 = (unsigned long *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (ul_total_wbuf2_bak = (unsigned long *)HDmalloc(buf_size))) + if (mwbuf && NULL == (ul_total_wbuf2_bak = (unsigned long *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(long); - if (NULL == (l_total_rbuf2 = (long *)HDmalloc(buf_size))) + if (NULL == (l_total_rbuf2 = (long *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(long); - if (NULL == (l_total_wbuf2 = (long *)HDmalloc(buf_size))) + if (NULL == (l_total_wbuf2 = (long *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (l_total_wbuf2_bak = (long *)HDmalloc(buf_size))) + if (mwbuf && NULL == (l_total_wbuf2_bak = (long *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(short); - if (NULL == (s_total_rbuf2 = (short *)HDmalloc(buf_size))) + if (NULL == (s_total_rbuf2 = (short *)malloc(buf_size))) P_TEST_ERROR; /* DSET_WITH_CONV_AND_BKG */ buf_size = ndsets * DSET_SELECT_DIM * sizeof(s1_t); - if (NULL == (s1_total_wbuf3 = (s1_t *)HDmalloc(buf_size))) + if (NULL == (s1_total_wbuf3 = (s1_t *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (s1_total_wbuf3_bak = (s1_t *)HDmalloc(buf_size))) + if (mwbuf && NULL == (s1_total_wbuf3_bak = (s1_t *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(s3_t); - if (NULL == (s3_total_rbuf3 = (s3_t *)HDmalloc(buf_size))) + if (NULL == (s3_total_rbuf3 = (s3_t *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(s4_t); - if (NULL == (s4_total_wbuf3 = (s4_t *)HDmalloc(buf_size))) + if (NULL == (s4_total_wbuf3 = (s4_t *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (s4_total_wbuf3_bak = (s4_t *)HDmalloc(buf_size))) + if (mwbuf && NULL == (s4_total_wbuf3_bak = (s4_t *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(s1_t); - if (NULL == (s1_total_rbuf3 = (s1_t *)HDmalloc(buf_size))) + if (NULL == (s1_total_rbuf3 = (s1_t *)malloc(buf_size))) P_TEST_ERROR; /* Test with s settings for ndsets */ @@ -3344,37 +3344,37 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf) } /* Freeing */ - HDfree(total_wbuf1); + free(total_wbuf1); total_wbuf1 = NULL; - HDfree(total_wbuf1_bak); + free(total_wbuf1_bak); total_wbuf1_bak = NULL; - HDfree(total_rbuf1); + free(total_rbuf1); total_rbuf1 = NULL; - HDfree(ul_total_wbuf2); + free(ul_total_wbuf2); ul_total_wbuf2 = NULL; - HDfree(ul_total_wbuf2_bak); + free(ul_total_wbuf2_bak); ul_total_wbuf2_bak = NULL; - HDfree(l_total_rbuf2); + free(l_total_rbuf2); l_total_rbuf2 = NULL; - HDfree(l_total_wbuf2); + free(l_total_wbuf2); l_total_wbuf2 = NULL; - HDfree(l_total_wbuf2_bak); + free(l_total_wbuf2_bak); l_total_wbuf2_bak = NULL; - HDfree(s_total_rbuf2); + free(s_total_rbuf2); s_total_rbuf2 = NULL; - HDfree(s1_total_wbuf3); + free(s1_total_wbuf3); s1_total_wbuf3 = NULL; - HDfree(s1_total_wbuf3_bak); + free(s1_total_wbuf3_bak); s1_total_wbuf3_bak = NULL; - HDfree(s3_total_rbuf3); + free(s3_total_rbuf3); s3_total_rbuf3 = NULL; - HDfree(s4_total_wbuf3); + free(s4_total_wbuf3); s4_total_wbuf3 = NULL; - HDfree(s4_total_wbuf3_bak); + free(s4_total_wbuf3_bak); s4_total_wbuf3_bak = NULL; - HDfree(s1_total_rbuf3); + free(s1_total_rbuf3); s1_total_rbuf3 = NULL; } /* end for n niter */ diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c index 38f9604..6aa74b3 100644 --- a/testpar/t_shapesame.c +++ b/testpar/t_shapesame.c @@ -191,28 +191,28 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker tv_ptr->block_ptr = &(tv_ptr->block[PAR_SS_DR_MAX_RANK - tv_ptr->large_rank]); /* Allocate buffers */ - tv_ptr->small_ds_buf_0 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_size); + tv_ptr->small_ds_buf_0 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_size); VRFY((tv_ptr->small_ds_buf_0 != NULL), "malloc of small_ds_buf_0 succeeded"); - tv_ptr->small_ds_buf_1 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_size); + tv_ptr->small_ds_buf_1 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_size); VRFY((tv_ptr->small_ds_buf_1 != NULL), "malloc of small_ds_buf_1 succeeded"); - tv_ptr->small_ds_buf_2 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_size); + tv_ptr->small_ds_buf_2 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_size); VRFY((tv_ptr->small_ds_buf_2 != NULL), "malloc of small_ds_buf_2 succeeded"); - tv_ptr->small_ds_slice_buf = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_slice_size); + tv_ptr->small_ds_slice_buf = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_slice_size); VRFY((tv_ptr->small_ds_slice_buf != NULL), "malloc of small_ds_slice_buf succeeded"); - tv_ptr->large_ds_buf_0 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_size); + tv_ptr->large_ds_buf_0 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_size); VRFY((tv_ptr->large_ds_buf_0 != NULL), "malloc of large_ds_buf_0 succeeded"); - tv_ptr->large_ds_buf_1 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_size); + tv_ptr->large_ds_buf_1 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_size); VRFY((tv_ptr->large_ds_buf_1 != NULL), "malloc of large_ds_buf_1 succeeded"); - tv_ptr->large_ds_buf_2 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_size); + tv_ptr->large_ds_buf_2 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_size); VRFY((tv_ptr->large_ds_buf_2 != NULL), "malloc of large_ds_buf_2 succeeded"); - tv_ptr->large_ds_slice_buf = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_slice_size); + tv_ptr->large_ds_slice_buf = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_slice_size); VRFY((tv_ptr->large_ds_slice_buf != NULL), "malloc of large_ds_slice_buf succeeded"); /* initialize the buffers */ @@ -639,22 +639,22 @@ hs_dr_pio_test__takedown(struct hs_dr_pio_test_vars_t *tv_ptr) /* Free memory buffers */ if (tv_ptr->small_ds_buf_0 != NULL) - HDfree(tv_ptr->small_ds_buf_0); + free(tv_ptr->small_ds_buf_0); if (tv_ptr->small_ds_buf_1 != NULL) - HDfree(tv_ptr->small_ds_buf_1); + free(tv_ptr->small_ds_buf_1); if (tv_ptr->small_ds_buf_2 != NULL) - HDfree(tv_ptr->small_ds_buf_2); + free(tv_ptr->small_ds_buf_2); if (tv_ptr->small_ds_slice_buf != NULL) - HDfree(tv_ptr->small_ds_slice_buf); + free(tv_ptr->small_ds_slice_buf); if (tv_ptr->large_ds_buf_0 != NULL) - HDfree(tv_ptr->large_ds_buf_0); + free(tv_ptr->large_ds_buf_0); if (tv_ptr->large_ds_buf_1 != NULL) - HDfree(tv_ptr->large_ds_buf_1); + free(tv_ptr->large_ds_buf_1); if (tv_ptr->large_ds_buf_2 != NULL) - HDfree(tv_ptr->large_ds_buf_2); + free(tv_ptr->large_ds_buf_2); if (tv_ptr->large_ds_slice_buf != NULL) - HDfree(tv_ptr->large_ds_slice_buf); + free(tv_ptr->large_ds_slice_buf); return; @@ -4312,7 +4312,7 @@ main(int argc, char **argv) HDmemset(filenames, 0, sizeof(filenames)); for (int i = 0; i < NFILENAME; i++) { - if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) { + if (NULL == (filenames[i] = malloc(PATH_MAX))) { printf("couldn't allocate filename array\n"); MPI_Abort(MPI_COMM_WORLD, -1); } @@ -4383,7 +4383,7 @@ main(int argc, char **argv) } for (int i = 0; i < NFILENAME; i++) { - HDfree(filenames[i]); + free(filenames[i]); filenames[i] = NULL; } diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c index 82da3bd..01f8889 100644 --- a/testpar/t_span_tree.c +++ b/testpar/t_span_tree.c @@ -238,9 +238,9 @@ coll_write_test(int chunk_factor) fsdim[0] = FSPACE_DIM1; fsdim[1] = (hsize_t)(FSPACE_DIM2 * mpi_size); - vector = (int *)HDmalloc(sizeof(int) * (size_t)mdim1[0] * (size_t)mpi_size); - matrix_out = (int *)HDmalloc(sizeof(int) * (size_t)mdim[0] * (size_t)mdim[1] * (size_t)mpi_size); - matrix_out1 = (int *)HDmalloc(sizeof(int) * (size_t)mdim[0] * (size_t)mdim[1] * (size_t)mpi_size); + vector = (int *)malloc(sizeof(int) * (size_t)mdim1[0] * (size_t)mpi_size); + matrix_out = (int *)malloc(sizeof(int) * (size_t)mdim[0] * (size_t)mdim[1] * (size_t)mpi_size); + matrix_out1 = (int *)malloc(sizeof(int) * (size_t)mdim[0] * (size_t)mdim[1] * (size_t)mpi_size); HDmemset(vector, 0, sizeof(int) * (size_t)mdim1[0] * (size_t)mpi_size); vector[0] = vector[MSPACE1_DIM * mpi_size - 1] = -1; @@ -619,11 +619,11 @@ coll_write_test(int chunk_factor) VRFY((ret >= 0), ""); if (vector) - HDfree(vector); + free(vector); if (matrix_out) - HDfree(matrix_out); + free(matrix_out); if (matrix_out1) - HDfree(matrix_out1); + free(matrix_out1); return; } @@ -685,8 +685,8 @@ coll_read_test(void) mdim[0] = MSPACE_DIM1; mdim[1] = (hsize_t)(MSPACE_DIM2 * mpi_size); - matrix_out = (int *)HDmalloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); - matrix_out1 = (int *)HDmalloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); + matrix_out = (int *)malloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); + matrix_out1 = (int *)malloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); /*** For testing collective hyperslab selection read ***/ @@ -846,8 +846,8 @@ coll_read_test(void) /* * Free read buffers. */ - HDfree(matrix_out); - HDfree(matrix_out1); + free(matrix_out); + free(matrix_out1); /* * Close memory file and memory dataspaces. @@ -1526,16 +1526,16 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ /* Allocate buffers */ - small_ds_buf_0 = (uint32_t *)HDmalloc(sizeof(uint32_t) * small_ds_size); + small_ds_buf_0 = (uint32_t *)malloc(sizeof(uint32_t) * small_ds_size); VRFY((small_ds_buf_0 != NULL), "malloc of small_ds_buf_0 succeeded"); - small_ds_buf_1 = (uint32_t *)HDmalloc(sizeof(uint32_t) * small_ds_size); + small_ds_buf_1 = (uint32_t *)malloc(sizeof(uint32_t) * small_ds_size); VRFY((small_ds_buf_1 != NULL), "malloc of small_ds_buf_1 succeeded"); - large_ds_buf_0 = (uint32_t *)HDmalloc(sizeof(uint32_t) * large_ds_size); + large_ds_buf_0 = (uint32_t *)malloc(sizeof(uint32_t) * large_ds_size); VRFY((large_ds_buf_0 != NULL), "malloc of large_ds_buf_0 succeeded"); - large_ds_buf_1 = (uint32_t *)HDmalloc(sizeof(uint32_t) * large_ds_size); + large_ds_buf_1 = (uint32_t *)malloc(sizeof(uint32_t) * large_ds_size); VRFY((large_ds_buf_1 != NULL), "malloc of large_ds_buf_1 succeeded"); /* initialize the buffers */ @@ -2249,14 +2249,14 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ /* Free memory buffers */ if (small_ds_buf_0 != NULL) - HDfree(small_ds_buf_0); + free(small_ds_buf_0); if (small_ds_buf_1 != NULL) - HDfree(small_ds_buf_1); + free(small_ds_buf_1); if (large_ds_buf_0 != NULL) - HDfree(large_ds_buf_0); + free(large_ds_buf_0); if (large_ds_buf_1 != NULL) - HDfree(large_ds_buf_1); + free(large_ds_buf_1); return; diff --git a/testpar/t_subfiling_vfd.c b/testpar/t_subfiling_vfd.c index c30d551..f8043b1 100644 --- a/testpar/t_subfiling_vfd.c +++ b/testpar/t_subfiling_vfd.c @@ -322,8 +322,8 @@ test_config_file(void) VRFY((HDstat(SUBF_FILENAME, &file_info) >= 0), "HDstat succeeded"); - config_filename = HDmalloc(PATH_MAX); - VRFY(config_filename, "HDmalloc succeeded"); + config_filename = malloc(PATH_MAX); + VRFY(config_filename, "malloc succeeded"); HDsnprintf(config_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir, SUBF_FILENAME, (uint64_t)file_info.st_ino); @@ -331,7 +331,7 @@ test_config_file(void) config_file = HDfopen(config_filename, "r"); VRFY(config_file, "HDfopen succeeded"); - HDfree(config_filename); + free(config_filename); VRFY((HDfseek(config_file, 0, SEEK_END) >= 0), "HDfseek succeeded"); @@ -340,8 +340,8 @@ test_config_file(void) VRFY((HDfseek(config_file, 0, SEEK_SET) >= 0), "HDfseek succeeded"); - config_buf = HDmalloc((size_t)config_file_len + 1); - VRFY(config_buf, "HDmalloc succeeded"); + config_buf = malloc((size_t)config_file_len + 1); + VRFY(config_buf, "malloc succeeded"); VRFY((HDfread(config_buf, (size_t)config_file_len, 1, config_file) == 1), "HDfread succeeded"); config_buf[config_file_len] = '\0'; @@ -376,8 +376,8 @@ test_config_file(void) VRFY((H5_dirname(resolved_path, &subfile_dir) >= 0), "H5_dirname succeeded"); - tmp_buf = HDmalloc(PATH_MAX); - VRFY(tmp_buf, "HDmalloc succeeded"); + tmp_buf = malloc(PATH_MAX); + VRFY(tmp_buf, "malloc succeeded"); substr = HDstrstr(config_buf, "hdf5_file"); VRFY(substr, "HDstrstr succeeded"); @@ -395,12 +395,12 @@ test_config_file(void) VRFY((HDstrcmp(tmp_buf, subfile_dir) == 0), "HDstrcmp succeeded"); - HDfree(tmp_buf); + free(tmp_buf); H5MM_free(subfile_dir); - HDfree(resolved_path); + free(resolved_path); - subfile_name = HDmalloc(PATH_MAX); - VRFY(subfile_name, "HDmalloc succeeded"); + subfile_name = malloc(PATH_MAX); + VRFY(subfile_name, "malloc succeeded"); /* Verify the name of each subfile is in the configuration file */ num_digits = (int)(HDlog10(cfg.stripe_count) + 1); @@ -418,8 +418,8 @@ test_config_file(void) substr = HDstrstr(config_buf, subfile_name); VRFY(substr == NULL, "HDstrstr correctly failed"); - HDfree(subfile_name); - HDfree(config_buf); + free(subfile_name); + free(config_buf); VRFY((HDfclose(config_file) >= 0), "HDfclose on configuration file succeeded"); } @@ -462,8 +462,8 @@ test_stripe_sizes(void) if (MAINPROCESS) TESTING_2("random subfiling stripe sizes"); - tmp_filename = HDmalloc(PATH_MAX); - VRFY(tmp_filename, "HDmalloc succeeded"); + tmp_filename = malloc(PATH_MAX); + VRFY(tmp_filename, "malloc succeeded"); dxpl_id = H5Pcreate(H5P_DATASET_XFER); VRFY((dxpl_id >= 0), "DXPL creation succeeded"); @@ -511,8 +511,8 @@ test_stripe_sizes(void) nbytes = (size_t)(cfg.stripe_size * num_subfiles); - write_buf = HDmalloc(nbytes); - VRFY(write_buf, "HDmalloc succeeded"); + write_buf = malloc(nbytes); + VRFY(write_buf, "malloc succeeded"); HDmemset(write_buf, 255, nbytes); @@ -635,7 +635,7 @@ test_stripe_sizes(void) subfile_ptr = HDfopen(tmp_filename, "r"); VRFY(subfile_ptr == NULL, "HDfopen on subfile correctly failed"); - HDfree(write_buf); + free(write_buf); write_buf = NULL; VRFY((H5FDclose(file_ptr) >= 0), "H5FDclose succeeded"); @@ -673,8 +673,8 @@ test_stripe_sizes(void) nbytes = (size_t)(cfg.stripe_size * num_subfiles); - write_buf = HDmalloc(nbytes); - VRFY(write_buf, "HDmalloc succeeded"); + write_buf = malloc(nbytes); + VRFY(write_buf, "malloc succeeded"); HDmemset(write_buf, 255, nbytes); @@ -824,12 +824,12 @@ test_stripe_sizes(void) } H5E_END_TRY - HDfree(write_buf); + free(write_buf); VRFY((H5Pclose(fapl_id) >= 0), "FAPL close succeeded"); } - HDfree(tmp_filename); + free(tmp_filename); VRFY((H5Pclose(dxpl_id) >= 0), "DXPL close succeeded"); @@ -858,8 +858,8 @@ test_selection_strategies(void) if (MAINPROCESS) TESTING_2("I/O concentrator selection strategies"); - tmp_filename = HDmalloc(PATH_MAX); - VRFY(tmp_filename, "HDmalloc succeeded"); + tmp_filename = malloc(PATH_MAX); + VRFY(tmp_filename, "malloc succeeded"); for (H5FD_subfiling_ioc_select_t strategy = 0; strategy < ioc_selection_options; strategy++) { /* Skip 1 IOC per node strategy since we assume it's @@ -1024,7 +1024,7 @@ test_selection_strategies(void) mpi_code_g = MPI_Barrier(comm_g); VRFY((mpi_code_g == MPI_SUCCESS), "MPI_Barrier succeeded"); - HDfree(tmp_filename); + free(tmp_filename); CHECK_PASSED(); } @@ -1071,8 +1071,8 @@ test_read_different_stripe_size(void) if (MAINPROCESS) TESTING_2("file re-opening with different stripe size"); - tmp_filename = HDmalloc(PATH_MAX); - VRFY(tmp_filename, "HDmalloc succeeded"); + tmp_filename = malloc(PATH_MAX); + VRFY(tmp_filename, "malloc succeeded"); /* Use a 1MiB stripe size and a subfile for each IOC */ cfg.ioc_selection = SELECT_IOC_ONE_PER_NODE; @@ -1111,8 +1111,8 @@ test_read_different_stripe_size(void) VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) >= 0), "H5Sselect_hyperslab succeeded"); - buf = HDmalloc(count[0] * sizeof(SUBF_C_TYPE)); - VRFY(buf, "HDmalloc succeeded"); + buf = malloc(count[0] * sizeof(SUBF_C_TYPE)); + VRFY(buf, "malloc succeeded"); for (size_t i = 0; i < count[0]; i++) ((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((size_t)mpi_rank + i); @@ -1120,7 +1120,7 @@ test_read_different_stripe_size(void) VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0), "Dataset write succeeded"); - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded"); @@ -1181,8 +1181,8 @@ test_read_different_stripe_size(void) VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) >= 0), "H5Sselect_hyperslab succeeded"); - buf = HDcalloc(1, count[0] * sizeof(SUBF_C_TYPE)); - VRFY(buf, "HDcalloc succeeded"); + buf = calloc(1, count[0] * sizeof(SUBF_C_TYPE)); + VRFY(buf, "calloc succeeded"); VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0), "Dataset read succeeded"); @@ -1193,7 +1193,7 @@ test_read_different_stripe_size(void) VRFY((buf_value == (SUBF_C_TYPE)((size_t)mpi_rank + i)), "data verification succeeded"); } - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded"); @@ -1239,7 +1239,7 @@ test_read_different_stripe_size(void) VRFY((H5Pclose(dxpl_id) >= 0), "DXPL close succeeded"); VRFY((H5Pclose(fapl_id) >= 0), "FAPL close succeeded"); - HDfree(tmp_filename); + free(tmp_filename); CHECK_PASSED(); } @@ -1331,8 +1331,8 @@ test_subfiling_precreate_rank_0(void) H5Dcreate2(file_id, "DSET", SUBF_HDF5_TYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset creation succeeded"); - buf = HDmalloc(dset_dims[0] * sizeof(SUBF_C_TYPE)); - VRFY(buf, "HDmalloc succeeded"); + buf = malloc(dset_dims[0] * sizeof(SUBF_C_TYPE)); + VRFY(buf, "malloc succeeded"); for (size_t i = 0; i < dset_dims[0]; i++) ((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((i / n_elements_per_rank) + (i % n_elements_per_rank)); @@ -1340,7 +1340,7 @@ test_subfiling_precreate_rank_0(void) VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0), "Dataset write succeeded"); - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded"); @@ -1357,8 +1357,8 @@ test_subfiling_precreate_rank_0(void) VRFY((HDstat(SUBF_FILENAME, &file_info) >= 0), "HDstat succeeded"); - tmp_filename = HDmalloc(PATH_MAX); - VRFY(tmp_filename, "HDmalloc succeeded"); + tmp_filename = malloc(PATH_MAX); + VRFY(tmp_filename, "malloc succeeded"); for (int i = 0; i < num_subfiles; i++) { h5_stat_t subfile_info; @@ -1386,7 +1386,7 @@ test_subfiling_precreate_rank_0(void) subfile_ptr = HDfopen(tmp_filename, "r"); VRFY(subfile_ptr == NULL, "HDfopen on subfile correctly failed"); - HDfree(tmp_filename); + free(tmp_filename); tmp_filename = NULL; } @@ -1413,8 +1413,8 @@ test_subfiling_precreate_rank_0(void) VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) >= 0), "H5Sselect_hyperslab succeeded"); - buf = HDcalloc(1, count[0] * sizeof(SUBF_C_TYPE)); - VRFY(buf, "HDcalloc succeeded"); + buf = calloc(1, count[0] * sizeof(SUBF_C_TYPE)); + VRFY(buf, "calloc succeeded"); VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0), "Dataset read succeeded"); @@ -1425,7 +1425,7 @@ test_subfiling_precreate_rank_0(void) VRFY((buf_value == (SUBF_C_TYPE)((size_t)mpi_rank + i)), "data verification succeeded"); } - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded"); @@ -1522,8 +1522,8 @@ test_subfiling_write_many_read_one(void) VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) >= 0), "H5Sselect_hyperslab succeeded"); - buf = HDmalloc(count[0] * sizeof(SUBF_C_TYPE)); - VRFY(buf, "HDmalloc succeeded"); + buf = malloc(count[0] * sizeof(SUBF_C_TYPE)); + VRFY(buf, "malloc succeeded"); for (size_t i = 0; i < count[0]; i++) ((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((size_t)mpi_rank + i); @@ -1531,7 +1531,7 @@ test_subfiling_write_many_read_one(void) VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0), "Dataset write succeeded"); - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1550,8 +1550,8 @@ test_subfiling_write_many_read_one(void) dset_id = H5Dopen2(file_id, "DSET", H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); - buf = HDcalloc(1, target_size); - VRFY(buf, "HDcalloc succeeded"); + buf = calloc(1, target_size); + VRFY(buf, "calloc succeeded"); VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, H5S_ALL, dxpl_id, buf) >= 0), "Dataset read succeeded"); @@ -1564,7 +1564,7 @@ test_subfiling_write_many_read_one(void) } } - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1678,8 +1678,8 @@ test_subfiling_write_many_read_few(void) VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) >= 0), "H5Sselect_hyperslab succeeded"); - buf = HDmalloc(count[0] * sizeof(SUBF_C_TYPE)); - VRFY(buf, "HDmalloc succeeded"); + buf = malloc(count[0] * sizeof(SUBF_C_TYPE)); + VRFY(buf, "malloc succeeded"); for (size_t i = 0; i < count[0]; i++) ((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((size_t)mpi_rank + i); @@ -1687,7 +1687,7 @@ test_subfiling_write_many_read_few(void) VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0), "Dataset write succeeded"); - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1736,8 +1736,8 @@ test_subfiling_write_many_read_few(void) dset_id = H5Dopen2(file_id, "DSET", H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); - buf = HDcalloc(1, target_size); - VRFY(buf, "HDcalloc succeeded"); + buf = calloc(1, target_size); + VRFY(buf, "calloc succeeded"); VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, H5S_ALL, dxpl_id, buf) >= 0), "Dataset read succeeded"); @@ -1750,7 +1750,7 @@ test_subfiling_write_many_read_few(void) } } - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1903,8 +1903,8 @@ test_subfiling_h5fuse(void) VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) >= 0), "H5Sselect_hyperslab succeeded"); - buf = HDmalloc(count[0] * sizeof(SUBF_C_TYPE)); - VRFY(buf, "HDmalloc succeeded"); + buf = malloc(count[0] * sizeof(SUBF_C_TYPE)); + VRFY(buf, "malloc succeeded"); for (size_t i = 0; i < count[0]; i++) ((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((size_t)mpi_rank + i); @@ -1912,7 +1912,7 @@ test_subfiling_h5fuse(void) VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0), "Dataset write succeeded"); - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded"); @@ -1931,8 +1931,8 @@ test_subfiling_h5fuse(void) char *tmp_filename; char *args[7]; - tmp_filename = HDmalloc(PATH_MAX); - VRFY(tmp_filename, "HDmalloc succeeded"); + tmp_filename = malloc(PATH_MAX); + VRFY(tmp_filename, "malloc succeeded"); /* Generate name for configuration file */ HDsnprintf(tmp_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir, @@ -1980,8 +1980,8 @@ test_subfiling_h5fuse(void) dset_id = H5Dopen2(file_id, "DSET", H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); - buf = HDcalloc(1, target_size); - VRFY(buf, "HDcalloc succeeded"); + buf = calloc(1, target_size); + VRFY(buf, "calloc succeeded"); VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, H5S_ALL, dxpl_id, buf) >= 0), "Dataset read succeeded"); @@ -1994,7 +1994,7 @@ test_subfiling_h5fuse(void) } } - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -2024,8 +2024,8 @@ test_subfiling_h5fuse(void) } H5E_END_TRY; - filename_buf = HDmalloc(PATH_MAX); - VRFY(filename_buf, "HDmalloc succeeded"); + filename_buf = malloc(PATH_MAX); + VRFY(filename_buf, "malloc succeeded"); /* Generate name for configuration file */ HDsnprintf(filename_buf, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir, @@ -2049,7 +2049,7 @@ test_subfiling_h5fuse(void) } } - HDfree(filename_buf); + free(filename_buf); } VRFY((H5Pclose(fapl_id) >= 0), "FAPL close succeeded"); @@ -2248,7 +2248,7 @@ main(int argc, char **argv) printf("Using seed: %u\n\n", seed); /* Allocate buffer for possible config file directory specified */ - config_dir = HDmalloc(PATH_MAX); + config_dir = malloc(PATH_MAX); if (!config_dir) { if (MAINPROCESS) printf("couldn't allocate space for subfiling config file directory buffer\n"); diff --git a/testpar/t_vfd.c b/testpar/t_vfd.c index 88e6db1..d4ca277 100644 --- a/testpar/t_vfd.c +++ b/testpar/t_vfd.c @@ -141,11 +141,11 @@ alloc_and_init_file_images(int mpi_size) buf_len = INTS_PER_RANK * mpi_size; buf_size = sizeof(int32_t) * (size_t)INTS_PER_RANK * (size_t)mpi_size; - increasing_fi_buf = (int32_t *)HDmalloc(buf_size); - decreasing_fi_buf = (int32_t *)HDmalloc(buf_size); - negative_fi_buf = (int32_t *)HDmalloc(buf_size); - zero_fi_buf = (int32_t *)HDmalloc(buf_size); - read_fi_buf = (int32_t *)HDmalloc(buf_size); + increasing_fi_buf = (int32_t *)malloc(buf_size); + decreasing_fi_buf = (int32_t *)malloc(buf_size); + negative_fi_buf = (int32_t *)malloc(buf_size); + zero_fi_buf = (int32_t *)malloc(buf_size); + read_fi_buf = (int32_t *)malloc(buf_size); if ((!increasing_fi_buf) || (!decreasing_fi_buf) || (!negative_fi_buf) || (!zero_fi_buf) || (!read_fi_buf)) { @@ -203,31 +203,31 @@ free_file_images(void) { if (increasing_fi_buf) { - HDfree(increasing_fi_buf); + free(increasing_fi_buf); increasing_fi_buf = NULL; } if (decreasing_fi_buf) { - HDfree(decreasing_fi_buf); + free(decreasing_fi_buf); decreasing_fi_buf = NULL; } if (negative_fi_buf) { - HDfree(negative_fi_buf); + free(negative_fi_buf); negative_fi_buf = NULL; } if (zero_fi_buf) { - HDfree(zero_fi_buf); + free(zero_fi_buf); zero_fi_buf = NULL; } if (read_fi_buf) { - HDfree(read_fi_buf); + free(read_fi_buf); read_fi_buf = NULL; } diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c index f83bd4e..dc28cc9 100644 --- a/testpar/testphdf5.c +++ b/testpar/testphdf5.c @@ -336,7 +336,7 @@ main(int argc, char **argv) HDmemset(filenames, 0, sizeof(filenames)); for (int i = 0; i < NFILENAME; i++) { - if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) { + if (NULL == (filenames[i] = malloc(PATH_MAX))) { printf("couldn't allocate filename array\n"); MPI_Abort(MPI_COMM_WORLD, -1); } @@ -554,7 +554,7 @@ main(int argc, char **argv) } for (int i = 0; i < NFILENAME; i++) { - HDfree(filenames[i]); + free(filenames[i]); filenames[i] = NULL; } |