diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-07-27 20:43:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 20:43:30 (GMT) |
commit | 1e91d96fa02466ffe451319bdac1005f84dc7993 (patch) | |
tree | 4de04ef502c313dfd766497b20235188761146c0 /testpar/API | |
parent | 95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff) | |
download | hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2 |
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'testpar/API')
25 files changed, 2153 insertions, 2183 deletions
diff --git a/testpar/API/H5_api_async_test_parallel.c b/testpar/API/H5_api_async_test_parallel.c index 663e690..d6f55b1 100644 --- a/testpar/API/H5_api_async_test_parallel.c +++ b/testpar/API/H5_api_async_test_parallel.c @@ -84,7 +84,7 @@ test_one_dataset_io(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) { if (MAINPROCESS) { SKIPPED(); - HDprintf( + printf( " API functions for basic file, dataset, or flush aren't supported with this connector\n"); } @@ -125,15 +125,15 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); TEST_ERROR; } @@ -154,7 +154,7 @@ test_one_dataset_io(void) if (H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't select hyperslab for dataset write\n"); + printf(" couldn't select hyperslab for dataset write\n"); goto error; } @@ -164,7 +164,7 @@ test_one_dataset_io(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); goto error; } } @@ -206,7 +206,7 @@ test_one_dataset_io(void) for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); PART_ERROR(single_dset_eswait); } /* end if */ @@ -247,7 +247,7 @@ test_one_dataset_io(void) for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); PART_ERROR(single_dset_dclose); } /* end if */ @@ -292,7 +292,7 @@ test_one_dataset_io(void) for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); PART_ERROR(single_dset_dflush); } /* end if */ @@ -345,7 +345,7 @@ test_one_dataset_io(void) for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); PART_ERROR(single_dset_fclose); } /* end if */ @@ -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); @@ -449,7 +449,7 @@ test_multi_dataset_io(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) { if (MAINPROCESS) { SKIPPED(); - HDprintf( + printf( " API functions for basic file, dataset, or flush aren't supported with this connector\n"); } @@ -483,15 +483,15 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); TEST_ERROR; } @@ -512,7 +512,7 @@ test_multi_dataset_io(void) if (H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't select hyperslab for dataset write\n"); + printf(" couldn't select hyperslab for dataset write\n"); goto error; } @@ -522,7 +522,7 @@ test_multi_dataset_io(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); goto error; } } @@ -587,7 +587,7 @@ test_multi_dataset_io(void) for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); PART_ERROR(multi_dset_open); } /* end if */ @@ -668,7 +668,7 @@ test_multi_dataset_io(void) for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); PART_ERROR(multi_dset_close); } /* end if */ @@ -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++) @@ -775,7 +775,7 @@ test_multi_file_dataset_io(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) { if (MAINPROCESS) { SKIPPED(); - HDprintf( + printf( " API functions for basic file, dataset, or flush aren't supported with this connector\n"); } @@ -805,15 +805,15 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); TEST_ERROR; } @@ -834,7 +834,7 @@ test_multi_file_dataset_io(void) if (H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't select hyperslab for dataset write\n"); + printf(" couldn't select hyperslab for dataset write\n"); goto error; } @@ -844,7 +844,7 @@ test_multi_file_dataset_io(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); goto error; } } @@ -919,7 +919,7 @@ test_multi_file_dataset_io(void) for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); PART_ERROR(multi_file_dset_open); } /* end if */ @@ -994,7 +994,7 @@ test_multi_file_dataset_io(void) for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); PART_ERROR(multi_file_dset_dclose); } /* end if */ @@ -1092,7 +1092,7 @@ test_multi_file_dataset_io(void) for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); PART_ERROR(multi_file_dset_fclose); } /* end if */ @@ -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++) { @@ -1198,7 +1198,7 @@ test_multi_file_grp_dset_io(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { if (MAINPROCESS) { SKIPPED(); - HDprintf( + printf( " API functions for basic file, group, or dataset aren't supported with this connector\n"); } @@ -1228,15 +1228,15 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); TEST_ERROR; } @@ -1257,7 +1257,7 @@ test_multi_file_grp_dset_io(void) if (H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't select hyperslab for dataset write\n"); + printf(" couldn't select hyperslab for dataset write\n"); goto error; } @@ -1267,7 +1267,7 @@ test_multi_file_grp_dset_io(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); goto error; } } @@ -1382,7 +1382,7 @@ test_multi_file_grp_dset_io(void) for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); PART_ERROR(multi_file_grp_dset_no_kick); } /* end if */ @@ -1508,7 +1508,7 @@ test_multi_file_grp_dset_io(void) for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); PART_ERROR(multi_file_grp_dset_kick); } /* end if */ @@ -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); @@ -1619,8 +1619,8 @@ test_set_extent(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAINPROCESS) { SKIPPED(); - HDprintf(" API functions for basic file, dataset, dataset more, or flush aren't supported " - "with this connector\n"); + printf(" API functions for basic file, dataset, dataset more, or flush aren't supported " + "with this connector\n"); } return 0; @@ -1633,15 +1633,15 @@ 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(); - HDprintf(" couldn't allocate max dataspace dimension buffer\n"); + 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(); - HDprintf(" couldn't allocate chunk dimension buffer\n"); + printf(" couldn't allocate chunk dimension buffer\n"); TEST_ERROR; } @@ -1685,15 +1685,15 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); TEST_ERROR; } @@ -1714,7 +1714,7 @@ test_set_extent(void) if (H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't select hyperslab for dataset write\n"); + printf(" couldn't select hyperslab for dataset write\n"); goto error; } @@ -1724,7 +1724,7 @@ test_set_extent(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); goto error; } } @@ -1766,7 +1766,7 @@ test_set_extent(void) if (H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't select hyperslab for dataset write\n"); + printf(" couldn't select hyperslab for dataset write\n"); goto error; } @@ -1821,7 +1821,7 @@ test_set_extent(void) for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); - HDprintf(" data verification failed, expected %d but got %d\n", write_buf[i], read_buf[i]); + printf(" data verification failed, expected %d but got %d\n", write_buf[i], read_buf[i]); goto error; } /* end if */ @@ -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); @@ -1952,8 +1952,8 @@ test_attribute_exists(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) { if (MAINPROCESS) { SKIPPED(); - HDprintf(" API functions for basic file, dataset, dataset more, attribute, or flush aren't " - "supported with this connector\n"); + printf(" API functions for basic file, dataset, dataset more, attribute, or flush aren't " + "supported with this connector\n"); } return 0; @@ -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); @@ -2105,8 +2105,8 @@ test_attribute_io(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) { if (MAINPROCESS) { SKIPPED(); - HDprintf(" API functions for basic file, dataset, dataset more, attribute, or flush aren't " - "supported with this connector\n"); + printf(" API functions for basic file, dataset, dataset more, attribute, or flush aren't " + "supported with this connector\n"); } return 0; @@ -2150,15 +2150,15 @@ 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(); - HDprintf(" couldn't allocate buffer for attribute write\n"); + 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(); - HDprintf(" couldn't allocate buffer for attribute read\n"); + printf(" couldn't allocate buffer for attribute read\n"); TEST_ERROR; } @@ -2191,7 +2191,7 @@ test_attribute_io(void) for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); goto error; } /* end if */ @@ -2217,7 +2217,7 @@ test_attribute_io(void) for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); goto error; } /* end if */ @@ -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); @@ -2312,8 +2312,8 @@ test_attribute_io_tconv(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) { if (MAINPROCESS) { SKIPPED(); - HDprintf(" API functions for basic file, attribute, or flush aren't supported with this " - "connector\n"); + printf(" API functions for basic file, attribute, or flush aren't supported with this " + "connector\n"); } return 0; @@ -2348,15 +2348,15 @@ 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(); - HDprintf(" couldn't allocate buffer for attribute write\n"); + 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(); - HDprintf(" couldn't allocate buffer for attribute read\n"); + printf(" couldn't allocate buffer for attribute read\n"); TEST_ERROR; } @@ -2387,7 +2387,7 @@ test_attribute_io_tconv(void) for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); goto error; } /* end if */ @@ -2414,7 +2414,7 @@ test_attribute_io_tconv(void) for (i = 0; i < data_size / sizeof(int); i++) if (write_buf[i] != read_buf[i]) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); goto error; } /* end if */ @@ -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); @@ -2516,8 +2516,8 @@ test_attribute_io_compound(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_ATTR_BASIC)) { if (MAINPROCESS) { SKIPPED(); - HDprintf(" API functions for basic file, dataset, dataset more, attribute, or flush aren't " - "supported with this connector\n"); + printf(" API functions for basic file, dataset, dataset more, attribute, or flush aren't " + "supported with this connector\n"); } return 0; @@ -2577,21 +2577,21 @@ 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(); - HDprintf(" couldn't allocate buffer for attribute write\n"); + 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(); - HDprintf(" couldn't allocate buffer for attribute read\n"); + 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(); - HDprintf(" couldn't allocate buffer for attribute read verification\n"); + printf(" couldn't allocate buffer for attribute read verification\n"); TEST_ERROR; } @@ -2630,12 +2630,12 @@ test_attribute_io_compound(void) for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) { if (read_buf[i].a != fbuf[i].a) { H5_FAILED(); - HDprintf(" data verification failed for field 'a'\n"); + printf(" data verification failed for field 'a'\n"); goto error; } /* end if */ if (read_buf[i].b != fbuf[i].b) { H5_FAILED(); - HDprintf(" data verification failed for field 'b'\n"); + printf(" data verification failed for field 'b'\n"); goto error; } /* end if */ } @@ -2660,12 +2660,12 @@ test_attribute_io_compound(void) for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) { if (read_buf[i].a != fbuf[i].a) { H5_FAILED(); - HDprintf(" data verification failed for field 'a'\n"); + printf(" data verification failed for field 'a'\n"); goto error; } /* end if */ if (read_buf[i].b != -2) { H5_FAILED(); - HDprintf(" data verification failed for field 'b'\n"); + printf(" data verification failed for field 'b'\n"); goto error; } /* end if */ } @@ -2690,19 +2690,19 @@ test_attribute_io_compound(void) for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) { if (read_buf[i].a != -2) { H5_FAILED(); - HDprintf(" data verification failed for field 'a'\n"); + printf(" data verification failed for field 'a'\n"); goto error; } /* end if */ if (read_buf[i].b != fbuf[i].b) { H5_FAILED(); - HDprintf(" data verification failed for field 'b'\n"); + printf(" data verification failed for field 'b'\n"); goto error; } /* end if */ } if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { H5_FAILED(); - HDprintf(" MPI_Barrier failed\n"); + printf(" MPI_Barrier failed\n"); goto error; } @@ -2746,19 +2746,19 @@ test_attribute_io_compound(void) for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) { if (read_buf[i].a != fbuf[i].a) { H5_FAILED(); - HDprintf(" data verification failed for field 'a'\n"); + printf(" data verification failed for field 'a'\n"); goto error; } /* end if */ if (read_buf[i].b != fbuf[i].b) { H5_FAILED(); - HDprintf(" data verification failed for field 'b'\n"); + printf(" data verification failed for field 'b'\n"); goto error; } /* end if */ } if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { H5_FAILED(); - HDprintf(" MPI_Barrier failed\n"); + printf(" MPI_Barrier failed\n"); goto error; } @@ -2802,12 +2802,12 @@ test_attribute_io_compound(void) for (i = 0; i < data_size / sizeof(tattr_cmpd_t); i++) { if (read_buf[i].a != fbuf[i].a) { H5_FAILED(); - HDprintf(" data verification failed for field 'a'\n"); + printf(" data verification failed for field 'a'\n"); goto error; } /* end if */ if (read_buf[i].b != fbuf[i].b) { H5_FAILED(); - HDprintf(" data verification failed for field 'b'\n"); + printf(" data verification failed for field 'b'\n"); goto error; } /* end if */ } @@ -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); @@ -2916,8 +2916,8 @@ test_group(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) { if (MAINPROCESS) { SKIPPED(); - HDprintf(" API functions for basic file, group, group more or flush aren't " - "supported with this connector\n"); + printf(" API functions for basic file, group, group more or flush aren't " + "supported with this connector\n"); } return 0; @@ -3098,8 +3098,8 @@ test_link(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_CREATION_ORDER)) { if (MAINPROCESS) { SKIPPED(); - HDprintf(" API functions for basic file, link, hard link, soft link, flush, or creation order " - "aren't supported with this connector\n"); + printf(" API functions for basic file, link, hard link, soft link, flush, or creation order " + "aren't supported with this connector\n"); } return 0; @@ -3179,7 +3179,7 @@ test_link(void) if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { H5_FAILED(); - HDprintf(" MPI_Barrier failed\n"); + printf(" MPI_Barrier failed\n"); goto error; } @@ -3218,7 +3218,7 @@ test_link(void) if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { H5_FAILED(); - HDprintf(" MPI_Barrier failed\n"); + printf(" MPI_Barrier failed\n"); goto error; } @@ -3256,7 +3256,7 @@ test_link(void) if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { H5_FAILED(); - HDprintf(" MPI_Barrier failed\n"); + printf(" MPI_Barrier failed\n"); goto error; } @@ -3353,8 +3353,8 @@ test_ocopy_orefresh(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_FLUSH_REFRESH)) { if (MAINPROCESS) { SKIPPED(); - HDprintf(" API functions for basic file, group, dataset, object more, flush, or refresh " - "aren't supported with this connector\n"); + printf(" API functions for basic file, group, dataset, object more, flush, or refresh " + "aren't supported with this connector\n"); } return 0; @@ -3423,7 +3423,7 @@ test_ocopy_orefresh(void) if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { H5_FAILED(); - HDprintf(" MPI_Barrier failed\n"); + printf(" MPI_Barrier failed\n"); goto error; } } @@ -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); @@ -3508,7 +3508,7 @@ test_file_reopen(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_MORE)) { if (MAINPROCESS) { SKIPPED(); - HDprintf(" API functions for basic file or file more aren't supported with this connector\n"); + printf(" API functions for basic file or file more aren't supported with this connector\n"); } return 0; @@ -3595,17 +3595,17 @@ H5_api_async_test_parallel(void) int nerrors; if (MAINPROCESS) { - HDprintf("**********************************************\n"); - HDprintf("* *\n"); - HDprintf("* API Parallel Async Tests *\n"); - HDprintf("* *\n"); - HDprintf("**********************************************\n\n"); + printf("**********************************************\n"); + printf("* *\n"); + printf("* API Parallel Async Tests *\n"); + printf("* *\n"); + printf("**********************************************\n\n"); } if (!(vol_cap_flags_g & H5VL_CAP_FLAG_ASYNC)) { if (MAINPROCESS) { SKIPPED(); - HDprintf(" Async APIs aren't supported with this connector\n"); + printf(" Async APIs aren't supported with this connector\n"); } return 0; @@ -3616,19 +3616,19 @@ H5_api_async_test_parallel(void) if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { if (MAINPROCESS) - HDprintf(" MPI_Barrier() failed!\n"); + printf(" MPI_Barrier() failed!\n"); } } if (MAINPROCESS) { - HDprintf("\n"); - HDprintf("Cleaning up testing files\n"); + printf("\n"); + printf("Cleaning up testing files\n"); } cleanup_files(); if (MAINPROCESS) { - HDprintf("\n * Re-testing with independent metadata reads *\n"); + printf("\n * Re-testing with independent metadata reads *\n"); } coll_metadata_read = FALSE; @@ -3638,13 +3638,13 @@ H5_api_async_test_parallel(void) if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { if (MAINPROCESS) - HDprintf(" MPI_Barrier() failed!\n"); + printf(" MPI_Barrier() failed!\n"); } } if (MAINPROCESS) { - HDprintf("\n"); - HDprintf("Cleaning up testing files\n"); + printf("\n"); + printf("Cleaning up testing files\n"); } cleanup_files(); @@ -3658,14 +3658,14 @@ int H5_api_async_test_parallel(void) { if (MAINPROCESS) { - HDprintf("**********************************************\n"); - HDprintf("* *\n"); - HDprintf("* API Parallel Async Tests *\n"); - HDprintf("* *\n"); - HDprintf("**********************************************\n\n"); + printf("**********************************************\n"); + printf("* *\n"); + printf("* API Parallel Async Tests *\n"); + printf("* *\n"); + printf("**********************************************\n\n"); } - HDprintf("SKIPPED due to no async support in HDF5 library\n"); + printf("SKIPPED due to no async support in HDF5 library\n"); return 0; } diff --git a/testpar/API/H5_api_attribute_test_parallel.c b/testpar/API/H5_api_attribute_test_parallel.c index cffbfcd..a941b9a 100644 --- a/testpar/API/H5_api_attribute_test_parallel.c +++ b/testpar/API/H5_api_attribute_test_parallel.c @@ -24,11 +24,11 @@ H5_api_attribute_test_parallel(void) int nerrors; if (MAINPROCESS) { - HDprintf("**********************************************\n"); - HDprintf("* *\n"); - HDprintf("* API Parallel Attribute Tests *\n"); - HDprintf("* *\n"); - HDprintf("**********************************************\n\n"); + printf("**********************************************\n"); + printf("* *\n"); + printf("* API Parallel Attribute Tests *\n"); + printf("* *\n"); + printf("**********************************************\n\n"); } for (i = 0, nerrors = 0; i < ARRAY_LENGTH(par_attribute_tests); i++) { @@ -36,12 +36,12 @@ H5_api_attribute_test_parallel(void) if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { if (MAINPROCESS) - HDprintf(" MPI_Barrier() failed!\n"); + printf(" MPI_Barrier() failed!\n"); } } if (MAINPROCESS) - HDprintf("\n"); + printf("\n"); return nerrors; } diff --git a/testpar/API/H5_api_dataset_test_parallel.c b/testpar/API/H5_api_dataset_test_parallel.c index fd02a7f..6f9bf05 100644 --- a/testpar/API/H5_api_dataset_test_parallel.c +++ b/testpar/API/H5_api_dataset_test_parallel.c @@ -115,8 +115,7 @@ test_write_dataset_data_verification(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); + printf(" API functions for basic file, group, or dataset aren't supported with this connector\n"); return 0; } @@ -127,20 +126,20 @@ test_write_dataset_data_verification(void) if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME); goto error; } @@ -154,7 +153,7 @@ test_write_dataset_data_verification(void) DATASET_WRITE_DATA_VERIFY_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1); + printf(" couldn't create dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1); goto error; } H5E_BEGIN_TRY @@ -168,7 +167,7 @@ test_write_dataset_data_verification(void) DATASET_WRITE_DATA_VERIFY_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2); + printf(" couldn't create dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2); goto error; } H5E_BEGIN_TRY @@ -182,7 +181,7 @@ test_write_dataset_data_verification(void) DATASET_WRITE_DATA_VERIFY_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3); + printf(" couldn't create dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3); goto error; } H5E_BEGIN_TRY @@ -204,7 +203,7 @@ test_write_dataset_data_verification(void) if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1); + printf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1); PART_ERROR(H5Dwrite_all_read); } @@ -216,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; @@ -228,7 +227,7 @@ test_write_dataset_data_verification(void) op_failed = TRUE; if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } } @@ -236,13 +235,13 @@ test_write_dataset_data_verification(void) if (MPI_SUCCESS != MPI_Allreduce(MPI_IN_PLACE, &op_failed, 1, MPI_C_BOOL, MPI_LAND, MPI_COMM_WORLD)) { H5_FAILED(); - HDprintf(" couldn't determine if dataset write on rank 0 succeeded\n"); + printf(" couldn't determine if dataset write on rank 0 succeeded\n"); PART_ERROR(H5Dwrite_all_read); } if (op_failed == TRUE) { H5_FAILED(); - HDprintf(" dataset write on rank 0 failed!\n"); + printf(" dataset write on rank 0 failed!\n"); PART_ERROR(H5Dwrite_all_read); } @@ -268,78 +267,78 @@ test_write_dataset_data_verification(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); PART_ERROR(H5Dwrite_all_read); } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); PART_ERROR(H5Dwrite_all_read); } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); PART_ERROR(H5Dwrite_all_read); } if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); PART_ERROR(H5Dwrite_all_read); } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); PART_ERROR(H5Dwrite_all_read); } if ((group_id = H5Gopen2(container_group, DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME); PART_ERROR(H5Dwrite_all_read); } if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1); + printf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1); PART_ERROR(H5Dwrite_all_read); } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); PART_ERROR(H5Dwrite_all_read); } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); PART_ERROR(H5Dwrite_all_read); } 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); PART_ERROR(H5Dwrite_all_read); } if (H5Dread(dset_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1); + printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME1); PART_ERROR(H5Dwrite_all_read); } for (i = 0; i < (hsize_t)space_npoints; i++) if (((int *)read_buf)[i] != (int)i) { H5_FAILED(); - HDprintf(" H5S_ALL selection data verification failed\n"); + printf(" H5S_ALL selection data verification failed\n"); PART_ERROR(H5Dwrite_all_read); } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } @@ -348,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) { @@ -380,9 +379,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); PART_ERROR(H5Dwrite_hyperslab_read); } @@ -409,19 +408,19 @@ test_write_dataset_data_verification(void) if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2); + printf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2); PART_ERROR(H5Dwrite_hyperslab_read); } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); PART_ERROR(H5Dwrite_hyperslab_read); } if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't select hyperslab for dataset write\n"); + printf(" couldn't select hyperslab for dataset write\n"); PART_ERROR(H5Dwrite_hyperslab_read); } @@ -430,7 +429,7 @@ test_write_dataset_data_verification(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); PART_ERROR(H5Dwrite_hyperslab_read); } } @@ -438,12 +437,12 @@ test_write_dataset_data_verification(void) if (H5Dwrite(dset_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2); + printf(" couldn't write to dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2); PART_ERROR(H5Dwrite_hyperslab_read); } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -476,66 +475,66 @@ test_write_dataset_data_verification(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); PART_ERROR(H5Dwrite_hyperslab_read); } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); PART_ERROR(H5Dwrite_hyperslab_read); } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); PART_ERROR(H5Dwrite_hyperslab_read); } if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); PART_ERROR(H5Dwrite_hyperslab_read); } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); PART_ERROR(H5Dwrite_hyperslab_read); } if ((group_id = H5Gopen2(container_group, DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME); PART_ERROR(H5Dwrite_hyperslab_read); } if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2); + printf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2); PART_ERROR(H5Dwrite_hyperslab_read); } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); PART_ERROR(H5Dwrite_hyperslab_read); } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); PART_ERROR(H5Dwrite_hyperslab_read); } 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); PART_ERROR(H5Dwrite_hyperslab_read); } if (H5Dread(dset_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2); + printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME2); PART_ERROR(H5Dwrite_hyperslab_read); } @@ -547,14 +546,14 @@ test_write_dataset_data_verification(void) read_buf)[j + (i * (data_size / DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE))] != (int)i) { H5_FAILED(); - HDprintf(" hyperslab selection data verification failed\n"); + printf(" hyperslab selection data verification failed\n"); PART_ERROR(H5Dwrite_hyperslab_read); } } } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } @@ -563,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) { @@ -603,9 +602,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); PART_ERROR(H5Dwrite_point_sel_read); } @@ -613,11 +612,11 @@ 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(); - HDprintf(" couldn't allocate buffer for point selection\n"); + printf(" couldn't allocate buffer for point selection\n"); PART_ERROR(H5Dwrite_point_sel_read); } @@ -642,20 +641,20 @@ test_write_dataset_data_verification(void) if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3); + printf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3); PART_ERROR(H5Dwrite_point_sel_read); } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); PART_ERROR(H5Dwrite_point_sel_read); } if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, data_size / DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE, points) < 0) { H5_FAILED(); - HDprintf(" couldn't select elements in dataspace\n"); + printf(" couldn't select elements in dataspace\n"); PART_ERROR(H5Dwrite_point_sel_read); } @@ -664,7 +663,7 @@ test_write_dataset_data_verification(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); PART_ERROR(H5Dwrite_point_sel_read); } } @@ -672,12 +671,12 @@ test_write_dataset_data_verification(void) if (H5Dwrite(dset_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3); + printf(" couldn't write to dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3); PART_ERROR(H5Dwrite_point_sel_read); } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -710,66 +709,66 @@ test_write_dataset_data_verification(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); PART_ERROR(H5Dwrite_point_sel_read); } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); PART_ERROR(H5Dwrite_point_sel_read); } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); PART_ERROR(H5Dwrite_point_sel_read); } if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); PART_ERROR(H5Dwrite_point_sel_read); } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); PART_ERROR(H5Dwrite_point_sel_read); } if ((group_id = H5Gopen2(container_group, DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_WRITE_DATA_VERIFY_TEST_GROUP_NAME); PART_ERROR(H5Dwrite_point_sel_read); } if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3); + printf(" couldn't open dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3); PART_ERROR(H5Dwrite_point_sel_read); } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); PART_ERROR(H5Dwrite_point_sel_read); } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); PART_ERROR(H5Dwrite_point_sel_read); } 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); PART_ERROR(H5Dwrite_point_sel_read); } if (H5Dread(dset_id, DATASET_WRITE_DATA_VERIFY_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3); + printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_DATA_VERIFY_TEST_DSET_NAME3); PART_ERROR(H5Dwrite_point_sel_read); } @@ -781,14 +780,14 @@ test_write_dataset_data_verification(void) read_buf)[j + (i * (data_size / DATASET_WRITE_DATA_VERIFY_TEST_DTYPE_SIZE))] != (mpi_size - (int)i)) { H5_FAILED(); - HDprintf(" point selection data verification failed\n"); + printf(" point selection data verification failed\n"); PART_ERROR(H5Dwrite_point_sel_read); } } } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } @@ -797,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) { @@ -838,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; } @@ -874,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); @@ -933,8 +932,7 @@ test_write_dataset_independent(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); + printf(" API functions for basic file, group, or dataset aren't supported with this connector\n"); return 0; } @@ -943,20 +941,20 @@ test_write_dataset_independent(void) if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gcreate2(container_group, DATASET_INDEPENDENT_WRITE_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_GROUP_NAME); goto error; } @@ -975,14 +973,14 @@ test_write_dataset_independent(void) DATASET_INDEPENDENT_WRITE_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" failed to create first dataset\n"); + printf(" failed to create first dataset\n"); goto error; } if ((dset_id2 = H5Dcreate2(group_id, DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME2, DATASET_INDEPENDENT_WRITE_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" failed to create second dataset\n"); + printf(" failed to create second dataset\n"); goto error; } @@ -990,9 +988,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); goto error; } @@ -1015,7 +1013,7 @@ test_write_dataset_independent(void) if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't select hyperslab for dataset write\n"); + printf(" couldn't select hyperslab for dataset write\n"); goto error; } @@ -1024,7 +1022,7 @@ test_write_dataset_independent(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); goto error; } } @@ -1040,13 +1038,13 @@ test_write_dataset_independent(void) if (H5Dwrite(dset_id1, DATASET_INDEPENDENT_WRITE_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" even ranks failed to write to dataset 1\n"); + printf(" even ranks failed to write to dataset 1\n"); INDEPENDENT_OP_ERROR(dset_write); } if (H5Dwrite(dset_id2, DATASET_INDEPENDENT_WRITE_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" even ranks failed to write to dataset 2\n"); + printf(" even ranks failed to write to dataset 2\n"); INDEPENDENT_OP_ERROR(dset_write); } } @@ -1054,13 +1052,13 @@ test_write_dataset_independent(void) if (H5Dwrite(dset_id2, DATASET_INDEPENDENT_WRITE_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" odd ranks failed to write to dataset 2\n"); + printf(" odd ranks failed to write to dataset 2\n"); INDEPENDENT_OP_ERROR(dset_write); } if (H5Dwrite(dset_id1, DATASET_INDEPENDENT_WRITE_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" odd ranks failed to write to dataset 1\n"); + printf(" odd ranks failed to write to dataset 1\n"); INDEPENDENT_OP_ERROR(dset_write); } } @@ -1068,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; } @@ -1086,43 +1084,43 @@ test_write_dataset_independent(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); goto error; } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); goto error; } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); goto error; } if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_INDEPENDENT_WRITE_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_GROUP_NAME); goto error; } if ((dset_id1 = H5Dopen2(group_id, DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME1, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME1); + printf(" couldn't open dataset '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME1); goto error; } if ((dset_id2 = H5Dopen2(group_id, DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME2, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME2); + printf(" couldn't open dataset '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME2); goto error; } @@ -1131,26 +1129,26 @@ test_write_dataset_independent(void) */ if ((fspace_id = H5Dget_space(dset_id1)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); goto error; } if (H5Dread(dset_id1, DATASET_INDEPENDENT_WRITE_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME1); + printf(" couldn't read from dataset '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME1); goto error; } @@ -1161,7 +1159,7 @@ test_write_dataset_independent(void) if (((int *)read_buf)[j + (i * (data_size / DATASET_INDEPENDENT_WRITE_TEST_DTYPE_SIZE))] != (int)i) { H5_FAILED(); - HDprintf(" dataset 1 data verification failed\n"); + printf(" dataset 1 data verification failed\n"); goto error; } } @@ -1170,7 +1168,7 @@ test_write_dataset_independent(void) if (H5Dread(dset_id2, DATASET_INDEPENDENT_WRITE_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME2); + printf(" couldn't read from dataset '%s'\n", DATASET_INDEPENDENT_WRITE_TEST_DSET_NAME2); goto error; } @@ -1181,19 +1179,19 @@ test_write_dataset_independent(void) if (((int *)read_buf)[j + (i * (data_size / DATASET_INDEPENDENT_WRITE_TEST_DTYPE_SIZE))] != (int)i) { H5_FAILED(); - HDprintf(" dataset 2 data verification failed\n"); + printf(" dataset 2 data verification failed\n"); goto error; } } } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -1220,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); @@ -1273,8 +1271,7 @@ test_write_dataset_one_proc_0_selection(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); + printf(" API functions for basic file, group, or dataset aren't supported with this connector\n"); return 0; } @@ -1283,21 +1280,21 @@ test_write_dataset_one_proc_0_selection(void) if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_ONE_PROC_0_SEL_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_WRITE_ONE_PROC_0_SEL_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_WRITE_ONE_PROC_0_SEL_TEST_GROUP_NAME); goto error; } @@ -1311,7 +1308,7 @@ test_write_dataset_one_proc_0_selection(void) DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME); goto error; } @@ -1322,9 +1319,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(write_buf_alloc); } @@ -1350,7 +1347,7 @@ test_write_dataset_one_proc_0_selection(void) if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't select hyperslab for dataset write\n"); + printf(" couldn't select hyperslab for dataset write\n"); goto error; } @@ -1362,7 +1359,7 @@ test_write_dataset_one_proc_0_selection(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); goto error; } } @@ -1372,14 +1369,14 @@ test_write_dataset_one_proc_0_selection(void) if (H5Dwrite(dset_id, DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_write); } } END_INDEPENDENT_OP(dset_write); if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -1412,66 +1409,64 @@ test_write_dataset_one_proc_0_selection(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); goto error; } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); goto error; } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); goto error; } if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_WRITE_ONE_PROC_0_SEL_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_WRITE_ONE_PROC_0_SEL_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", DATASET_WRITE_ONE_PROC_0_SEL_TEST_GROUP_NAME); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); goto error; } if (H5Dread(dset_id, DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ONE_PROC_0_SEL_TEST_DSET_NAME); goto error; } @@ -1483,7 +1478,7 @@ test_write_dataset_one_proc_0_selection(void) if (((int *)read_buf)[j + (i * (data_size / DATASET_WRITE_ONE_PROC_0_SEL_TEST_DTYPE_SIZE))] != (int)i) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); goto error; } } @@ -1491,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; } @@ -1521,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); @@ -1573,8 +1568,7 @@ test_write_dataset_one_proc_none_selection(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); + printf(" API functions for basic file, group, or dataset aren't supported with this connector\n"); return 0; } @@ -1583,21 +1577,21 @@ test_write_dataset_one_proc_none_selection(void) if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_GROUP_NAME); goto error; } @@ -1611,7 +1605,7 @@ test_write_dataset_one_proc_none_selection(void) DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME); goto error; } @@ -1622,9 +1616,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(write_buf_alloc); } @@ -1653,14 +1647,14 @@ test_write_dataset_one_proc_none_selection(void) if (MAINPROCESS) { if (H5Sselect_none(fspace_id) < 0) { H5_FAILED(); - HDprintf(" couldn't set 'none' selection for dataset write\n"); + printf(" couldn't set 'none' selection for dataset write\n"); INDEPENDENT_OP_ERROR(set_space_sel); } } else { if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't select hyperslab for dataset write\n"); + printf(" couldn't select hyperslab for dataset write\n"); INDEPENDENT_OP_ERROR(set_space_sel); } } @@ -1675,7 +1669,7 @@ test_write_dataset_one_proc_none_selection(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); goto error; } } @@ -1685,14 +1679,14 @@ test_write_dataset_one_proc_none_selection(void) if (H5Dwrite(dset_id, DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_write); } } END_INDEPENDENT_OP(dset_write); if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -1725,66 +1719,66 @@ test_write_dataset_one_proc_none_selection(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); goto error; } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); goto error; } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); goto error; } if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_GROUP_NAME); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); goto error; } 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); goto error; } if (H5Dread(dset_id, DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DSET_NAME); goto error; } @@ -1797,7 +1791,7 @@ test_write_dataset_one_proc_none_selection(void) read_buf)[j + (i * (data_size / DATASET_WRITE_ONE_PROC_NONE_SEL_TEST_DTYPE_SIZE))] != (int)i) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); goto error; } } @@ -1805,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; } @@ -1835,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); @@ -1884,8 +1878,7 @@ test_write_dataset_one_proc_all_selection(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); + printf(" API functions for basic file, group, or dataset aren't supported with this connector\n"); return 0; } @@ -1894,21 +1887,21 @@ test_write_dataset_one_proc_all_selection(void) if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_GROUP_NAME); goto error; } @@ -1922,7 +1915,7 @@ test_write_dataset_one_proc_all_selection(void) DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME); goto error; } @@ -1933,9 +1926,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(write_buf_alloc); } @@ -1950,14 +1943,14 @@ test_write_dataset_one_proc_all_selection(void) if (MAINPROCESS) { if (H5Sselect_all(fspace_id) < 0) { H5_FAILED(); - HDprintf(" couldn't set 'all' selection for dataset write\n"); + printf(" couldn't set 'all' selection for dataset write\n"); INDEPENDENT_OP_ERROR(set_space_sel); } } else { if (H5Sselect_none(fspace_id) < 0) { H5_FAILED(); - HDprintf(" couldn't set 'none' selection for dataset write\n"); + printf(" couldn't set 'none' selection for dataset write\n"); INDEPENDENT_OP_ERROR(set_space_sel); } } @@ -1972,7 +1965,7 @@ test_write_dataset_one_proc_all_selection(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); goto error; } } @@ -1982,14 +1975,14 @@ test_write_dataset_one_proc_all_selection(void) if (H5Dwrite(dset_id, DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_write); } } END_INDEPENDENT_OP(dset_write); if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -2022,84 +2015,84 @@ test_write_dataset_one_proc_all_selection(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); goto error; } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); goto error; } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); goto error; } if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_GROUP_NAME); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); goto error; } 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); goto error; } if (H5Dread(dset_id, DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DSET_NAME); goto error; } for (i = 0; i < data_size / DATASET_WRITE_ONE_PROC_ALL_SEL_TEST_DTYPE_SIZE; i++) { if (((int *)read_buf)[i] != (int)i) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); goto error; } } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -2124,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); @@ -2182,8 +2175,7 @@ test_write_dataset_hyper_file_all_mem(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); + printf(" API functions for basic file, group, or dataset aren't supported with this connector\n"); return 0; } @@ -2192,21 +2184,21 @@ test_write_dataset_hyper_file_all_mem(void) if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_GROUP_NAME); goto error; } @@ -2220,7 +2212,7 @@ test_write_dataset_hyper_file_all_mem(void) DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME); goto error; } @@ -2228,9 +2220,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); goto error; } @@ -2253,19 +2245,19 @@ test_write_dataset_hyper_file_all_mem(void) if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't select hyperslab for dataset write\n"); + printf(" couldn't select hyperslab for dataset write\n"); goto error; } if (H5Dwrite(dset_id, DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_DTYPE, H5S_ALL, fspace_id, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME); goto error; } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (fspace_id >= 0) { @@ -2290,66 +2282,66 @@ test_write_dataset_hyper_file_all_mem(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); goto error; } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); goto error; } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); goto error; } if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_GROUP_NAME); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); goto error; } 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); goto error; } if (H5Dread(dset_id, DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DSET_NAME); goto error; } @@ -2360,19 +2352,19 @@ test_write_dataset_hyper_file_all_mem(void) if (((int *)read_buf)[j + (i * (data_size / DATASET_WRITE_HYPER_FILE_ALL_MEM_TEST_DTYPE_SIZE))] != (int)i) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); goto error; } } } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -2401,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); @@ -2451,8 +2443,7 @@ test_write_dataset_all_file_hyper_mem(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); + printf(" API functions for basic file, group, or dataset aren't supported with this connector\n"); return 0; } @@ -2461,21 +2452,21 @@ test_write_dataset_all_file_hyper_mem(void) if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME); goto error; } @@ -2489,7 +2480,7 @@ test_write_dataset_all_file_hyper_mem(void) DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME); goto error; } @@ -2505,9 +2496,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(write_buf_alloc); } @@ -2538,21 +2529,21 @@ test_write_dataset_all_file_hyper_mem(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); INDEPENDENT_OP_ERROR(dset_write); } if (H5Sselect_hyperslab(mspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't select hyperslab for dataset write\n"); + printf(" couldn't select hyperslab for dataset write\n"); INDEPENDENT_OP_ERROR(dset_write); } if (H5Dwrite(dset_id, DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_DTYPE, mspace_id, H5S_ALL, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", - DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", + DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_write); } } @@ -2560,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) { @@ -2593,84 +2584,84 @@ test_write_dataset_all_file_hyper_mem(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); goto error; } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); goto error; } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); goto error; } if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); goto error; } 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); goto error; } if (H5Dread(dset_id, DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DSET_NAME); goto error; } for (i = 0; i < data_size / DATASET_WRITE_ALL_FILE_HYPER_MEM_TEST_DTYPE_SIZE; i++) { if (((int *)read_buf)[i] != (int)i) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); goto error; } } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -2695,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); @@ -2760,8 +2751,7 @@ test_write_dataset_all_file_point_mem(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); + printf(" API functions for basic file, group, or dataset aren't supported with this connector\n"); return 0; } @@ -2770,21 +2760,21 @@ test_write_dataset_all_file_point_mem(void) if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_GROUP_NAME); goto error; } @@ -2798,7 +2788,7 @@ test_write_dataset_all_file_point_mem(void) DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME); goto error; } @@ -2814,9 +2804,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(write_buf_alloc); } @@ -2844,14 +2834,14 @@ test_write_dataset_all_file_point_mem(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); 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(); - HDprintf(" couldn't allocate buffer for point selection\n"); + printf(" couldn't allocate buffer for point selection\n"); INDEPENDENT_OP_ERROR(dset_write); } @@ -2865,15 +2855,15 @@ test_write_dataset_all_file_point_mem(void) data_size / DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DTYPE_SIZE, points) < 0) { H5_FAILED(); - HDprintf(" couldn't set point selection for dataset write\n"); + printf(" couldn't set point selection for dataset write\n"); INDEPENDENT_OP_ERROR(dset_write); } if (H5Dwrite(dset_id, DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_DTYPE, mspace_id, H5S_ALL, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", - DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", + DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_write); } } @@ -2881,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) { @@ -2918,84 +2908,84 @@ test_write_dataset_all_file_point_mem(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); goto error; } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); goto error; } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); goto error; } if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_GROUP_NAME); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); goto error; } 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); goto error; } if (H5Dread(dset_id, DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DSET_NAME); goto error; } for (i = 0; i < data_size / DATASET_WRITE_ALL_FILE_POINT_MEM_TEST_DTYPE_SIZE; i++) { if (((int *)read_buf)[i] != (int)i) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); goto error; } } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -3020,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); @@ -3076,8 +3066,7 @@ test_write_dataset_hyper_file_point_mem(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); + printf(" API functions for basic file, group, or dataset aren't supported with this connector\n"); return 0; } @@ -3086,21 +3075,21 @@ test_write_dataset_hyper_file_point_mem(void) if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME); goto error; } @@ -3114,7 +3103,7 @@ test_write_dataset_hyper_file_point_mem(void) DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME); goto error; } @@ -3127,9 +3116,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); goto error; } @@ -3157,7 +3146,7 @@ test_write_dataset_hyper_file_point_mem(void) if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't select hyperslab for dataset write\n"); + printf(" couldn't select hyperslab for dataset write\n"); goto error; } @@ -3167,14 +3156,14 @@ test_write_dataset_hyper_file_point_mem(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); 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(); - HDprintf(" couldn't allocate buffer for point selection\n"); + printf(" couldn't allocate buffer for point selection\n"); goto error; } @@ -3187,7 +3176,7 @@ test_write_dataset_hyper_file_point_mem(void) if (H5Sselect_elements(mspace_id, H5S_SELECT_SET, data_size / DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DTYPE_SIZE, points) < 0) { H5_FAILED(); - HDprintf(" couldn't set point selection for dataset write\n"); + printf(" couldn't set point selection for dataset write\n"); goto error; } } @@ -3195,16 +3184,16 @@ test_write_dataset_hyper_file_point_mem(void) if (H5Dwrite(dset_id, DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME); goto error; } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (points) { - HDfree(points); + free(points); points = NULL; } if (mspace_id >= 0) { @@ -3237,66 +3226,66 @@ test_write_dataset_hyper_file_point_mem(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); goto error; } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); goto error; } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); goto error; } if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); goto error; } 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); goto error; } if (H5Dread(dset_id, DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DSET_NAME); goto error; } @@ -3308,19 +3297,19 @@ test_write_dataset_hyper_file_point_mem(void) read_buf)[j + (i * (data_size / DATASET_WRITE_HYPER_FILE_POINT_MEM_TEST_DTYPE_SIZE))] != (int)i) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); goto error; } } } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -3345,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); @@ -3397,8 +3386,7 @@ test_write_dataset_point_file_hyper_mem(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); + printf(" API functions for basic file, group, or dataset aren't supported with this connector\n"); return 0; } @@ -3407,21 +3395,21 @@ test_write_dataset_point_file_hyper_mem(void) if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gcreate2(container_group, DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME); goto error; } @@ -3435,7 +3423,7 @@ test_write_dataset_point_file_hyper_mem(void) DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME); goto error; } @@ -3448,9 +3436,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); goto error; } @@ -3462,10 +3450,10 @@ 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(); - HDprintf(" couldn't allocate buffer for point selection\n"); + printf(" couldn't allocate buffer for point selection\n"); goto error; } @@ -3487,7 +3475,7 @@ test_write_dataset_point_file_hyper_mem(void) if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, data_size / DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DTYPE_SIZE, points) < 0) { H5_FAILED(); - HDprintf(" couldn't set point selection for dataset write\n"); + printf(" couldn't set point selection for dataset write\n"); goto error; } @@ -3500,13 +3488,13 @@ test_write_dataset_point_file_hyper_mem(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); goto error; } if (H5Sselect_hyperslab(mspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't set hyperslab selection for dataset write\n"); + printf(" couldn't set hyperslab selection for dataset write\n"); goto error; } } @@ -3514,16 +3502,16 @@ test_write_dataset_point_file_hyper_mem(void) if (H5Dwrite(dset_id, DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME); goto error; } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (points) { - HDfree(points); + free(points); points = NULL; } if (mspace_id >= 0) { @@ -3556,66 +3544,66 @@ test_write_dataset_point_file_hyper_mem(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); goto error; } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); goto error; } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); goto error; } if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); goto error; } 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); goto error; } if (H5Dread(dset_id, DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DSET_NAME); goto error; } @@ -3627,19 +3615,19 @@ test_write_dataset_point_file_hyper_mem(void) read_buf)[j + (i * (data_size / DATASET_WRITE_POINT_FILE_HYPER_MEM_TEST_DTYPE_SIZE))] != (int)i) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); goto error; } } } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } if (dims) { - HDfree(dims); + free(dims); dims = NULL; } @@ -3664,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); @@ -3718,8 +3706,7 @@ test_read_dataset_one_proc_0_selection(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); + printf(" API functions for basic file, group, or dataset aren't supported with this connector\n"); return 0; } @@ -3734,27 +3721,27 @@ test_read_dataset_one_proc_0_selection(void) if (MAINPROCESS) { if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); INDEPENDENT_OP_ERROR(dset_create); } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } if ((group_id = H5Gcreate2(container_group, DATASET_READ_ONE_PROC_0_SEL_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_READ_ONE_PROC_0_SEL_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_READ_ONE_PROC_0_SEL_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } if ((fspace_id = H5Screate_simple(DATASET_READ_ONE_PROC_0_SEL_TEST_SPACE_RANK, dims, NULL)) < 0) { H5_FAILED(); - HDprintf(" failed to create file dataspace for dataset\n"); + printf(" failed to create file dataspace for dataset\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -3762,7 +3749,7 @@ test_read_dataset_one_proc_0_selection(void) DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } @@ -3770,9 +3757,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -3792,7 +3779,7 @@ test_read_dataset_one_proc_0_selection(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); INDEPENDENT_OP_ERROR(dset_create); } } @@ -3800,12 +3787,12 @@ test_read_dataset_one_proc_0_selection(void) if (H5Dwrite(dset_id, DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_DTYPE, mspace_id, H5S_ALL, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -3838,17 +3825,17 @@ test_read_dataset_one_proc_0_selection(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); INDEPENDENT_OP_ERROR(dset_create); } } @@ -3862,36 +3849,36 @@ test_read_dataset_one_proc_0_selection(void) TEST_ERROR; if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_READ_ONE_PROC_0_SEL_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_GROUP_NAME); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); goto error; } @@ -3901,9 +3888,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); INDEPENDENT_OP_ERROR(read_buf_alloc); } } @@ -3918,7 +3905,7 @@ test_read_dataset_one_proc_0_selection(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); goto error; } } @@ -3939,7 +3926,7 @@ test_read_dataset_one_proc_0_selection(void) if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't select hyperslab for dataset read\n"); + printf(" couldn't select hyperslab for dataset read\n"); goto error; } @@ -3948,7 +3935,7 @@ test_read_dataset_one_proc_0_selection(void) if (H5Dread(dset_id, DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", DATASET_READ_ONE_PROC_0_SEL_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_read); } } @@ -3960,7 +3947,7 @@ test_read_dataset_one_proc_0_selection(void) for (i = 0; i < (size_t)space_npoints / (size_t)mpi_size; i++) { if (((int *)read_buf)[i] != mpi_rank) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); INDEPENDENT_OP_ERROR(data_verify); } } @@ -3969,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; } @@ -4001,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); @@ -4053,8 +4040,7 @@ test_read_dataset_one_proc_none_selection(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); + printf(" API functions for basic file, group, or dataset aren't supported with this connector\n"); return 0; } @@ -4069,28 +4055,28 @@ test_read_dataset_one_proc_none_selection(void) if (MAINPROCESS) { if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); INDEPENDENT_OP_ERROR(dset_create); } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } if ((group_id = H5Gcreate2(container_group, DATASET_READ_ONE_PROC_NONE_SEL_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_READ_ONE_PROC_NONE_SEL_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_READ_ONE_PROC_NONE_SEL_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } if ((fspace_id = H5Screate_simple(DATASET_READ_ONE_PROC_NONE_SEL_TEST_SPACE_RANK, dims, NULL)) < 0) { H5_FAILED(); - HDprintf(" failed to create file dataspace for dataset\n"); + printf(" failed to create file dataspace for dataset\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -4098,7 +4084,7 @@ test_read_dataset_one_proc_none_selection(void) DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } @@ -4106,9 +4092,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -4128,7 +4114,7 @@ test_read_dataset_one_proc_none_selection(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); INDEPENDENT_OP_ERROR(dset_create); } } @@ -4136,13 +4122,12 @@ test_read_dataset_one_proc_none_selection(void) if (H5Dwrite(dset_id, DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_DTYPE, mspace_id, H5S_ALL, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", - DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -4175,17 +4160,17 @@ test_read_dataset_one_proc_none_selection(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); INDEPENDENT_OP_ERROR(dset_create); } } @@ -4199,37 +4184,37 @@ test_read_dataset_one_proc_none_selection(void) TEST_ERROR; if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_READ_ONE_PROC_NONE_SEL_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_READ_ONE_PROC_NONE_SEL_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_READ_ONE_PROC_NONE_SEL_TEST_GROUP_NAME); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); goto error; } @@ -4239,9 +4224,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); INDEPENDENT_OP_ERROR(read_buf_alloc); } } @@ -4256,7 +4241,7 @@ test_read_dataset_one_proc_none_selection(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); goto error; } } @@ -4280,14 +4265,14 @@ test_read_dataset_one_proc_none_selection(void) if (MAINPROCESS) { if (H5Sselect_none(fspace_id) < 0) { H5_FAILED(); - HDprintf(" couldn't set 'none' selection for dataset read\n"); + printf(" couldn't set 'none' selection for dataset read\n"); INDEPENDENT_OP_ERROR(set_space_sel); } } else { if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't select hyperslab for dataset read\n"); + printf(" couldn't select hyperslab for dataset read\n"); INDEPENDENT_OP_ERROR(set_space_sel); } } @@ -4299,7 +4284,7 @@ test_read_dataset_one_proc_none_selection(void) if (H5Dread(dset_id, DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", DATASET_READ_ONE_PROC_NONE_SEL_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_read); } } @@ -4311,7 +4296,7 @@ test_read_dataset_one_proc_none_selection(void) for (i = 0; i < (size_t)space_npoints / (size_t)mpi_size; i++) { if (((int *)read_buf)[i] != mpi_rank) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); INDEPENDENT_OP_ERROR(data_verify); } } @@ -4320,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; } @@ -4352,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); @@ -4401,8 +4386,7 @@ test_read_dataset_one_proc_all_selection(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); + printf(" API functions for basic file, group, or dataset aren't supported with this connector\n"); return 0; } @@ -4417,28 +4401,28 @@ test_read_dataset_one_proc_all_selection(void) if (MAINPROCESS) { if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); INDEPENDENT_OP_ERROR(dset_create); } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } if ((group_id = H5Gcreate2(container_group, DATASET_READ_ONE_PROC_ALL_SEL_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_READ_ONE_PROC_ALL_SEL_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_READ_ONE_PROC_ALL_SEL_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } if ((fspace_id = H5Screate_simple(DATASET_READ_ONE_PROC_ALL_SEL_TEST_SPACE_RANK, dims, NULL)) < 0) { H5_FAILED(); - HDprintf(" failed to create file dataspace for dataset\n"); + printf(" failed to create file dataspace for dataset\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -4446,7 +4430,7 @@ test_read_dataset_one_proc_all_selection(void) DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } @@ -4454,9 +4438,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -4476,7 +4460,7 @@ test_read_dataset_one_proc_all_selection(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); INDEPENDENT_OP_ERROR(dset_create); } } @@ -4484,13 +4468,12 @@ test_read_dataset_one_proc_all_selection(void) if (H5Dwrite(dset_id, DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_DTYPE, mspace_id, H5S_ALL, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", - DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -4523,17 +4506,17 @@ test_read_dataset_one_proc_all_selection(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); INDEPENDENT_OP_ERROR(dset_create); } } @@ -4547,37 +4530,36 @@ test_read_dataset_one_proc_all_selection(void) TEST_ERROR; if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_READ_ONE_PROC_ALL_SEL_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_READ_ONE_PROC_ALL_SEL_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", DATASET_READ_ONE_PROC_ALL_SEL_TEST_GROUP_NAME); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); goto error; } @@ -4586,9 +4568,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); INDEPENDENT_OP_ERROR(read_buf_alloc); } } @@ -4603,7 +4585,7 @@ test_read_dataset_one_proc_all_selection(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); goto error; } } @@ -4613,14 +4595,14 @@ test_read_dataset_one_proc_all_selection(void) if (MAINPROCESS) { if (H5Sselect_all(fspace_id) < 0) { H5_FAILED(); - HDprintf(" couldn't set 'all' selection for dataset read\n"); + printf(" couldn't set 'all' selection for dataset read\n"); INDEPENDENT_OP_ERROR(set_space_sel); } } else { if (H5Sselect_none(fspace_id) < 0) { H5_FAILED(); - HDprintf(" couldn't set 'none' selection for dataset read\n"); + printf(" couldn't set 'none' selection for dataset read\n"); INDEPENDENT_OP_ERROR(set_space_sel); } } @@ -4632,7 +4614,7 @@ test_read_dataset_one_proc_all_selection(void) if (H5Dread(dset_id, DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", DATASET_READ_ONE_PROC_ALL_SEL_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_read); } } @@ -4650,7 +4632,7 @@ test_read_dataset_one_proc_all_selection(void) if (((int *)read_buf)[idx] != (int)i) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); INDEPENDENT_OP_ERROR(data_verify); } } @@ -4660,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; } @@ -4692,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); @@ -4756,8 +4738,7 @@ test_read_dataset_all_file_hyper_mem(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); + printf(" API functions for basic file, group, or dataset aren't supported with this connector\n"); return 0; } @@ -4772,28 +4753,28 @@ test_read_dataset_all_file_hyper_mem(void) if (MAINPROCESS) { if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); INDEPENDENT_OP_ERROR(dset_create); } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } if ((group_id = H5Gcreate2(container_group, DATASET_READ_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_READ_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_READ_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } if ((fspace_id = H5Screate_simple(DATASET_READ_ALL_FILE_HYPER_MEM_TEST_SPACE_RANK, dims, NULL)) < 0) { H5_FAILED(); - HDprintf(" failed to create file dataspace for dataset\n"); + printf(" failed to create file dataspace for dataset\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -4801,8 +4782,7 @@ test_read_dataset_all_file_hyper_mem(void) DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", - DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } @@ -4810,9 +4790,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -4833,7 +4813,7 @@ test_read_dataset_all_file_hyper_mem(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); INDEPENDENT_OP_ERROR(dset_create); } } @@ -4841,13 +4821,13 @@ test_read_dataset_all_file_hyper_mem(void) if (H5Dwrite(dset_id, DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_DTYPE, mspace_id, H5S_ALL, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", - DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", + DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -4880,17 +4860,17 @@ test_read_dataset_all_file_hyper_mem(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); INDEPENDENT_OP_ERROR(dset_create); } } @@ -4904,37 +4884,37 @@ test_read_dataset_all_file_hyper_mem(void) TEST_ERROR; if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_READ_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_READ_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_READ_ALL_FILE_HYPER_MEM_TEST_GROUP_NAME); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); goto error; } @@ -4957,29 +4937,29 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); INDEPENDENT_OP_ERROR(dset_read); } if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); INDEPENDENT_OP_ERROR(dset_read); } if (H5Sselect_hyperslab(mspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't select hyperslab for dataset read\n"); + printf(" couldn't select hyperslab for dataset read\n"); INDEPENDENT_OP_ERROR(dset_read); } if (H5Dread(dset_id, DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_DTYPE, mspace_id, H5S_ALL, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", - DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", + DATASET_READ_ALL_FILE_HYPER_MEM_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_read); } @@ -4993,14 +4973,14 @@ test_read_dataset_all_file_hyper_mem(void) if (j % 2 == 0) { if (((int *)read_buf)[idx] != (int)i) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); INDEPENDENT_OP_ERROR(dset_read); } } else { if (((int *)read_buf)[idx] != 0) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); INDEPENDENT_OP_ERROR(dset_read); } } @@ -5011,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; } @@ -5041,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); @@ -5106,8 +5086,7 @@ test_read_dataset_all_file_point_mem(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); + printf(" API functions for basic file, group, or dataset aren't supported with this connector\n"); return 0; } @@ -5122,28 +5101,28 @@ test_read_dataset_all_file_point_mem(void) if (MAINPROCESS) { if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); INDEPENDENT_OP_ERROR(dset_create); } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } if ((group_id = H5Gcreate2(container_group, DATASET_READ_ALL_FILE_POINT_MEM_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_READ_ALL_FILE_POINT_MEM_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_READ_ALL_FILE_POINT_MEM_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } if ((fspace_id = H5Screate_simple(DATASET_READ_ALL_FILE_POINT_MEM_TEST_SPACE_RANK, dims, NULL)) < 0) { H5_FAILED(); - HDprintf(" failed to create file dataspace for dataset\n"); + printf(" failed to create file dataspace for dataset\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -5151,8 +5130,7 @@ test_read_dataset_all_file_point_mem(void) DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", - DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } @@ -5160,9 +5138,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -5183,7 +5161,7 @@ test_read_dataset_all_file_point_mem(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); INDEPENDENT_OP_ERROR(dset_create); } } @@ -5191,13 +5169,13 @@ test_read_dataset_all_file_point_mem(void) if (H5Dwrite(dset_id, DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_DTYPE, mspace_id, H5S_ALL, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", - DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", + DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -5230,17 +5208,17 @@ test_read_dataset_all_file_point_mem(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); INDEPENDENT_OP_ERROR(dset_create); } } @@ -5254,37 +5232,37 @@ test_read_dataset_all_file_point_mem(void) TEST_ERROR; if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_READ_ALL_FILE_POINT_MEM_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_READ_ALL_FILE_POINT_MEM_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_READ_ALL_FILE_POINT_MEM_TEST_GROUP_NAME); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); goto error; } @@ -5304,21 +5282,21 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); INDEPENDENT_OP_ERROR(dset_read); } if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); 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(); - HDprintf(" couldn't allocate buffer for point selection\n"); + printf(" couldn't allocate buffer for point selection\n"); INDEPENDENT_OP_ERROR(dset_read); } @@ -5330,15 +5308,15 @@ test_read_dataset_all_file_point_mem(void) if (H5Sselect_elements(mspace_id, H5S_SELECT_SET, (size_t)space_npoints, points) < 0) { H5_FAILED(); - HDprintf(" couldn't set point selection for dataset read\n"); + printf(" couldn't set point selection for dataset read\n"); INDEPENDENT_OP_ERROR(dset_read); } if (H5Dread(dset_id, DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_DTYPE, mspace_id, H5S_ALL, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", - DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", + DATASET_READ_ALL_FILE_POINT_MEM_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_read); } @@ -5351,14 +5329,14 @@ test_read_dataset_all_file_point_mem(void) if (j % 2 == 0) { if (((int *)read_buf)[idx] != (int)i) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); INDEPENDENT_OP_ERROR(dset_read); } } else { if (((int *)read_buf)[idx] != 0) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); INDEPENDENT_OP_ERROR(dset_read); } } @@ -5369,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; } @@ -5404,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); @@ -5460,8 +5438,7 @@ test_read_dataset_hyper_file_point_mem(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); + printf(" API functions for basic file, group, or dataset aren't supported with this connector\n"); return 0; } @@ -5476,28 +5453,28 @@ test_read_dataset_hyper_file_point_mem(void) if (MAINPROCESS) { if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); INDEPENDENT_OP_ERROR(dset_create); } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } if ((group_id = H5Gcreate2(container_group, DATASET_READ_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_READ_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_READ_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } if ((fspace_id = H5Screate_simple(DATASET_READ_HYPER_FILE_POINT_MEM_TEST_SPACE_RANK, dims, NULL)) < 0) { H5_FAILED(); - HDprintf(" failed to create file dataspace for dataset\n"); + printf(" failed to create file dataspace for dataset\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -5505,8 +5482,8 @@ test_read_dataset_hyper_file_point_mem(void) DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", - DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", + DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } @@ -5514,9 +5491,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -5537,7 +5514,7 @@ test_read_dataset_hyper_file_point_mem(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); INDEPENDENT_OP_ERROR(dset_create); } } @@ -5545,13 +5522,13 @@ test_read_dataset_hyper_file_point_mem(void) if (H5Dwrite(dset_id, DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_DTYPE, mspace_id, H5S_ALL, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", - DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", + DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -5584,17 +5561,17 @@ test_read_dataset_hyper_file_point_mem(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); INDEPENDENT_OP_ERROR(dset_create); } } @@ -5608,37 +5585,37 @@ test_read_dataset_hyper_file_point_mem(void) TEST_ERROR; if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_READ_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_READ_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_READ_HYPER_FILE_POINT_MEM_TEST_GROUP_NAME); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); goto error; } @@ -5648,9 +5625,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + printf(" couldn't allocate buffer for dataset read\n"); goto error; } @@ -5670,7 +5647,7 @@ test_read_dataset_hyper_file_point_mem(void) if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't select hyperslab for dataset read\n"); + printf(" couldn't select hyperslab for dataset read\n"); goto error; } @@ -5680,13 +5657,13 @@ test_read_dataset_hyper_file_point_mem(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); 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(); - HDprintf(" couldn't allocate buffer for point selection\n"); + printf(" couldn't allocate buffer for point selection\n"); goto error; } @@ -5698,7 +5675,7 @@ test_read_dataset_hyper_file_point_mem(void) if (H5Sselect_elements(mspace_id, H5S_SELECT_SET, (size_t)(space_npoints / mpi_size), points) < 0) { H5_FAILED(); - HDprintf(" couldn't set point selection for dataset read\n"); + printf(" couldn't set point selection for dataset read\n"); goto error; } } @@ -5706,7 +5683,7 @@ test_read_dataset_hyper_file_point_mem(void) if (H5Dread(dset_id, DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", DATASET_READ_HYPER_FILE_POINT_MEM_TEST_DSET_NAME); goto error; } @@ -5714,31 +5691,31 @@ test_read_dataset_hyper_file_point_mem(void) if (i % 2 == 0) { if (((int *)read_buf)[i] != (int)mpi_rank) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); goto error; } } else { if (((int *)read_buf)[i] != 0) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); goto error; } } } 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; } @@ -5763,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); @@ -5815,8 +5792,7 @@ test_read_dataset_point_file_hyper_mem(void) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GROUP_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { SKIPPED(); - HDprintf( - " API functions for basic file, group, or dataset aren't supported with this connector\n"); + printf(" API functions for basic file, group, or dataset aren't supported with this connector\n"); return 0; } @@ -5831,28 +5807,28 @@ test_read_dataset_point_file_hyper_mem(void) if (MAINPROCESS) { if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); INDEPENDENT_OP_ERROR(dset_create); } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } if ((group_id = H5Gcreate2(container_group, DATASET_READ_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_READ_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_READ_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } if ((fspace_id = H5Screate_simple(DATASET_READ_POINT_FILE_HYPER_MEM_TEST_SPACE_RANK, dims, NULL)) < 0) { H5_FAILED(); - HDprintf(" failed to create file dataspace for dataset\n"); + printf(" failed to create file dataspace for dataset\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -5860,8 +5836,8 @@ test_read_dataset_point_file_hyper_mem(void) DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", - DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", + DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } @@ -5869,9 +5845,9 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -5892,7 +5868,7 @@ test_read_dataset_point_file_hyper_mem(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); INDEPENDENT_OP_ERROR(dset_create); } } @@ -5900,13 +5876,13 @@ test_read_dataset_point_file_hyper_mem(void) if (H5Dwrite(dset_id, DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_DTYPE, mspace_id, H5S_ALL, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", - DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", + DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } if (mspace_id >= 0) { @@ -5939,17 +5915,17 @@ test_read_dataset_point_file_hyper_mem(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); INDEPENDENT_OP_ERROR(dset_create); } } @@ -5963,37 +5939,37 @@ test_read_dataset_point_file_hyper_mem(void) TEST_ERROR; if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_READ_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_READ_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_READ_POINT_FILE_HYPER_MEM_TEST_GROUP_NAME); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } if ((space_npoints = H5Sget_simple_extent_npoints(fspace_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataspace num points\n"); + printf(" couldn't get dataspace num points\n"); goto error; } @@ -6004,17 +5980,17 @@ 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(); - HDprintf(" couldn't allocate buffer for dataset read\n"); + 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(); - HDprintf(" couldn't allocate buffer for point selection\n"); + printf(" couldn't allocate buffer for point selection\n"); goto error; } @@ -6035,7 +6011,7 @@ test_read_dataset_point_file_hyper_mem(void) if (H5Sselect_elements(fspace_id, H5S_SELECT_SET, (size_t)(space_npoints / mpi_size), points) < 0) { H5_FAILED(); - HDprintf(" couldn't set point selection for dataset read\n"); + printf(" couldn't set point selection for dataset read\n"); goto error; } @@ -6048,13 +6024,13 @@ test_read_dataset_point_file_hyper_mem(void) if ((mspace_id = H5Screate_simple(1, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" couldn't create memory dataspace\n"); + printf(" couldn't create memory dataspace\n"); goto error; } if (H5Sselect_hyperslab(mspace_id, H5S_SELECT_SET, start, stride, count, block) < 0) { H5_FAILED(); - HDprintf(" couldn't set hyperslab selection for dataset write\n"); + printf(" couldn't set hyperslab selection for dataset write\n"); goto error; } } @@ -6062,7 +6038,7 @@ test_read_dataset_point_file_hyper_mem(void) if (H5Dread(dset_id, DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", DATASET_READ_POINT_FILE_HYPER_MEM_TEST_DSET_NAME); goto error; } @@ -6070,31 +6046,31 @@ test_read_dataset_point_file_hyper_mem(void) if (i % 2 == 0) { if (((int *)read_buf)[i] != (int)mpi_rank) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); goto error; } } else { if (((int *)read_buf)[i] != 0) { H5_FAILED(); - HDprintf(" data verification failed\n"); + printf(" data verification failed\n"); goto error; } } } 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; } @@ -6121,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); @@ -6183,22 +6159,22 @@ test_write_multi_chunk_dataset_same_shape_read(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) { SKIPPED(); - HDprintf(" API functions for basic file, group, dataset, or getting property list aren't " - "supported with this connector\n"); + printf(" API functions for basic file, group, dataset, or getting property list aren't " + "supported with this connector\n"); return 0; } 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(); - HDprintf(" couldn't allocate buffer for dataset dimensionality\n"); + 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(); - HDprintf(" couldn't allocate buffer for dataset dimensionality\n"); + printf(" couldn't allocate buffer for dataset dimensionality\n"); goto error; } @@ -6229,13 +6205,13 @@ test_write_multi_chunk_dataset_same_shape_read(void) if (MAINPROCESS) { if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); INDEPENDENT_OP_ERROR(dset_create); } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } @@ -6243,28 +6219,28 @@ test_write_multi_chunk_dataset_same_shape_read(void) H5Gcreate2(container_group, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } if ((fspace_id = H5Screate_simple(DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK, dims, NULL)) < 0) { H5_FAILED(); - HDprintf(" failed to create file dataspace for dataset\n"); + printf(" failed to create file dataspace for dataset\n"); INDEPENDENT_OP_ERROR(dset_create); } if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) { H5_FAILED(); - HDprintf(" failed to create DCPL\n"); + printf(" failed to create DCPL\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Pset_chunk(dcpl_id, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK, chunk_dims) < 0) { H5_FAILED(); - HDprintf(" failed to set chunking on DCPL\n"); + printf(" failed to set chunking on DCPL\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -6272,8 +6248,8 @@ test_write_multi_chunk_dataset_same_shape_read(void) DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", - DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", + DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } @@ -6282,13 +6258,13 @@ test_write_multi_chunk_dataset_same_shape_read(void) */ if (H5Pclose(dcpl_id) < 0) { H5_FAILED(); - HDprintf(" failed to close DCPL\n"); + printf(" failed to close DCPL\n"); INDEPENDENT_OP_ERROR(dset_create); } if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve copy of DCPL\n"); + printf(" failed to retrieve copy of DCPL\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -6296,22 +6272,22 @@ test_write_multi_chunk_dataset_same_shape_read(void) if (H5Pget_chunk(dcpl_id, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK, retrieved_chunk_dims) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve chunking info\n"); + printf(" failed to retrieve chunking info\n"); INDEPENDENT_OP_ERROR(dset_create); } for (i = 0; i < DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK; i++) { if (chunk_dims[i] != retrieved_chunk_dims[i]) { H5_FAILED(); - HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified " - "dimensionality\n"); + printf(" chunk dimensionality retrieved from DCPL didn't match originally specified " + "dimensionality\n"); INDEPENDENT_OP_ERROR(dset_create); } } - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -6377,13 +6353,13 @@ test_write_multi_chunk_dataset_same_shape_read(void) if (H5Dwrite(dset_id, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", - DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", + DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } @@ -6417,17 +6393,17 @@ test_write_multi_chunk_dataset_same_shape_read(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); INDEPENDENT_OP_ERROR(dset_create); } } @@ -6441,33 +6417,32 @@ test_write_multi_chunk_dataset_same_shape_read(void) TEST_ERROR; if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_GROUP_NAME); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", - DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } @@ -6479,7 +6454,7 @@ test_write_multi_chunk_dataset_same_shape_read(void) if ((mspace_id = H5Screate_simple(2, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" failed to create memory dataspace\n"); + printf(" failed to create memory dataspace\n"); goto error; } } @@ -6492,18 +6467,18 @@ test_write_multi_chunk_dataset_same_shape_read(void) * Each rank reads their respective chunks in the dataset, checking the data for each one. */ if (MAINPROCESS) - HDprintf("\n"); + printf("\n"); for (i = 0, n_chunks_per_rank = (data_size / (size_t)mpi_size) / chunk_size; i < n_chunks_per_rank; i++) { size_t j, k; if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { H5_FAILED(); - HDprintf(" MPI_Barrier failed\n"); + printf(" MPI_Barrier failed\n"); goto error; } if (MAINPROCESS) - HDprintf("\r All ranks reading chunk %zu", i); + printf("\r All ranks reading chunk %zu", i); for (j = 0; j < DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK; j++) { if (j == 0) @@ -6520,7 +6495,7 @@ test_write_multi_chunk_dataset_same_shape_read(void) */ if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) < 0) { H5_FAILED(); - HDprintf(" failed to set hyperslab selection\n"); + printf(" failed to set hyperslab selection\n"); goto error; } @@ -6531,8 +6506,8 @@ test_write_multi_chunk_dataset_same_shape_read(void) if (H5Dread(dset_id, DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", - DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", + DATASET_MULTI_CHUNK_WRITE_SAME_SPACE_READ_TEST_DSET_NAME); goto error; } @@ -6543,7 +6518,7 @@ test_write_multi_chunk_dataset_same_shape_read(void) ((hsize_t)mpi_rank * n_chunks_per_rank); /* Additional value offset for each rank */ if (read_buf[j][k] != (int)val) { H5_FAILED(); - HDprintf(" data verification failed for chunk %lld\n", (long long)i); + printf(" data verification failed for chunk %lld\n", (long long)i); goto error; } } @@ -6551,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; } @@ -6583,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); @@ -6647,22 +6622,22 @@ test_write_multi_chunk_dataset_diff_shape_read(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) { SKIPPED(); - HDprintf(" API functions for basic file, group, dataset, or getting property list aren't " - "supported with this connector\n"); + printf(" API functions for basic file, group, dataset, or getting property list aren't " + "supported with this connector\n"); return 0; } 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(); - HDprintf(" couldn't allocate buffer for dataset dimensionality\n"); + 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(); - HDprintf(" couldn't allocate buffer for dataset dimensionality\n"); + printf(" couldn't allocate buffer for dataset dimensionality\n"); goto error; } @@ -6693,13 +6668,13 @@ test_write_multi_chunk_dataset_diff_shape_read(void) if (MAINPROCESS) { if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); INDEPENDENT_OP_ERROR(dset_create); } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } @@ -6707,28 +6682,28 @@ test_write_multi_chunk_dataset_diff_shape_read(void) H5Gcreate2(container_group, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } if ((fspace_id = H5Screate_simple(DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK, dims, NULL)) < 0) { H5_FAILED(); - HDprintf(" failed to create file dataspace for dataset\n"); + printf(" failed to create file dataspace for dataset\n"); INDEPENDENT_OP_ERROR(dset_create); } if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) { H5_FAILED(); - HDprintf(" failed to create DCPL\n"); + printf(" failed to create DCPL\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Pset_chunk(dcpl_id, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK, chunk_dims) < 0) { H5_FAILED(); - HDprintf(" failed to set chunking on DCPL\n"); + printf(" failed to set chunking on DCPL\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -6736,8 +6711,8 @@ test_write_multi_chunk_dataset_diff_shape_read(void) DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", - DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", + DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } @@ -6746,13 +6721,13 @@ test_write_multi_chunk_dataset_diff_shape_read(void) */ if (H5Pclose(dcpl_id) < 0) { H5_FAILED(); - HDprintf(" failed to close DCPL\n"); + printf(" failed to close DCPL\n"); INDEPENDENT_OP_ERROR(dset_create); } if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve copy of DCPL\n"); + printf(" failed to retrieve copy of DCPL\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -6760,22 +6735,22 @@ test_write_multi_chunk_dataset_diff_shape_read(void) if (H5Pget_chunk(dcpl_id, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK, retrieved_chunk_dims) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve chunking info\n"); + printf(" failed to retrieve chunking info\n"); INDEPENDENT_OP_ERROR(dset_create); } for (i = 0; i < DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK; i++) { if (chunk_dims[i] != retrieved_chunk_dims[i]) { H5_FAILED(); - HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified " - "dimensionality\n"); + printf(" chunk dimensionality retrieved from DCPL didn't match originally specified " + "dimensionality\n"); INDEPENDENT_OP_ERROR(dset_create); } } - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -6841,13 +6816,13 @@ test_write_multi_chunk_dataset_diff_shape_read(void) if (H5Dwrite(dset_id, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", - DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", + DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } if (write_buf) { - HDfree(write_buf); + free(write_buf); write_buf = NULL; } @@ -6881,17 +6856,17 @@ test_write_multi_chunk_dataset_diff_shape_read(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); INDEPENDENT_OP_ERROR(dset_create); } } @@ -6905,33 +6880,32 @@ test_write_multi_chunk_dataset_diff_shape_read(void) TEST_ERROR; if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_GROUP_NAME); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", - DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } @@ -6945,7 +6919,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void) if ((mspace_id = H5Screate_simple(DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" failed to create memory dataspace\n"); + printf(" failed to create memory dataspace\n"); goto error; } } @@ -6958,18 +6932,18 @@ test_write_multi_chunk_dataset_diff_shape_read(void) * Each rank reads their respective chunks in the dataset, checking the data for each one. */ if (MAINPROCESS) - HDprintf("\n"); + printf("\n"); for (i = 0, n_chunks_per_rank = (data_size / (size_t)mpi_size) / chunk_size; i < n_chunks_per_rank; i++) { size_t j, k; if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { H5_FAILED(); - HDprintf(" MPI_Barrier failed\n"); + printf(" MPI_Barrier failed\n"); goto error; } if (MAINPROCESS) - HDprintf("\r All ranks reading chunk %zu", i); + printf("\r All ranks reading chunk %zu", i); for (j = 0; j < DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK; j++) { if (j == 0) @@ -6986,7 +6960,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void) */ if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) < 0) { H5_FAILED(); - HDprintf(" failed to set hyperslab selection\n"); + printf(" failed to set hyperslab selection\n"); goto error; } @@ -6997,8 +6971,8 @@ test_write_multi_chunk_dataset_diff_shape_read(void) if (H5Dread(dset_id, DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", - DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", + DATASET_MULTI_CHUNK_WRITE_DIFF_SPACE_READ_TEST_DSET_NAME); goto error; } @@ -7009,7 +6983,7 @@ test_write_multi_chunk_dataset_diff_shape_read(void) if (read_buf[j][k] != (int)val) { H5_FAILED(); - HDprintf(" data verification failed for chunk %lld\n", (long long)i); + printf(" data verification failed for chunk %lld\n", (long long)i); goto error; } } @@ -7017,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; } @@ -7049,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); @@ -7113,22 +7087,22 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) { SKIPPED(); - HDprintf(" API functions for basic file, group, dataset, or getting property list aren't " - "supported with this connector\n"); + printf(" API functions for basic file, group, dataset, or getting property list aren't " + "supported with this connector\n"); 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(); - HDprintf(" couldn't allocate buffer for dataset dimensionality\n"); + 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(); - HDprintf(" couldn't allocate buffer for dataset dimensionality\n"); + printf(" couldn't allocate buffer for dataset dimensionality\n"); goto error; } @@ -7159,13 +7133,13 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) if (MAINPROCESS) { if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); INDEPENDENT_OP_ERROR(dset_create); } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } @@ -7173,28 +7147,28 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } if ((fspace_id = H5Screate_simple( DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK, dims, NULL)) < 0) { H5_FAILED(); - HDprintf(" failed to create file dataspace for dataset\n"); + printf(" failed to create file dataspace for dataset\n"); INDEPENDENT_OP_ERROR(dset_create); } if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) { H5_FAILED(); - HDprintf(" failed to create DCPL\n"); + printf(" failed to create DCPL\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Pset_chunk(dcpl_id, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK, chunk_dims) < 0) { H5_FAILED(); - HDprintf(" failed to set chunking on DCPL\n"); + printf(" failed to set chunking on DCPL\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -7202,7 +7176,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) * all other processes when they open the dataset */ if (H5Pset_alloc_time(dcpl_id, H5D_ALLOC_TIME_EARLY) < 0) { H5_FAILED(); - HDprintf(" failed to set allocation time on DCPL\n"); + printf(" failed to set allocation time on DCPL\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -7210,8 +7184,8 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", - DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", + DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } @@ -7220,13 +7194,13 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) */ if (H5Pclose(dcpl_id) < 0) { H5_FAILED(); - HDprintf(" failed to close DCPL\n"); + printf(" failed to close DCPL\n"); INDEPENDENT_OP_ERROR(dset_create); } if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve copy of DCPL\n"); + printf(" failed to retrieve copy of DCPL\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -7234,22 +7208,22 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) if (H5Pget_chunk(dcpl_id, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK, retrieved_chunk_dims) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve chunking info\n"); + printf(" failed to retrieve chunking info\n"); INDEPENDENT_OP_ERROR(dset_create); } for (i = 0; i < DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK; i++) { if (chunk_dims[i] != retrieved_chunk_dims[i]) { H5_FAILED(); - HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified " - "dimensionality\n"); + printf(" chunk dimensionality retrieved from DCPL didn't match originally specified " + "dimensionality\n"); INDEPENDENT_OP_ERROR(dset_create); } } - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -7283,17 +7257,17 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); INDEPENDENT_OP_ERROR(dset_create); } } @@ -7307,19 +7281,19 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) TEST_ERROR; if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_GROUP_NAME); goto error; } @@ -7331,7 +7305,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) if ((mspace_id = H5Screate_simple(2, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" failed to create memory dataspace\n"); + printf(" failed to create memory dataspace\n"); goto error; } } @@ -7341,13 +7315,13 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) } if (MAINPROCESS) - HDprintf("\n"); + printf("\n"); for (niter = 0; niter < DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_NITERS; niter++) { if ((dset_id = H5Dopen2(group_id, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", - DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", + DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME); goto error; } @@ -7421,8 +7395,8 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) if (H5Dwrite(dset_id, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", - DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", + DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_write); } } @@ -7440,21 +7414,21 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { H5_FAILED(); - HDprintf(" MPI_Barrier failed\n"); + printf(" MPI_Barrier failed\n"); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", - DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", + DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } @@ -7466,7 +7440,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) size_t j, k; if (MAINPROCESS) - HDprintf("\r All ranks reading chunk %zu", i); + printf("\r All ranks reading chunk %zu", i); for (j = 0; j < DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_SPACE_RANK; j++) { if (j == 0) @@ -7483,7 +7457,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) */ if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) < 0) { H5_FAILED(); - HDprintf(" failed to set hyperslab selection\n"); + printf(" failed to set hyperslab selection\n"); goto error; } @@ -7494,8 +7468,8 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) if (H5Dread(dset_id, DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", - DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", + DATASET_MULTI_CHUNK_OVERWRITE_SAME_SPACE_READ_TEST_DSET_NAME); goto error; } @@ -7507,7 +7481,7 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) + niter; if (read_buf[j][k] != (int)val) { H5_FAILED(); - HDprintf(" data verification failed for chunk %lld\n", (long long)i); + printf(" data verification failed for chunk %lld\n", (long long)i); goto error; } } @@ -7533,23 +7507,23 @@ test_overwrite_multi_chunk_dataset_same_shape_read(void) if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { H5_FAILED(); - HDprintf(" MPI_Barrier failed\n"); + printf(" MPI_Barrier failed\n"); goto error; } } 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; } @@ -7572,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); @@ -7639,22 +7613,22 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE) || !(vol_cap_flags_g & H5VL_CAP_FLAG_GET_PLIST)) { SKIPPED(); - HDprintf(" API functions for basic file, group, dataset, or getting property list aren't " - "supported with this connector\n"); + printf(" API functions for basic file, group, dataset, or getting property list aren't " + "supported with this connector\n"); 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(); - HDprintf(" couldn't allocate buffer for dataset dimensionality\n"); + 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(); - HDprintf(" couldn't allocate buffer for dataset dimensionality\n"); + printf(" couldn't allocate buffer for dataset dimensionality\n"); goto error; } @@ -7685,13 +7659,13 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) if (MAINPROCESS) { if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't open file '%s'\n", H5_api_test_parallel_filename); INDEPENDENT_OP_ERROR(dset_create); } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } @@ -7699,28 +7673,28 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create container sub-group '%s'\n", - DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_GROUP_NAME); + printf(" couldn't create container sub-group '%s'\n", + DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_GROUP_NAME); INDEPENDENT_OP_ERROR(dset_create); } if ((fspace_id = H5Screate_simple( DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK, dims, NULL)) < 0) { H5_FAILED(); - HDprintf(" failed to create file dataspace for dataset\n"); + printf(" failed to create file dataspace for dataset\n"); INDEPENDENT_OP_ERROR(dset_create); } if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) { H5_FAILED(); - HDprintf(" failed to create DCPL\n"); + printf(" failed to create DCPL\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Pset_chunk(dcpl_id, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK, chunk_dims) < 0) { H5_FAILED(); - HDprintf(" failed to set chunking on DCPL\n"); + printf(" failed to set chunking on DCPL\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -7728,7 +7702,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) * all other processes when they open the dataset */ if (H5Pset_alloc_time(dcpl_id, H5D_ALLOC_TIME_EARLY) < 0) { H5_FAILED(); - HDprintf(" failed to set allocation time on DCPL\n"); + printf(" failed to set allocation time on DCPL\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -7736,8 +7710,8 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_DTYPE, fspace_id, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't create dataset '%s'\n", - DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME); + printf(" couldn't create dataset '%s'\n", + DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_create); } @@ -7746,13 +7720,13 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) */ if (H5Pclose(dcpl_id) < 0) { H5_FAILED(); - HDprintf(" failed to close DCPL\n"); + printf(" failed to close DCPL\n"); INDEPENDENT_OP_ERROR(dset_create); } if ((dcpl_id = H5Dget_create_plist(dset_id)) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve copy of DCPL\n"); + printf(" failed to retrieve copy of DCPL\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -7760,22 +7734,22 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) if (H5Pget_chunk(dcpl_id, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK, retrieved_chunk_dims) < 0) { H5_FAILED(); - HDprintf(" failed to retrieve chunking info\n"); + printf(" failed to retrieve chunking info\n"); INDEPENDENT_OP_ERROR(dset_create); } for (i = 0; i < DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK; i++) { if (chunk_dims[i] != retrieved_chunk_dims[i]) { H5_FAILED(); - HDprintf(" chunk dimensionality retrieved from DCPL didn't match originally specified " - "dimensionality\n"); + printf(" chunk dimensionality retrieved from DCPL didn't match originally specified " + "dimensionality\n"); INDEPENDENT_OP_ERROR(dset_create); } } - if (NULL == (write_buf = HDmalloc(data_size))) { + if (NULL == (write_buf = malloc(data_size))) { H5_FAILED(); - HDprintf(" couldn't allocate buffer for dataset write\n"); + printf(" couldn't allocate buffer for dataset write\n"); INDEPENDENT_OP_ERROR(dset_create); } @@ -7809,17 +7783,17 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) */ if (H5Gclose(group_id) < 0) { H5_FAILED(); - HDprintf(" failed to close test's container group\n"); + printf(" failed to close test's container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Gclose(container_group) < 0) { H5_FAILED(); - HDprintf(" failed to close container group\n"); + printf(" failed to close container group\n"); INDEPENDENT_OP_ERROR(dset_create); } if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file for data flushing\n"); + printf(" failed to close file for data flushing\n"); INDEPENDENT_OP_ERROR(dset_create); } } @@ -7833,19 +7807,19 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) TEST_ERROR; if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); + printf(" couldn't re-open file '%s'\n", H5_api_test_parallel_filename); goto error; } if ((container_group = H5Gopen2(file_id, DATASET_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); + printf(" couldn't open container group '%s'\n", DATASET_TEST_GROUP_NAME); goto error; } if ((group_id = H5Gopen2(container_group, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_GROUP_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open container sub-group '%s'\n", - DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_GROUP_NAME); + printf(" couldn't open container sub-group '%s'\n", + DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_GROUP_NAME); goto error; } @@ -7859,7 +7833,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) if ((mspace_id = H5Screate_simple(DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK, mdims, NULL)) < 0) { H5_FAILED(); - HDprintf(" failed to create memory dataspace\n"); + printf(" failed to create memory dataspace\n"); goto error; } } @@ -7869,13 +7843,13 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) } if (MAINPROCESS) - HDprintf("\n"); + printf("\n"); for (niter = 0; niter < DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_NITERS; niter++) { if ((dset_id = H5Dopen2(group_id, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", - DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", + DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME); goto error; } @@ -7949,8 +7923,8 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) if (H5Dwrite(dset_id, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_DTYPE, H5S_ALL, H5S_ALL, H5P_DEFAULT, write_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't write to dataset '%s'\n", - DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME); + printf(" couldn't write to dataset '%s'\n", + DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME); INDEPENDENT_OP_ERROR(dset_write); } } @@ -7968,21 +7942,21 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { H5_FAILED(); - HDprintf(" MPI_Barrier failed\n"); + printf(" MPI_Barrier failed\n"); goto error; } if ((dset_id = H5Dopen2(group_id, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME, H5P_DEFAULT)) < 0) { H5_FAILED(); - HDprintf(" couldn't open dataset '%s'\n", - DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME); + printf(" couldn't open dataset '%s'\n", + DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME); goto error; } if ((fspace_id = H5Dget_space(dset_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't get dataset dataspace\n"); + printf(" couldn't get dataset dataspace\n"); goto error; } @@ -7994,7 +7968,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) size_t j, k; if (MAINPROCESS) - HDprintf("\r All ranks reading chunk %zu", i); + printf("\r All ranks reading chunk %zu", i); for (j = 0; j < DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_SPACE_RANK; j++) { if (j == 0) @@ -8011,7 +7985,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) */ if (H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) < 0) { H5_FAILED(); - HDprintf(" failed to set hyperslab selection\n"); + printf(" failed to set hyperslab selection\n"); goto error; } @@ -8022,8 +7996,8 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) if (H5Dread(dset_id, DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_DTYPE, mspace_id, fspace_id, H5P_DEFAULT, read_buf) < 0) { H5_FAILED(); - HDprintf(" couldn't read from dataset '%s'\n", - DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME); + printf(" couldn't read from dataset '%s'\n", + DATASET_MULTI_CHUNK_OVERWRITE_DIFF_SPACE_READ_TEST_DSET_NAME); goto error; } @@ -8035,7 +8009,7 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) if (read_buf[j][k] != (int)val) { H5_FAILED(); - HDprintf(" data verification failed for chunk %lld\n", (long long)i); + printf(" data verification failed for chunk %lld\n", (long long)i); goto error; } } @@ -8061,23 +8035,23 @@ test_overwrite_multi_chunk_dataset_diff_shape_read(void) if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { H5_FAILED(); - HDprintf(" MPI_Barrier failed\n"); + printf(" MPI_Barrier failed\n"); goto error; } } 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; } @@ -8100,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); @@ -8126,11 +8100,11 @@ H5_api_dataset_test_parallel(void) int nerrors; if (MAINPROCESS) { - HDprintf("**********************************************\n"); - HDprintf("* *\n"); - HDprintf("* API Parallel Dataset Tests *\n"); - HDprintf("* *\n"); - HDprintf("**********************************************\n\n"); + printf("**********************************************\n"); + printf("* *\n"); + printf("* API Parallel Dataset Tests *\n"); + printf("* *\n"); + printf("**********************************************\n\n"); } for (i = 0, nerrors = 0; i < ARRAY_LENGTH(par_dataset_tests); i++) { @@ -8138,12 +8112,12 @@ H5_api_dataset_test_parallel(void) if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { if (MAINPROCESS) - HDprintf(" MPI_Barrier() failed!\n"); + printf(" MPI_Barrier() failed!\n"); } } if (MAINPROCESS) - HDprintf("\n"); + printf("\n"); return nerrors; } diff --git a/testpar/API/H5_api_datatype_test_parallel.c b/testpar/API/H5_api_datatype_test_parallel.c index 7d090c0..3d00ad9 100644 --- a/testpar/API/H5_api_datatype_test_parallel.c +++ b/testpar/API/H5_api_datatype_test_parallel.c @@ -24,11 +24,11 @@ H5_api_datatype_test_parallel(void) int nerrors; if (MAINPROCESS) { - HDprintf("**********************************************\n"); - HDprintf("* *\n"); - HDprintf("* API Parallel Datatype Tests *\n"); - HDprintf("* *\n"); - HDprintf("**********************************************\n\n"); + printf("**********************************************\n"); + printf("* *\n"); + printf("* API Parallel Datatype Tests *\n"); + printf("* *\n"); + printf("**********************************************\n\n"); } for (i = 0, nerrors = 0; i < ARRAY_LENGTH(par_datatype_tests); i++) { @@ -36,12 +36,12 @@ H5_api_datatype_test_parallel(void) if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { if (MAINPROCESS) - HDprintf(" MPI_Barrier() failed!\n"); + printf(" MPI_Barrier() failed!\n"); } } if (MAINPROCESS) - HDprintf("\n"); + printf("\n"); return nerrors; } diff --git a/testpar/API/H5_api_file_test_parallel.c b/testpar/API/H5_api_file_test_parallel.c index 20fb2ba..7a78619 100644 --- a/testpar/API/H5_api_file_test_parallel.c +++ b/testpar/API/H5_api_file_test_parallel.c @@ -40,7 +40,7 @@ test_create_file(void) /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) { SKIPPED(); - HDprintf(" API functions for basic file aren't supported with this connector\n"); + printf(" API functions for basic file aren't supported with this connector\n"); return 0; } @@ -49,7 +49,7 @@ test_create_file(void) if ((file_id = H5Fcreate(FILE_CREATE_TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't create file '%s'\n", FILE_CREATE_TEST_FILENAME); + printf(" couldn't create file '%s'\n", FILE_CREATE_TEST_FILENAME); goto error; } @@ -87,7 +87,7 @@ test_open_file(void) /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) { SKIPPED(); - HDprintf(" API functions for basic file aren't supported with this connector\n"); + printf(" API functions for basic file aren't supported with this connector\n"); return 0; } @@ -106,7 +106,7 @@ test_open_file(void) if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDONLY, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" unable to open file '%s' in read-only mode\n", H5_api_test_parallel_filename); + printf(" unable to open file '%s' in read-only mode\n", H5_api_test_parallel_filename); PART_ERROR(H5Fopen_rdonly); } @@ -129,7 +129,7 @@ test_open_file(void) if ((file_id = H5Fopen(H5_api_test_parallel_filename, H5F_ACC_RDWR, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" unable to open file '%s' in read-write mode\n", H5_api_test_parallel_filename); + printf(" unable to open file '%s' in read-write mode\n", H5_api_test_parallel_filename); PART_ERROR(H5Fopen_rdwrite); } @@ -201,7 +201,7 @@ test_split_comm_file_access(void) /* Make sure the connector supports the API functions being tested */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC)) { SKIPPED(); - HDprintf(" API functions for basic file aren't supported with this connector\n"); + printf(" API functions for basic file aren't supported with this connector\n"); return 0; } @@ -210,7 +210,7 @@ test_split_comm_file_access(void) is_old = mpi_rank % 2; if (MPI_SUCCESS != MPI_Comm_split(MPI_COMM_WORLD, is_old, mpi_rank, &comm)) { H5_FAILED(); - HDprintf(" failed to split communicator!\n"); + printf(" failed to split communicator!\n"); goto error; } MPI_Comm_rank(comm, &newrank); @@ -237,7 +237,7 @@ test_split_comm_file_access(void) /* create the file collectively */ if ((file_id = H5Fcreate(SPLIT_FILE_COMM_TEST_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0) { H5_FAILED(); - HDprintf(" couldn't create file '%s'\n", SPLIT_FILE_COMM_TEST_FILE_NAME); + printf(" couldn't create file '%s'\n", SPLIT_FILE_COMM_TEST_FILE_NAME); err_occurred = 1; goto access_end; } @@ -245,7 +245,7 @@ test_split_comm_file_access(void) /* close the file */ if (H5Fclose(file_id) < 0) { H5_FAILED(); - HDprintf(" failed to close file '%s'\n", SPLIT_FILE_COMM_TEST_FILE_NAME); + printf(" failed to close file '%s'\n", SPLIT_FILE_COMM_TEST_FILE_NAME); err_occurred = 1; goto access_end; } @@ -253,7 +253,7 @@ test_split_comm_file_access(void) /* delete the test file */ if (H5Fdelete(SPLIT_FILE_COMM_TEST_FILE_NAME, fapl_id) < 0) { H5_FAILED(); - HDprintf(" failed to delete file '%s'\n", SPLIT_FILE_COMM_TEST_FILE_NAME); + printf(" failed to delete file '%s'\n", SPLIT_FILE_COMM_TEST_FILE_NAME); err_occurred = 1; goto access_end; } @@ -269,26 +269,26 @@ access_end: /* Get the collective results about whether an error occurred */ if (MPI_SUCCESS != MPI_Allreduce(MPI_IN_PLACE, &err_occurred, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD)) { H5_FAILED(); - HDprintf(" MPI_Allreduce failed\n"); + printf(" MPI_Allreduce failed\n"); goto error; } if (err_occurred) { H5_FAILED(); - HDprintf(" an error occurred on only some ranks during split-communicator file access! - " - "collectively failing\n"); + printf(" an error occurred on only some ranks during split-communicator file access! - " + "collectively failing\n"); goto error; } if (MPI_SUCCESS != MPI_Comm_free(&comm)) { H5_FAILED(); - HDprintf(" MPI_Comm_free failed\n"); + printf(" MPI_Comm_free failed\n"); goto error; } if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { H5_FAILED(); - HDprintf(" MPI_Barrier on MPI_COMM_WORLD failed\n"); + printf(" MPI_Barrier on MPI_COMM_WORLD failed\n"); goto error; } @@ -317,7 +317,7 @@ cleanup_files(void) if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, TRUE)) < 0) { if (MAINPROCESS) - HDprintf(" failed to create FAPL for deleting test files\n"); + printf(" failed to create FAPL for deleting test files\n"); return; } @@ -328,7 +328,7 @@ cleanup_files(void) if (H5Pclose(fapl_id) < 0) { if (MAINPROCESS) - HDprintf(" failed to close FAPL used for deleting test files\n"); + printf(" failed to close FAPL used for deleting test files\n"); return; } } @@ -340,11 +340,11 @@ H5_api_file_test_parallel(void) int nerrors; if (MAINPROCESS) { - HDprintf("**********************************************\n"); - HDprintf("* *\n"); - HDprintf("* API Parallel File Tests *\n"); - HDprintf("* *\n"); - HDprintf("**********************************************\n\n"); + printf("**********************************************\n"); + printf("* *\n"); + printf("* API Parallel File Tests *\n"); + printf("* *\n"); + printf("**********************************************\n\n"); } for (i = 0, nerrors = 0; i < ARRAY_LENGTH(par_file_tests); i++) { @@ -352,13 +352,13 @@ H5_api_file_test_parallel(void) if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { if (MAINPROCESS) - HDprintf(" MPI_Barrier() failed!\n"); + printf(" MPI_Barrier() failed!\n"); } } if (MAINPROCESS) { - HDprintf("\n"); - HDprintf("Cleaning up testing files\n"); + printf("\n"); + printf("Cleaning up testing files\n"); } cleanup_files(); diff --git a/testpar/API/H5_api_group_test_parallel.c b/testpar/API/H5_api_group_test_parallel.c index d6d8f18..b894b74 100644 --- a/testpar/API/H5_api_group_test_parallel.c +++ b/testpar/API/H5_api_group_test_parallel.c @@ -24,11 +24,11 @@ H5_api_group_test_parallel(void) int nerrors; if (MAINPROCESS) { - HDprintf("**********************************************\n"); - HDprintf("* *\n"); - HDprintf("* API Parallel Group Tests *\n"); - HDprintf("* *\n"); - HDprintf("**********************************************\n\n"); + printf("**********************************************\n"); + printf("* *\n"); + printf("* API Parallel Group Tests *\n"); + printf("* *\n"); + printf("**********************************************\n\n"); } for (i = 0, nerrors = 0; i < ARRAY_LENGTH(par_group_tests); i++) { @@ -36,12 +36,12 @@ H5_api_group_test_parallel(void) if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { if (MAINPROCESS) - HDprintf(" MPI_Barrier() failed!\n"); + printf(" MPI_Barrier() failed!\n"); } } if (MAINPROCESS) - HDprintf("\n"); + printf("\n"); return nerrors; } diff --git a/testpar/API/H5_api_link_test_parallel.c b/testpar/API/H5_api_link_test_parallel.c index fb865a0..f9999bd 100644 --- a/testpar/API/H5_api_link_test_parallel.c +++ b/testpar/API/H5_api_link_test_parallel.c @@ -24,11 +24,11 @@ H5_api_link_test_parallel(void) int nerrors; if (MAINPROCESS) { - HDprintf("**********************************************\n"); - HDprintf("* *\n"); - HDprintf("* API Parallel Link Tests *\n"); - HDprintf("* *\n"); - HDprintf("**********************************************\n\n"); + printf("**********************************************\n"); + printf("* *\n"); + printf("* API Parallel Link Tests *\n"); + printf("* *\n"); + printf("**********************************************\n\n"); } for (i = 0, nerrors = 0; i < ARRAY_LENGTH(par_link_tests); i++) { @@ -36,12 +36,12 @@ H5_api_link_test_parallel(void) if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { if (MAINPROCESS) - HDprintf(" MPI_Barrier() failed!\n"); + printf(" MPI_Barrier() failed!\n"); } } if (MAINPROCESS) - HDprintf("\n"); + printf("\n"); return nerrors; } diff --git a/testpar/API/H5_api_misc_test_parallel.c b/testpar/API/H5_api_misc_test_parallel.c index 0dc85eb..307b3a0 100644 --- a/testpar/API/H5_api_misc_test_parallel.c +++ b/testpar/API/H5_api_misc_test_parallel.c @@ -24,11 +24,11 @@ H5_api_misc_test_parallel(void) int nerrors; if (MAINPROCESS) { - HDprintf("**********************************************\n"); - HDprintf("* *\n"); - HDprintf("* API Parallel Miscellaneous Tests *\n"); - HDprintf("* *\n"); - HDprintf("**********************************************\n\n"); + printf("**********************************************\n"); + printf("* *\n"); + printf("* API Parallel Miscellaneous Tests *\n"); + printf("* *\n"); + printf("**********************************************\n\n"); } for (i = 0, nerrors = 0; i < ARRAY_LENGTH(par_misc_tests); i++) { @@ -36,12 +36,12 @@ H5_api_misc_test_parallel(void) if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { if (MAINPROCESS) - HDprintf(" MPI_Barrier() failed!\n"); + printf(" MPI_Barrier() failed!\n"); } } if (MAINPROCESS) - HDprintf("\n"); + printf("\n"); return nerrors; } diff --git a/testpar/API/H5_api_object_test_parallel.c b/testpar/API/H5_api_object_test_parallel.c index a264eb2..d08de7f 100644 --- a/testpar/API/H5_api_object_test_parallel.c +++ b/testpar/API/H5_api_object_test_parallel.c @@ -24,11 +24,11 @@ H5_api_object_test_parallel(void) int nerrors; if (MAINPROCESS) { - HDprintf("**********************************************\n"); - HDprintf("* *\n"); - HDprintf("* API Parallel Object Tests *\n"); - HDprintf("* *\n"); - HDprintf("**********************************************\n\n"); + printf("**********************************************\n"); + printf("* *\n"); + printf("* API Parallel Object Tests *\n"); + printf("* *\n"); + printf("**********************************************\n\n"); } for (i = 0, nerrors = 0; i < ARRAY_LENGTH(par_object_tests); i++) { @@ -36,12 +36,12 @@ H5_api_object_test_parallel(void) if (MPI_SUCCESS != MPI_Barrier(MPI_COMM_WORLD)) { if (MAINPROCESS) - HDprintf(" MPI_Barrier() failed!\n"); + printf(" MPI_Barrier() failed!\n"); } } if (MAINPROCESS) - HDprintf("\n"); + printf("\n"); return nerrors; } diff --git a/testpar/API/H5_api_test_parallel.c b/testpar/API/H5_api_test_parallel.c index ad0fdca..a7f2839 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; } @@ -188,8 +188,8 @@ main(int argc, char **argv) * that require that level of threading support in MPI */ if (MPI_SUCCESS != MPI_Init_thread(&argc, &argv, required, &provided)) { - HDfprintf(stderr, "MPI_Init_thread failed\n"); - HDexit(EXIT_FAILURE); + fprintf(stderr, "MPI_Init_thread failed\n"); + exit(EXIT_FAILURE); } MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); @@ -197,7 +197,7 @@ main(int argc, char **argv) if (provided < required) { if (MAINPROCESS) - HDprintf("** INFO: couldn't initialize with MPI_THREAD_MULTIPLE threading support **\n"); + printf("** INFO: couldn't initialize with MPI_THREAD_MULTIPLE threading support **\n"); } /* Simple argument checking, TODO can improve that later */ @@ -229,7 +229,7 @@ main(int argc, char **argv) if (mpi_size > 1) { if (MPI_SUCCESS != MPI_Bcast(&seed, 1, MPI_UNSIGNED, 0, MPI_COMM_WORLD)) { if (MAINPROCESS) - HDfprintf(stderr, "Couldn't broadcast test seed\n"); + fprintf(stderr, "Couldn't broadcast test seed\n"); goto error; } } @@ -244,7 +244,7 @@ main(int argc, char **argv) if (NULL == (vol_connector_string = HDgetenv(HDF5_VOL_CONNECTOR))) { if (MAINPROCESS) - HDprintf("No VOL connector selected; using native VOL connector\n"); + printf("No VOL connector selected; using native VOL connector\n"); vol_connector_name = "native"; vol_connector_info = NULL; } @@ -255,7 +255,7 @@ main(int argc, char **argv) { if (NULL == (vol_connector_string_copy = HDstrdup(vol_connector_string))) { if (MAINPROCESS) - HDfprintf(stderr, "Unable to copy VOL connector string\n"); + fprintf(stderr, "Unable to copy VOL connector string\n"); INDEPENDENT_OP_ERROR(copy_connector_string); } } @@ -265,7 +265,7 @@ main(int argc, char **argv) { if (NULL == (token = HDstrtok(vol_connector_string_copy, " "))) { if (MAINPROCESS) - HDfprintf(stderr, "Error while parsing VOL connector string\n"); + fprintf(stderr, "Error while parsing VOL connector string\n"); INDEPENDENT_OP_ERROR(get_connector_name); } } @@ -279,20 +279,20 @@ main(int argc, char **argv) } if (MAINPROCESS) { - HDprintf("Running parallel API tests with VOL connector '%s' and info string '%s'\n\n", - vol_connector_name, vol_connector_info ? vol_connector_info : ""); - HDprintf("Test parameters:\n"); - HDprintf(" - Test file name: '%s'\n", H5_api_test_parallel_filename); - HDprintf(" - Number of MPI ranks: %d\n", mpi_size); - HDprintf(" - Test seed: %u\n", seed); - HDprintf("\n\n"); + printf("Running parallel API tests with VOL connector '%s' and info string '%s'\n\n", + vol_connector_name, vol_connector_info ? vol_connector_info : ""); + printf("Test parameters:\n"); + printf(" - Test file name: '%s'\n", H5_api_test_parallel_filename); + printf(" - Number of MPI ranks: %d\n", mpi_size); + printf(" - Test seed: %u\n", seed); + printf("\n\n"); } BEGIN_INDEPENDENT_OP(create_fapl) { if ((fapl_id = create_mpi_fapl(MPI_COMM_WORLD, MPI_INFO_NULL, FALSE)) < 0) { if (MAINPROCESS) - HDfprintf(stderr, "Unable to create FAPL\n"); + fprintf(stderr, "Unable to create FAPL\n"); INDEPENDENT_OP_ERROR(create_fapl); } } @@ -312,14 +312,14 @@ main(int argc, char **argv) if ((is_registered = H5VLis_connector_registered_by_name(vol_connector_name)) < 0) { if (MAINPROCESS) - HDfprintf(stderr, "Unable to determine if VOL connector is registered\n"); + fprintf(stderr, "Unable to determine if VOL connector is registered\n"); INDEPENDENT_OP_ERROR(check_vol_register); } if (!is_registered) { if (MAINPROCESS) - HDfprintf(stderr, "Specified VOL connector '%s' wasn't correctly registered!\n", - vol_connector_name); + fprintf(stderr, "Specified VOL connector '%s' wasn't correctly registered!\n", + vol_connector_name); INDEPENDENT_OP_ERROR(check_vol_register); } else { @@ -330,20 +330,20 @@ main(int argc, char **argv) */ if (H5Pget_vol_id(fapl_id, &default_con_id) < 0) { if (MAINPROCESS) - HDfprintf(stderr, "Couldn't retrieve ID of VOL connector set on default FAPL\n"); + fprintf(stderr, "Couldn't retrieve ID of VOL connector set on default FAPL\n"); INDEPENDENT_OP_ERROR(check_vol_register); } if ((registered_con_id = H5VLget_connector_id_by_name(vol_connector_name)) < 0) { if (MAINPROCESS) - HDfprintf(stderr, "Couldn't retrieve ID of registered VOL connector\n"); + fprintf(stderr, "Couldn't retrieve ID of registered VOL connector\n"); INDEPENDENT_OP_ERROR(check_vol_register); } if (default_con_id != registered_con_id) { if (MAINPROCESS) - HDfprintf(stderr, - "VOL connector set on default FAPL didn't match specified VOL connector\n"); + fprintf(stderr, + "VOL connector set on default FAPL didn't match specified VOL connector\n"); INDEPENDENT_OP_ERROR(check_vol_register); } } @@ -359,7 +359,7 @@ main(int argc, char **argv) vol_cap_flags_g = H5VL_CAP_FLAG_NONE; if (H5Pget_vol_cap_flags(fapl_id, &vol_cap_flags_g) < 0) { if (MAINPROCESS) - HDfprintf(stderr, "Unable to retrieve VOL connector capability flags\n"); + fprintf(stderr, "Unable to retrieve VOL connector capability flags\n"); INDEPENDENT_OP_ERROR(get_capability_flags); } } @@ -373,8 +373,8 @@ main(int argc, char **argv) { if (MAINPROCESS) { if (create_test_container(H5_api_test_parallel_filename, vol_cap_flags_g) < 0) { - HDfprintf(stderr, " failed to create testing container file '%s'\n", - H5_api_test_parallel_filename); + fprintf(stderr, " failed to create testing container file '%s'\n", + H5_api_test_parallel_filename); INDEPENDENT_OP_ERROR(create_test_container); } } @@ -385,67 +385,67 @@ main(int argc, char **argv) H5_api_test_run(); if (MAINPROCESS) - HDprintf("Cleaning up testing files\n"); + printf("Cleaning up testing files\n"); H5Fdelete(H5_api_test_parallel_filename, fapl_id); if (n_tests_run_g > 0) { if (MAINPROCESS) - HDprintf("The below statistics are minimum values due to the possibility of some ranks failing a " - "test while others pass:\n"); + printf("The below statistics are minimum values due to the possibility of some ranks failing a " + "test while others pass:\n"); if (MPI_SUCCESS != MPI_Allreduce(MPI_IN_PLACE, &n_tests_passed_g, 1, MPI_UNSIGNED_LONG_LONG, MPI_MIN, MPI_COMM_WORLD)) { if (MAINPROCESS) - HDprintf(" failed to collect consensus about the minimum number of tests that passed -- " - "reporting rank 0's (possibly inaccurate) value\n"); + printf(" failed to collect consensus about the minimum number of tests that passed -- " + "reporting rank 0's (possibly inaccurate) value\n"); } if (MAINPROCESS) - HDprintf("%s%zu/%zu (%.2f%%) API tests passed across all ranks with VOL connector '%s'\n", - n_tests_passed_g > 0 ? "At least " : "", n_tests_passed_g, n_tests_run_g, - ((double)n_tests_passed_g / (double)n_tests_run_g * 100.0), vol_connector_name); + printf("%s%zu/%zu (%.2f%%) API tests passed across all ranks with VOL connector '%s'\n", + n_tests_passed_g > 0 ? "At least " : "", n_tests_passed_g, n_tests_run_g, + ((double)n_tests_passed_g / (double)n_tests_run_g * 100.0), vol_connector_name); if (MPI_SUCCESS != MPI_Allreduce(MPI_IN_PLACE, &n_tests_failed_g, 1, MPI_UNSIGNED_LONG_LONG, MPI_MIN, MPI_COMM_WORLD)) { if (MAINPROCESS) - HDprintf(" failed to collect consensus about the minimum number of tests that failed -- " - "reporting rank 0's (possibly inaccurate) value\n"); + printf(" failed to collect consensus about the minimum number of tests that failed -- " + "reporting rank 0's (possibly inaccurate) value\n"); } if (MAINPROCESS) { - HDprintf("%s%zu/%zu (%.2f%%) API tests did not pass across all ranks with VOL connector '%s'\n", - n_tests_failed_g > 0 ? "At least " : "", n_tests_failed_g, n_tests_run_g, - ((double)n_tests_failed_g / (double)n_tests_run_g * 100.0), vol_connector_name); + printf("%s%zu/%zu (%.2f%%) API tests did not pass across all ranks with VOL connector '%s'\n", + n_tests_failed_g > 0 ? "At least " : "", n_tests_failed_g, n_tests_run_g, + ((double)n_tests_failed_g / (double)n_tests_run_g * 100.0), vol_connector_name); - HDprintf("%zu/%zu (%.2f%%) API tests were skipped with VOL connector '%s'\n", n_tests_skipped_g, - n_tests_run_g, ((double)n_tests_skipped_g / (double)n_tests_run_g * 100.0), - vol_connector_name); + printf("%zu/%zu (%.2f%%) API tests were skipped with VOL connector '%s'\n", n_tests_skipped_g, + n_tests_run_g, ((double)n_tests_skipped_g / (double)n_tests_run_g * 100.0), + vol_connector_name); } } if (default_con_id >= 0 && H5VLclose(default_con_id) < 0) { if (MAINPROCESS) - HDfprintf(stderr, " failed to close VOL connector ID\n"); + fprintf(stderr, " failed to close VOL connector ID\n"); } if (registered_con_id >= 0 && H5VLclose(registered_con_id) < 0) { if (MAINPROCESS) - HDfprintf(stderr, " failed to close VOL connector ID\n"); + fprintf(stderr, " failed to close VOL connector ID\n"); } if (fapl_id >= 0 && H5Pclose(fapl_id) < 0) { if (MAINPROCESS) - HDfprintf(stderr, " failed to close MPI FAPL\n"); + fprintf(stderr, " failed to close MPI FAPL\n"); } H5close(); MPI_Finalize(); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: - HDfree(vol_connector_string_copy); + free(vol_connector_string_copy); H5E_BEGIN_TRY { @@ -457,5 +457,5 @@ error: MPI_Finalize(); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } diff --git a/testpar/API/t_bigio.c b/testpar/API/t_bigio.c index 3e18c8f..febf0d5 100644 --- a/testpar/API/t_bigio.c +++ b/testpar/API/t_bigio.c @@ -133,16 +133,16 @@ point_set(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], s } if (VERBOSE_MED) { - HDprintf("start[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), " - "count[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), " - "stride[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), " - "block[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), " - "total datapoints=%" PRIuHSIZE "\n", - start[0], start[1], count[0], count[1], stride[0], stride[1], block[0], block[1], - block[0] * block[1] * count[0] * count[1]); + printf("start[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "count[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "stride[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "block[]=(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "total datapoints=%" PRIuHSIZE "\n", + start[0], start[1], count[0], count[1], stride[0], stride[1], block[0], block[1], + block[0] * block[1] * count[0] * count[1]); k = 0; for (i = 0; i < num_points; i++) { - HDprintf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]); + printf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]); k += 2; } } @@ -158,19 +158,19 @@ dataset_print(hsize_t start[], hsize_t block[], B_DATATYPE *dataset) hsize_t i, j; /* print the column heading */ - HDprintf("%-8s", "Cols:"); + printf("%-8s", "Cols:"); for (j = 0; j < block[1]; j++) { - HDprintf("%3" PRIuHSIZE " ", start[1] + j); + printf("%3" PRIuHSIZE " ", start[1] + j); } - HDprintf("\n"); + printf("\n"); /* print the slab data */ for (i = 0; i < block[0]; i++) { - HDprintf("Row %2" PRIuHSIZE ": ", i + start[0]); + printf("Row %2" PRIuHSIZE ": ", i + start[0]); for (j = 0; j < block[1]; j++) { - HDprintf("%" PRIuHSIZE " ", *dataptr++); + printf("%" PRIuHSIZE " ", *dataptr++); } - HDprintf("\n"); + printf("\n"); } } @@ -186,15 +186,15 @@ verify_data(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], /* print it if VERBOSE_MED */ if (VERBOSE_MED) { - HDprintf("verify_data dumping:::\n"); - HDprintf("start(%" PRIuHSIZE ", %" PRIuHSIZE "), " - "count(%" PRIuHSIZE ", %" PRIuHSIZE "), " - "stride(%" PRIuHSIZE ", %" PRIuHSIZE "), " - "block(%" PRIuHSIZE ", %" PRIuHSIZE ")\n", - start[0], start[1], count[0], count[1], stride[0], stride[1], block[0], block[1]); - HDprintf("original values:\n"); + printf("verify_data dumping:::\n"); + printf("start(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "count(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "stride(%" PRIuHSIZE ", %" PRIuHSIZE "), " + "block(%" PRIuHSIZE ", %" PRIuHSIZE ")\n", + start[0], start[1], count[0], count[1], stride[0], stride[1], block[0], block[1]); + printf("original values:\n"); dataset_print(start, block, original); - HDprintf("compared values:\n"); + printf("compared values:\n"); dataset_print(start, block, dataset); } @@ -203,10 +203,10 @@ verify_data(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], for (j = 0; j < block[1]; j++) { if (*dataset != *original) { if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED) { - HDprintf("Dataset Verify failed at [%" PRIuHSIZE "][%" PRIuHSIZE "]" - "(row %" PRIuHSIZE ", col %" PRIuHSIZE "): " - "expect %" PRIuHSIZE ", got %" PRIuHSIZE "\n", - i, j, i + start[0], j + start[1], *(original), *(dataset)); + printf("Dataset Verify failed at [%" PRIuHSIZE "][%" PRIuHSIZE "]" + "(row %" PRIuHSIZE ", col %" PRIuHSIZE "): " + "expect %" PRIuHSIZE ", got %" PRIuHSIZE "\n", + i, j, i + start[0], j + start[1], *(original), *(dataset)); } dataset++; original++; @@ -214,9 +214,9 @@ verify_data(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], } } if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED) - HDprintf("[more errors ...]\n"); + printf("[more errors ...]\n"); if (vrfyerrs) - HDprintf("%d errors found in verify_data\n", vrfyerrs); + printf("%d errors found in verify_data\n", vrfyerrs); return (vrfyerrs); } @@ -314,12 +314,12 @@ ccslab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t break; } if (VERBOSE_MED) { - HDprintf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total " - "datapoints=%lu\n", - (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], - (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], - (unsigned long)block[0], (unsigned long)block[1], - (unsigned long)(block[0] * block[1] * count[0] * count[1])); + printf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total " + "datapoints=%lu\n", + (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], + (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], + (unsigned long)block[0], (unsigned long)block[1], + (unsigned long)(block[0] * block[1] * count[0] * count[1])); } } @@ -372,20 +372,20 @@ ccdataset_print(hsize_t start[], hsize_t block[], DATATYPE *dataset) hsize_t i, j; /* print the column heading */ - HDprintf("Print only the first block of the dataset\n"); - HDprintf("%-8s", "Cols:"); + printf("Print only the first block of the dataset\n"); + printf("%-8s", "Cols:"); for (j = 0; j < block[1]; j++) { - HDprintf("%3lu ", (unsigned long)(start[1] + j)); + printf("%3lu ", (unsigned long)(start[1] + j)); } - HDprintf("\n"); + printf("\n"); /* print the slab data */ for (i = 0; i < block[0]; i++) { - HDprintf("Row %2lu: ", (unsigned long)(i + start[0])); + printf("Row %2lu: ", (unsigned long)(i + start[0])); for (j = 0; j < block[1]; j++) { - HDprintf("%03d ", *dataptr++); + printf("%03d ", *dataptr++); } - HDprintf("\n"); + printf("\n"); } } @@ -402,14 +402,14 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block /* print it if VERBOSE_MED */ if (VERBOSE_MED) { - HDprintf("dataset_vrfy dumping:::\n"); - HDprintf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n", - (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], - (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], - (unsigned long)block[0], (unsigned long)block[1]); - HDprintf("original values:\n"); + printf("dataset_vrfy dumping:::\n"); + printf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n", + (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], + (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], + (unsigned long)block[0], (unsigned long)block[1]); + printf("original values:\n"); ccdataset_print(start, block, original); - HDprintf("compared values:\n"); + printf("compared values:\n"); ccdataset_print(start, block, dataset); } @@ -432,8 +432,8 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block } if (*dataptr != *oriptr) { if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED) { - HDprintf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n", - (unsigned long)i, (unsigned long)j, *(oriptr), *(dataptr)); + printf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n", + (unsigned long)i, (unsigned long)j, *(oriptr), *(dataptr)); } } } @@ -441,9 +441,9 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block } } if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED) - HDprintf("[more errors ...]\n"); + printf("[more errors ...]\n"); if (vrfyerrs) - HDprintf("%d errors found in ccdataset_vrfy\n", vrfyerrs); + printf("%d errors found in ccdataset_vrfy\n", vrfyerrs); return (vrfyerrs); } @@ -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 */ @@ -495,7 +495,7 @@ dataset_big_write(void) /* Each process takes a slabs of rows. */ if (mpi_rank_g == 0) - HDprintf("\nTesting Dataset1 write by ROW\n"); + printf("\nTesting Dataset1 write by ROW\n"); /* Create a large dataset */ dims[0] = bigcount; dims[1] = (hsize_t)mpi_size_g; @@ -556,7 +556,7 @@ dataset_big_write(void) /* Each process takes a slabs of cols. */ if (mpi_rank_g == 0) - HDprintf("\nTesting Dataset2 write by COL\n"); + printf("\nTesting Dataset2 write by COL\n"); /* Create a large dataset */ dims[0] = bigcount; dims[1] = (hsize_t)mpi_size_g; @@ -617,7 +617,7 @@ dataset_big_write(void) /* ALL selection */ if (mpi_rank_g == 0) - HDprintf("\nTesting Dataset3 write select ALL proc 0, NONE others\n"); + printf("\nTesting Dataset3 write select ALL proc 0, NONE others\n"); /* Create a large dataset */ dims[0] = bigcount; dims[1] = 1; @@ -678,7 +678,7 @@ dataset_big_write(void) /* Point selection */ if (mpi_rank_g == 0) - HDprintf("\nTesting Dataset4 write point selection\n"); + printf("\nTesting Dataset4 write point selection\n"); /* Create a large dataset */ dims[0] = bigcount; dims[1] = (hsize_t)(mpi_size_g * 4); @@ -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,12 +782,12 @@ 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)); + memset(rdata, 0, bigcount * sizeof(B_DATATYPE)); /* setup file access template */ acc_tpl = H5Pcreate(H5P_FILE_ACCESS); @@ -803,7 +803,7 @@ dataset_big_read(void) VRFY_G((ret >= 0), ""); if (mpi_rank_g == 0) - HDprintf("\nRead Testing Dataset1 by COL\n"); + printf("\nRead Testing Dataset1 by COL\n"); dataset = H5Dopen2(fid, DATASET1, H5P_DEFAULT); VRFY_G((dataset >= 0), "H5Dopen2 succeeded"); @@ -854,7 +854,7 @@ dataset_big_read(void) /* verify the read data with original expected data */ ret = verify_data(start, count, stride, block, rdata, wdata); if (ret) { - HDfprintf(stderr, "verify failed\n"); + fprintf(stderr, "verify failed\n"); exit(1); } @@ -866,8 +866,8 @@ dataset_big_read(void) VRFY_G((ret >= 0), "H5Dclose1 succeeded"); if (mpi_rank_g == 0) - HDprintf("\nRead Testing Dataset2 by ROW\n"); - HDmemset(rdata, 0, bigcount * sizeof(B_DATATYPE)); + printf("\nRead Testing Dataset2 by ROW\n"); + memset(rdata, 0, bigcount * sizeof(B_DATATYPE)); dataset = H5Dopen2(fid, DATASET2, H5P_DEFAULT); VRFY_G((dataset >= 0), "H5Dopen2 succeeded"); @@ -917,7 +917,7 @@ dataset_big_read(void) /* verify the read data with original expected data */ ret = verify_data(start, count, stride, block, rdata, wdata); if (ret) { - HDfprintf(stderr, "verify failed\n"); + fprintf(stderr, "verify failed\n"); exit(1); } @@ -929,8 +929,8 @@ dataset_big_read(void) VRFY_G((ret >= 0), "H5Dclose1 succeeded"); if (mpi_rank_g == 0) - HDprintf("\nRead Testing Dataset3 read select ALL proc 0, NONE others\n"); - HDmemset(rdata, 0, bigcount * sizeof(B_DATATYPE)); + printf("\nRead Testing Dataset3 read select ALL proc 0, NONE others\n"); + memset(rdata, 0, bigcount * sizeof(B_DATATYPE)); dataset = H5Dopen2(fid, DATASET3, H5P_DEFAULT); VRFY_G((dataset >= 0), "H5Dopen2 succeeded"); @@ -982,7 +982,7 @@ dataset_big_read(void) /* verify the read data with original expected data */ ret = verify_data(start, count, stride, block, rdata, wdata); if (ret) { - HDfprintf(stderr, "verify failed\n"); + fprintf(stderr, "verify failed\n"); exit(1); } } @@ -995,7 +995,7 @@ dataset_big_read(void) VRFY_G((ret >= 0), "H5Dclose1 succeeded"); if (mpi_rank_g == 0) - HDprintf("\nRead Testing Dataset4 with Point selection\n"); + printf("\nRead Testing Dataset4 with Point selection\n"); dataset = H5Dopen2(fid, DATASET4, H5P_DEFAULT); VRFY_G((dataset >= 0), "H5Dopen2 succeeded"); @@ -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 @@ -1057,7 +1057,7 @@ dataset_big_read(void) ret = verify_data(start, count, stride, block, rdata, wdata); if (ret) { - HDfprintf(stderr, "verify failed\n"); + fprintf(stderr, "verify failed\n"); exit(1); } @@ -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 */ @@ -1106,7 +1106,7 @@ static void single_rank_independent_io(void) { if (mpi_rank_g == 0) - HDprintf("single_rank_independent_io\n"); + printf("single_rank_independent_io\n"); if (MAIN_PROCESS) { hsize_t dims[1]; @@ -1153,7 +1153,7 @@ single_rank_independent_io(void) VRFY_G((ret >= 0), "H5Dwrite succeeded"); /* Wipe buffer */ - HDmemset(data, 0, dims[0] * sizeof(int)); + memset(data, 0, dims[0] * sizeof(int)); /* Read data back */ ret = H5Dread(dset_id, H5T_NATIVE_INT, H5S_BLOCK, fspace_id, H5P_DEFAULT, data); @@ -1162,7 +1162,7 @@ single_rank_independent_io(void) /* Verify data */ for (i = 0; i < dims[0]; i++) if (data[i] != (int)(i % (uint64_t)DXFER_BIGCOUNT)) { - HDfprintf(stderr, "verify failed\n"); + fprintf(stderr, "verify failed\n"); exit(1); } @@ -1269,7 +1269,7 @@ coll_chunk1(void) { const char *filename = FILENAME[0]; if (mpi_rank_g == 0) - HDprintf("coll_chunk1\n"); + printf("coll_chunk1\n"); coll_chunktest(filename, 1, BYROW_CONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER); coll_chunktest(filename, 1, BYROW_CONT, API_NONE, HYPER, POINT, OUT_OF_ORDER); @@ -1322,7 +1322,7 @@ coll_chunk2(void) { const char *filename = FILENAME[0]; if (mpi_rank_g == 0) - HDprintf("coll_chunk2\n"); + printf("coll_chunk2\n"); coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER); coll_chunktest(filename, 1, BYROW_DISCONT, API_NONE, HYPER, POINT, OUT_OF_ORDER); @@ -1374,7 +1374,7 @@ coll_chunk3(void) { const char *filename = FILENAME[0]; if (mpi_rank_g == 0) - HDprintf("coll_chunk3\n"); + printf("coll_chunk3\n"); coll_chunktest(filename, mpi_size_g, BYROW_CONT, API_NONE, HYPER, HYPER, OUT_OF_ORDER); coll_chunktest(filename, mpi_size_g, BYROW_CONT, API_NONE, HYPER, POINT, OUT_OF_ORDER); @@ -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 @@ -1869,7 +1869,7 @@ main(int argc, char **argv) * calls. By then, MPI calls may not work. */ if (H5dont_atexit() < 0) - HDprintf("Failed to turn off atexit processing. Continue.\n"); + printf("Failed to turn off atexit processing. Continue.\n"); /* set alarm. */ /* TestAlarmOn(); */ @@ -1879,7 +1879,7 @@ main(int argc, char **argv) /* Get the capability flag of the VOL connector being used */ if (H5Pget_vol_cap_flags(acc_plist, &vol_cap_flags_g) < 0) { if (MAIN_PROCESS) - HDprintf("Failed to get the capability flag of the VOL connector being used\n"); + printf("Failed to get the capability flag of the VOL connector being used\n"); MPI_Finalize(); return 0; @@ -1891,7 +1891,7 @@ main(int argc, char **argv) if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) { if (MAIN_PROCESS) - HDprintf( + printf( "API functions for basic file, dataset basic or more aren't supported with this connector\n"); MPI_Finalize(); diff --git a/testpar/API/t_chunk_alloc.c b/testpar/API/t_chunk_alloc.c index dd78225..715e0e5 100644 --- a/testpar/API/t_chunk_alloc.c +++ b/testpar/API/t_chunk_alloc.c @@ -115,7 +115,7 @@ create_chunked_dataset(const char *filename, int chunk_factor, write_type write_ VRFY((dataset >= 0), ""); if (write_pattern == sec_last) { - HDmemset(buffer, 100, CHUNK_SIZE); + memset(buffer, 100, CHUNK_SIZE); count[0] = 1; stride[0] = 1; @@ -241,7 +241,7 @@ parallel_access_dataset(const char *filename, int chunk_factor, access_type acti /* all chunks are written by all the processes in an interleaved way*/ case write_all: - HDmemset(buffer, mpi_rank + 1, CHUNK_SIZE); + memset(buffer, mpi_rank + 1, CHUNK_SIZE); count[0] = 1; stride[0] = 1; block[0] = chunk_dims[0]; @@ -275,7 +275,7 @@ parallel_access_dataset(const char *filename, int chunk_factor, access_type acti case open_only: break; default: - HDassert(0); + assert(0); } /* Close up */ @@ -375,7 +375,7 @@ verify_data(const char *filename, int chunk_factor, write_type write_pattern, in block[0] = chunk_dims[0]; for (i = 0; i < nchunks; i++) { /* reset buffer values */ - HDmemset(buffer, -1, CHUNK_SIZE); + memset(buffer, -1, CHUNK_SIZE); offset[0] = (hsize_t)i * chunk_dims[0]; @@ -401,7 +401,7 @@ verify_data(const char *filename, int chunk_factor, write_type write_pattern, in value = 0; break; default: - HDassert(0); + assert(0); } /* verify content of the chunk */ @@ -482,7 +482,7 @@ test_chunk_alloc(void) filename = (const char *)PARATESTFILE /* GetTestParameters() */; if (VERBOSE_MED) - HDprintf("Extend Chunked allocation test on file %s\n", filename); + printf("Extend Chunked allocation test on file %s\n", filename); /* Case 1 */ /* Create chunked dataset without writing anything.*/ diff --git a/testpar/API/t_coll_chunk.c b/testpar/API/t_coll_chunk.c index 57ee605..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 */ @@ -1283,12 +1283,12 @@ ccslab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t break; } if (VERBOSE_MED) { - HDprintf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total " - "datapoints=%lu\n", - (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], - (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], - (unsigned long)block[0], (unsigned long)block[1], - (unsigned long)(block[0] * block[1] * count[0] * count[1])); + printf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total " + "datapoints=%lu\n", + (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], + (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], + (unsigned long)block[0], (unsigned long)block[1], + (unsigned long)(block[0] * block[1] * count[0] * count[1])); } } @@ -1341,20 +1341,20 @@ ccdataset_print(hsize_t start[], hsize_t block[], DATATYPE *dataset) hsize_t i, j; /* print the column heading */ - HDprintf("Print only the first block of the dataset\n"); - HDprintf("%-8s", "Cols:"); + printf("Print only the first block of the dataset\n"); + printf("%-8s", "Cols:"); for (j = 0; j < block[1]; j++) { - HDprintf("%3lu ", (unsigned long)(start[1] + j)); + printf("%3lu ", (unsigned long)(start[1] + j)); } - HDprintf("\n"); + printf("\n"); /* print the slab data */ for (i = 0; i < block[0]; i++) { - HDprintf("Row %2lu: ", (unsigned long)(i + start[0])); + printf("Row %2lu: ", (unsigned long)(i + start[0])); for (j = 0; j < block[1]; j++) { - HDprintf("%03d ", *dataptr++); + printf("%03d ", *dataptr++); } - HDprintf("\n"); + printf("\n"); } } @@ -1371,14 +1371,14 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block /* print it if VERBOSE_MED */ if (VERBOSE_MED) { - HDprintf("dataset_vrfy dumping:::\n"); - HDprintf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n", - (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], - (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], - (unsigned long)block[0], (unsigned long)block[1]); - HDprintf("original values:\n"); + printf("dataset_vrfy dumping:::\n"); + printf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n", + (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], + (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], + (unsigned long)block[0], (unsigned long)block[1]); + printf("original values:\n"); ccdataset_print(start, block, original); - HDprintf("compared values:\n"); + printf("compared values:\n"); ccdataset_print(start, block, dataset); } @@ -1401,8 +1401,8 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block } if (*dataptr != *oriptr) { if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED) { - HDprintf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n", - (unsigned long)i, (unsigned long)j, *(oriptr), *(dataptr)); + printf("Dataset Verify failed at [%lu][%lu]: expect %d, got %d\n", + (unsigned long)i, (unsigned long)j, *(oriptr), *(dataptr)); } } } @@ -1410,8 +1410,8 @@ ccdataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block } } if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED) - HDprintf("[more errors ...]\n"); + printf("[more errors ...]\n"); if (vrfyerrs) - HDprintf("%d errors found in ccdataset_vrfy\n", vrfyerrs); + printf("%d errors found in ccdataset_vrfy\n", vrfyerrs); return (vrfyerrs); } diff --git a/testpar/API/t_coll_md_read.c b/testpar/API/t_coll_md_read.c index 1c37ba7..353d5f6 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"); /* @@ -205,24 +205,24 @@ test_partial_no_selection_coll_md_read(void) * Check data integrity just to be sure. */ if (!PARTIAL_NO_SELECTION_NO_SEL_PROCESS) { - VRFY((!HDmemcmp(data, read_buf, - count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) * - sizeof(int))), + VRFY((!memcmp(data, read_buf, + count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) * + sizeof(int))), "memcmp succeeded"); } 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; } @@ -479,7 +479,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); @@ -502,7 +502,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), @@ -522,12 +522,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 dd8e58c..40ac75e 100644 --- a/testpar/API/t_dset.c +++ b/testpar/API/t_dset.c @@ -57,7 +57,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s start[0] = (hsize_t)mpi_rank * block[0]; start[1] = 0; if (VERBOSE_MED) - HDprintf("slab_set BYROW\n"); + printf("slab_set BYROW\n"); break; case BYCOL: /* Each process takes a block of columns. */ @@ -70,7 +70,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s start[0] = 0; start[1] = (hsize_t)mpi_rank * block[1]; if (VERBOSE_MED) - HDprintf("slab_set BYCOL\n"); + printf("slab_set BYCOL\n"); break; case ZROW: /* Similar to BYROW except process 0 gets 0 row */ @@ -83,7 +83,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s start[0] = (mpi_rank ? (hsize_t)mpi_rank * block[0] : 0); start[1] = 0; if (VERBOSE_MED) - HDprintf("slab_set ZROW\n"); + printf("slab_set ZROW\n"); break; case ZCOL: /* Similar to BYCOL except process 0 gets 0 column */ @@ -96,11 +96,11 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s start[0] = 0; start[1] = (mpi_rank ? (hsize_t)mpi_rank * block[1] : 0); if (VERBOSE_MED) - HDprintf("slab_set ZCOL\n"); + printf("slab_set ZCOL\n"); break; default: /* Unknown mode. Set it to cover the whole dataset. */ - HDprintf("unknown slab_set mode (%d)\n", mode); + printf("unknown slab_set mode (%d)\n", mode); block[0] = (hsize_t)dim0; block[1] = (hsize_t)dim1; stride[0] = block[0]; @@ -110,16 +110,16 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s start[0] = 0; start[1] = 0; if (VERBOSE_MED) - HDprintf("slab_set wholeset\n"); + printf("slab_set wholeset\n"); break; } if (VERBOSE_MED) { - HDprintf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total " - "datapoints=%lu\n", - (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], - (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], - (unsigned long)block[0], (unsigned long)block[1], - (unsigned long)(block[0] * block[1] * count[0] * count[1])); + printf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total " + "datapoints=%lu\n", + (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], + (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], + (unsigned long)block[0], (unsigned long)block[1], + (unsigned long)(block[0] * block[1] * count[0] * count[1])); } } @@ -156,15 +156,15 @@ point_set(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], s } if (VERBOSE_MED) { - HDprintf("start[]=(%lu, %lu), count[]=(%lu, %lu), stride[]=(%lu, %lu), block[]=(%lu, %lu), total " - "datapoints=%lu\n", - (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], - (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], - (unsigned long)block[0], (unsigned long)block[1], - (unsigned long)(block[0] * block[1] * count[0] * count[1])); + printf("start[]=(%lu, %lu), count[]=(%lu, %lu), stride[]=(%lu, %lu), block[]=(%lu, %lu), total " + "datapoints=%lu\n", + (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], + (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], + (unsigned long)block[0], (unsigned long)block[1], + (unsigned long)(block[0] * block[1] * count[0] * count[1])); k = 0; for (i = 0; i < num_points; i++) { - HDprintf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]); + printf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]); k += 2; } } @@ -199,19 +199,19 @@ dataset_print(hsize_t start[], hsize_t block[], DATATYPE *dataset) hsize_t i, j; /* print the column heading */ - HDprintf("%-8s", "Cols:"); + printf("%-8s", "Cols:"); for (j = 0; j < block[1]; j++) { - HDprintf("%3lu ", (unsigned long)(start[1] + j)); + printf("%3lu ", (unsigned long)(start[1] + j)); } - HDprintf("\n"); + printf("\n"); /* print the slab data */ for (i = 0; i < block[0]; i++) { - HDprintf("Row %2lu: ", (unsigned long)(i + start[0])); + printf("Row %2lu: ", (unsigned long)(i + start[0])); for (j = 0; j < block[1]; j++) { - HDprintf("%03d ", *dataptr++); + printf("%03d ", *dataptr++); } - HDprintf("\n"); + printf("\n"); } } @@ -227,14 +227,14 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[] /* print it if VERBOSE_MED */ if (VERBOSE_MED) { - HDprintf("dataset_vrfy dumping:::\n"); - HDprintf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n", - (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], - (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], - (unsigned long)block[0], (unsigned long)block[1]); - HDprintf("original values:\n"); + printf("dataset_vrfy dumping:::\n"); + printf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n", + (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], + (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], + (unsigned long)block[0], (unsigned long)block[1]); + printf("original values:\n"); dataset_print(start, block, original); - HDprintf("compared values:\n"); + printf("compared values:\n"); dataset_print(start, block, dataset); } @@ -243,9 +243,9 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[] for (j = 0; j < block[1]; j++) { if (*dataset != *original) { if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED) { - HDprintf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n", - (unsigned long)i, (unsigned long)j, (unsigned long)(i + start[0]), - (unsigned long)(j + start[1]), *(original), *(dataset)); + printf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n", + (unsigned long)i, (unsigned long)j, (unsigned long)(i + start[0]), + (unsigned long)(j + start[1]), *(original), *(dataset)); } dataset++; original++; @@ -253,9 +253,9 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[] } } if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED) - HDprintf("[more errors ...]\n"); + printf("[more errors ...]\n"); if (vrfyerrs) - HDprintf("%d errors found in dataset_vrfy\n", vrfyerrs); + printf("%d errors found in dataset_vrfy\n", vrfyerrs); return (vrfyerrs); } @@ -296,7 +296,7 @@ dataset_writeInd(void) filename = PARATESTFILE /* GetTestParameters() */; if (VERBOSE_MED) - HDprintf("Independent write test on file %s\n", filename); + printf("Independent write test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -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 @@ -384,7 +384,7 @@ dataset_writeInd(void) /* setup dimensions again to write with zero rows for process 0 */ if (VERBOSE_MED) - HDprintf("writeInd by some with zero row\n"); + printf("writeInd by some with zero row\n"); slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW); ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); @@ -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 */ @@ -447,7 +447,7 @@ dataset_readInd(void) filename = PARATESTFILE /* GetTestParameters() */; if (VERBOSE_MED) - HDprintf("Independent read test on file %s\n", filename); + printf("Independent read test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -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); } /* @@ -590,7 +590,7 @@ dataset_writeAll(void) filename = PARATESTFILE /* GetTestParameters() */; if (VERBOSE_MED) - HDprintf("Collective write test on file %s\n", filename); + printf("Collective write test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -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 @@ -722,7 +722,7 @@ dataset_writeAll(void) /* setup dimensions again to writeAll with zero rows for process 0 */ if (VERBOSE_MED) - HDprintf("writeAll by some with zero row\n"); + printf("writeAll by some with zero row\n"); slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW); ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); @@ -787,7 +787,7 @@ dataset_writeAll(void) /* setup dimensions again to writeAll with zero columns for process 0 */ if (VERBOSE_MED) - HDprintf("writeAll by some with zero col\n"); + printf("writeAll by some with zero col\n"); slab_set(mpi_rank, mpi_size, start, count, stride, block, ZCOL); ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); @@ -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); } /* @@ -1119,7 +1119,7 @@ dataset_readAll(void) filename = PARATESTFILE /* GetTestParameters() */; if (VERBOSE_MED) - HDprintf("Collective read test on file %s\n", filename); + printf("Collective read test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -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 @@ -1229,7 +1229,7 @@ dataset_readAll(void) /* setup dimensions again to readAll with zero columns for process 0 */ if (VERBOSE_MED) - HDprintf("readAll by some with zero col\n"); + printf("readAll by some with zero col\n"); slab_set(mpi_rank, mpi_size, start, count, stride, block, ZCOL); ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); @@ -1296,7 +1296,7 @@ dataset_readAll(void) /* setup dimensions again to readAll with zero rows for process 0 */ if (VERBOSE_MED) - HDprintf("readAll by some with zero row\n"); + printf("readAll by some with zero row\n"); slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW); ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); @@ -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); } /* @@ -1546,7 +1546,7 @@ extend_writeInd(void) filename = PARATESTFILE /* GetTestParameters() */; if (VERBOSE_MED) - HDprintf("Extend independent write test on file %s\n", filename); + printf("Extend independent write test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -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 @@ -1611,7 +1611,7 @@ extend_writeInd(void) /* set up dataset storage chunk sizes and creation property list */ if (VERBOSE_MED) - HDprintf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]); + printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]); dataset_pl = H5Pcreate(H5P_DATASET_CREATE); VRFY((dataset_pl >= 0), "H5Pcreate succeeded"); ret = H5Pset_chunk(dataset_pl, RANK, chunk_dims); @@ -1742,7 +1742,7 @@ extend_writeInd(void) /* release data buffers */ if (data_array1) - HDfree(data_array1); + free(data_array1); } /* @@ -1774,7 +1774,7 @@ extend_writeInd2(void) filename = PARATESTFILE /* GetTestParameters() */; if (VERBOSE_MED) - HDprintf("Extend independent write test #2 on file %s\n", filename); + printf("Extend independent write test #2 on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -1844,8 +1844,8 @@ extend_writeInd2(void) if (VERBOSE_MED) { MESG("writing at offset zero: "); for (i = 0; i < (int)orig_size; i++) - HDprintf("%s%d", i ? ", " : "", written[i]); - HDprintf("\n"); + printf("%s%d", i ? ", " : "", written[i]); + printf("\n"); } ret = H5Dwrite(dataset, H5T_NATIVE_INT, ms, fs, H5P_DEFAULT, written); VRFY((ret >= 0), "H5Dwrite succeeded"); @@ -1857,15 +1857,15 @@ extend_writeInd2(void) VRFY((ret >= 0), "H5Dread succeeded"); for (i = 0; i < (int)orig_size; i++) if (written[i] != retrieved[i]) { - HDprintf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i, - written[i], i, retrieved[i]); + printf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i, + written[i], i, retrieved[i]); nerrors++; } if (VERBOSE_MED) { MESG("read at offset zero: "); for (i = 0; i < (int)orig_size; i++) - HDprintf("%s%d", i ? ", " : "", retrieved[i]); - HDprintf("\n"); + printf("%s%d", i ? ", " : "", retrieved[i]); + printf("\n"); } /* ------------------------- @@ -1887,8 +1887,8 @@ extend_writeInd2(void) if (VERBOSE_MED) { MESG("writing at offset 10: "); for (i = 0; i < (int)orig_size; i++) - HDprintf("%s%d", i ? ", " : "", written[i]); - HDprintf("\n"); + printf("%s%d", i ? ", " : "", written[i]); + printf("\n"); } ret = H5Sselect_hyperslab(fs, H5S_SELECT_SET, &orig_size, NULL, &one, &orig_size); VRFY((ret >= 0), "H5Sselect_hyperslab succeeded"); @@ -1902,15 +1902,15 @@ extend_writeInd2(void) VRFY((ret >= 0), "H5Dread succeeded"); for (i = 0; i < (int)orig_size; i++) if (written[i] != retrieved[i]) { - HDprintf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i, - written[i], i, retrieved[i]); + printf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i, + written[i], i, retrieved[i]); nerrors++; } if (VERBOSE_MED) { MESG("read at offset 10: "); for (i = 0; i < (int)orig_size; i++) - HDprintf("%s%d", i ? ", " : "", retrieved[i]); - HDprintf("\n"); + printf("%s%d", i ? ", " : "", retrieved[i]); + printf("\n"); } /* Close dataset collectively */ @@ -1949,7 +1949,7 @@ extend_readInd(void) filename = PARATESTFILE /* GetTestParameters() */; if (VERBOSE_MED) - HDprintf("Extend independent read test on file %s\n", filename); + printf("Extend independent read test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -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); } /* @@ -2143,7 +2143,7 @@ extend_writeAll(void) filename = PARATESTFILE /* GetTestParameters() */; if (VERBOSE_MED) - HDprintf("Extend independent write test on file %s\n", filename); + printf("Extend independent write test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -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 @@ -2208,7 +2208,7 @@ extend_writeAll(void) /* set up dataset storage chunk sizes and creation property list */ if (VERBOSE_MED) - HDprintf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]); + printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]); dataset_pl = H5Pcreate(H5P_DATASET_CREATE); VRFY((dataset_pl >= 0), "H5Pcreate succeeded"); ret = H5Pset_chunk(dataset_pl, RANK, chunk_dims); @@ -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 */ @@ -2393,7 +2393,7 @@ extend_readAll(void) filename = PARATESTFILE /* GetTestParameters() */; if (VERBOSE_MED) - HDprintf("Extend independent read test on file %s\n", filename); + printf("Extend independent read test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -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 @@ -2596,7 +2596,7 @@ compress_readAll(void) filename = PARATESTFILE /* GetTestParameters() */; if (VERBOSE_MED) - HDprintf("Collective chunked dataset read test on file %s\n", filename); + printf("Collective chunked dataset read test on file %s\n", filename); /* Retrieve MPI parameters */ MPI_Comm_size(comm, &mpi_size); @@ -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++) @@ -2727,8 +2727,8 @@ compress_readAll(void) /* Verify data read */ for (u = 0; u < dim; u++) if (data_orig[u] != data_read[u]) { - HDprintf("Line #%d: written!=retrieved: data_orig[%u]=%d, data_read[%u]=%d\n", __LINE__, - (unsigned)u, data_orig[u], (unsigned)u, data_read[u]); + printf("Line #%d: written!=retrieved: data_orig[%u]=%d, data_read[%u]=%d\n", __LINE__, + (unsigned)u, data_orig[u], (unsigned)u, data_read[u]); nerrors++; } @@ -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 */ @@ -2799,7 +2799,7 @@ none_selection_chunk(void) filename = PARATESTFILE /* GetTestParameters() */; if (VERBOSE_MED) - HDprintf("Extend independent write test on file %s\n", filename); + printf("Extend independent write test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -2841,7 +2841,7 @@ none_selection_chunk(void) /* set up dataset storage chunk sizes and creation property list */ if (VERBOSE_MED) - HDprintf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]); + printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]); dataset_pl = H5Pcreate(H5P_DATASET_CREATE); VRFY((dataset_pl >= 0), "H5Pcreate succeeded"); ret = H5Pset_chunk(dataset_pl, RANK, chunk_dims); @@ -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 @@ -3116,13 +3116,13 @@ test_actual_io_mode(int selection_mode) MPI_Barrier(MPI_COMM_WORLD); - HDassert(mpi_size >= 1); + assert(mpi_size >= 1); mpi_comm = MPI_COMM_WORLD; mpi_info = MPI_INFO_NULL; filename = (const char *)PARATESTFILE /* GetTestParameters() */; - HDassert(filename != NULL); + assert(filename != NULL); /* Setup the file access template */ fapl = create_faccess_plist(mpi_comm, mpi_info, facc_type); @@ -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; @@ -3418,8 +3418,8 @@ test_actual_io_mode(int selection_mode) VRFY((actual_io_mode_write == actual_io_mode_expected), message); } else { - HDfprintf(stderr, "%s %d -> (%d,%d)\n", test_name, mpi_rank, actual_chunk_opt_mode_write, - actual_io_mode_write); + fprintf(stderr, "%s %d -> (%d,%d)\n", test_name, mpi_rank, actual_chunk_opt_mode_write, + actual_io_mode_write); } /* To test that the property is successfully reset to the default, we perform some @@ -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; } @@ -3517,7 +3517,7 @@ actual_io_mode_tests(void) if (mpi_size > 2) test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_MIX); else - HDfprintf(stdout, "Multi Chunk Mixed test requires 3 processes minimum\n"); + fprintf(stdout, "Multi Chunk Mixed test requires 3 processes minimum\n"); test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_MIX_DISAGREE); @@ -3638,7 +3638,7 @@ test_no_collective_cause_mode(int selection_mode) MPI_Barrier(MPI_COMM_WORLD); - HDassert(mpi_size >= 1); + assert(mpi_size >= 1); mpi_comm = MPI_COMM_WORLD; mpi_info = MPI_INFO_NULL; @@ -3680,7 +3680,7 @@ test_no_collective_cause_mode(int selection_mode) } filename = (const char *)PARATESTFILE /* GetTestParameters() */; - HDassert(filename != NULL); + assert(filename != NULL); /* Setup the file access template */ fapl = create_faccess_plist(mpi_comm, mpi_info, l_facc_type); @@ -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; @@ -3835,11 +3835,11 @@ test_no_collective_cause_mode(int selection_mode) "reading and writing are the same for global cause of Broken Collective I/O"); /* Test values */ - HDmemset(message, 0, sizeof(message)); + memset(message, 0, sizeof(message)); HDsnprintf(message, sizeof(message), "Local cause of Broken Collective I/O has the correct value for %s.\n", test_name); VRFY((no_collective_cause_local_write == no_collective_cause_local_expected), message); - HDmemset(message, 0, sizeof(message)); + memset(message, 0, sizeof(message)); HDsnprintf(message, sizeof(message), "Global cause of Broken Collective I/O has the correct value for %s.\n", test_name); VRFY((no_collective_cause_global_write == no_collective_cause_global_expected), message); @@ -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) @@ -3946,11 +3946,11 @@ dataset_atomicity(void) dim1 = 32; filename = PARATESTFILE /* GetTestParameters() */; if (facc_type != FACC_MPIO) { - HDprintf("Atomicity tests will not work without the MPIO VFD\n"); + printf("Atomicity tests will not work without the MPIO VFD\n"); return; } if (VERBOSE_MED) - HDprintf("atomic writes to file %s\n", filename); + printf("atomic writes to file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -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); @@ -4095,9 +4095,9 @@ dataset_atomicity(void) j = 0; k = 0; for (i = 0; i < dim0; i++) { - HDprintf("\n"); + printf("\n"); for (j = 0; j < dim1; j++) - HDprintf("%d ", read_buf[k++]); + printf("%d ", read_buf[k++]); } } @@ -4111,8 +4111,8 @@ dataset_atomicity(void) "Atomicity Test Failed Process %d: Value read should be 0 or 5\n"); for (i = 1; i < buf_size; i++) { if (read_buf[i] != compare) { - HDprintf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank, i, - read_buf[i], compare); + printf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank, i, + read_buf[i], compare); nerrors++; } } @@ -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; @@ -4195,11 +4195,11 @@ dataset_atomicity(void) j = 0; k = 0; for (i = 0; i < dim0; i++) { - HDprintf("\n"); + printf("\n"); for (j = 0; j < dim1; j++) - HDprintf("%d ", read_buf[k++]); + printf("%d ", read_buf[k++]); } - HDprintf("\n"); + printf("\n"); } } @@ -4231,8 +4231,8 @@ dataset_atomicity(void) continue; } else if (compare != read_buf[k]) { - HDprintf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank, - k, read_buf[k], compare); + printf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank, + k, read_buf[k], compare); nerrors++; } k++; @@ -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"); @@ -4294,7 +4294,7 @@ test_dense_attr(void) /* get filename */ filename = (const char *)PARATESTFILE /* GetTestParameters() */; - HDassert(filename != NULL); + assert(filename != NULL); fpid = H5Pcreate(H5P_FILE_ACCESS); VRFY((fpid > 0), "H5Pcreate succeeded"); diff --git a/testpar/API/t_file.c b/testpar/API/t_file.c index a96f593..ccd4e6e 100644 --- a/testpar/API/t_file.c +++ b/testpar/API/t_file.c @@ -71,7 +71,7 @@ test_split_comm_access(void) filename = (const char *)PARATESTFILE /* GetTestParameters()*/; if (VERBOSE_MED) - HDprintf("Split Communicator access test on file %s\n", filename); + printf("Split Communicator access test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -151,7 +151,7 @@ test_page_buffer_access(void) filename = (const char *)GetTestParameters(); if (VERBOSE_MED) - HDprintf("Page Buffer Usage in Parallel %s\n", filename); + printf("Page Buffer Usage in Parallel %s\n", filename); fapl = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); VRFY((fapl >= 0), "create_faccess_plist succeeded"); @@ -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; @@ -557,7 +557,7 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str ret = H5Dclose(dset_id); VRFY((ret == 0), ""); - HDmemset(data_array, 0, num_elements * sizeof(DATATYPE)); + memset(data_array, 0, num_elements * sizeof(DATATYPE)); dset_id = H5Dopen2(grp_id, dset_name, H5P_DEFAULT); VRFY((dset_id >= 0), ""); @@ -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); @@ -727,8 +727,8 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t entry_ptr = cache_ptr->index[i]; while (entry_ptr != NULL) { - HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); - HDassert(entry_ptr->is_dirty == FALSE); + assert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + assert(entry_ptr->is_dirty == FALSE); if (!entry_ptr->is_pinned && !entry_ptr->is_protected) { ret = H5AC_expunge_entry(f, entry_ptr->type, entry_ptr->addr, 0); @@ -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 64b69b2..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++) @@ -196,12 +196,11 @@ filter_read_internal(const char *filename, hid_t dcpl, hsize_t *dset_size) for (i = 0; i < hs_size[0]; i++) { for (j = 0; j < hs_size[1]; j++) { if (points[i * size[1] + (size_t)hs_offset[1] + j] != check[i * hs_size[1] + j]) { - HDfprintf(stderr, " Read different values than written.\n"); - HDfprintf(stderr, " At index %lu,%lu\n", (unsigned long)(i), - (unsigned long)(hs_offset[1] + j)); - HDfprintf(stderr, " At original: %d\n", - (int)points[i * size[1] + (size_t)hs_offset[1] + j]); - HDfprintf(stderr, " At returned: %d\n", (int)check[i * hs_size[1] + j]); + fprintf(stderr, " Read different values than written.\n"); + fprintf(stderr, " At index %lu,%lu\n", (unsigned long)(i), + (unsigned long)(hs_offset[1] + j)); + fprintf(stderr, " At original: %d\n", (int)points[i * size[1] + (size_t)hs_offset[1] + j]); + fprintf(stderr, " At returned: %d\n", (int)check[i * hs_size[1] + j]); VRFY(FALSE, ""); } } @@ -228,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); } @@ -285,7 +284,7 @@ test_filter_read(void) filename = PARATESTFILE /* GetTestParameters() */; if (VERBOSE_MED) - HDprintf("Parallel reading of dataset written with filters %s\n", filename); + printf("Parallel reading of dataset written with filters %s\n", filename); MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); diff --git a/testpar/API/t_mdset.c b/testpar/API/t_mdset.c index c53ec2c..cc49e7b 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"); @@ -225,7 +225,7 @@ multiple_dset_write(void) H5Dclose(dataset); #ifdef BARRIER_CHECKS if (!((n + 1) % 10)) { - HDprintf("created %d datasets\n", n + 1); + printf("created %d datasets\n", n + 1); MPI_Barrier(MPI_COMM_WORLD); } #endif /* BARRIER_CHECKS */ @@ -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"); @@ -366,15 +366,15 @@ compact_dataset(void) for (j = 0; j < size; j++) if (!H5_DBL_ABS_EQUAL(inme[(i * size) + j], outme[(i * size) + j])) if (err_num++ < MAX_ERR_REPORT || VERBOSE_MED) - HDprintf("Dataset Verify failed at [%d][%d]: expect %f, got %f\n", i, j, - outme[(i * size) + j], inme[(i * size) + j]); + printf("Dataset Verify failed at [%d][%d]: expect %f, got %f\n", i, j, + outme[(i * size) + j], inme[(i * size) + j]); H5Pclose(plist); 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"); @@ -730,7 +730,7 @@ dataset_fillvalue(void) VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded"); /* set entire read buffer with the constant 2 */ - HDmemset(rdata, 2, (size_t)(dset_size * sizeof(int))); + memset(rdata, 2, (size_t)(dset_size * sizeof(int))); /* Read the entire dataset back */ ret = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, rdata); @@ -755,13 +755,13 @@ dataset_fillvalue(void) for (l = 0; l < (int)dset_dims[3]; l++, trdata++) if (*trdata != 0) if (err_num++ < MAX_ERR_REPORT || VERBOSE_MED) - HDprintf( + printf( "Rank %d: Dataset Verify failed at [%d][%d][%d][%d]: expect 0, got %d\n", mpi_rank, i, j, k, l, *trdata); if (err_num > MAX_ERR_REPORT && !VERBOSE_MED) - HDprintf("Rank %d: [more errors ...]\n", mpi_rank); + printf("Rank %d: [more errors ...]\n", mpi_rank); if (err_num) { - HDprintf("Rank %d: %d errors found in check_value\n", mpi_rank, err_num); + printf("Rank %d: %d errors found in check_value\n", mpi_rank, err_num); nerrors++; } } @@ -820,7 +820,7 @@ dataset_fillvalue(void) VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded"); /* set entire read buffer with the constant 2 */ - HDmemset(rdata, 2, (size_t)(dset_size * sizeof(int))); + memset(rdata, 2, (size_t)(dset_size * sizeof(int))); /* Read the entire dataset back */ ret = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, rdata); @@ -847,19 +847,19 @@ dataset_fillvalue(void) if (i < mpi_size) { if (*twdata != *trdata) if (err_num++ < MAX_ERR_REPORT || VERBOSE_MED) - HDprintf("Dataset Verify failed at [%d][%d][%d][%d]: expect %d, got %d\n", - i, j, k, l, *twdata, *trdata); + printf("Dataset Verify failed at [%d][%d][%d][%d]: expect %d, got %d\n", + i, j, k, l, *twdata, *trdata); } /* end if */ else { if (*trdata != 0) if (err_num++ < MAX_ERR_REPORT || VERBOSE_MED) - HDprintf("Dataset Verify failed at [%d][%d][%d][%d]: expect 0, got %d\n", - i, j, k, l, *trdata); + printf("Dataset Verify failed at [%d][%d][%d][%d]: expect 0, got %d\n", i, + j, k, l, *trdata); } /* end else */ if (err_num > MAX_ERR_REPORT && !VERBOSE_MED) - HDprintf("[more errors ...]\n"); + printf("[more errors ...]\n"); if (err_num) { - HDprintf("%d errors found in check_value\n", err_num); + printf("%d errors found in check_value\n", err_num); nerrors++; } } @@ -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); @@ -998,7 +998,7 @@ collective_group_write(void) #ifdef BARRIER_CHECKS if (!((m + 1) % 10)) { - HDprintf("created %d groups\n", m + 1); + printf("created %d groups\n", m + 1); MPI_Barrier(MPI_COMM_WORLD); } #endif /* BARRIER_CHECKS */ @@ -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); } /* @@ -1225,7 +1225,7 @@ multiple_group_write(void) #ifdef BARRIER_CHECKS if (!((m + 1) % 10)) { - HDprintf("created %d groups\n", m + 1); + printf("created %d groups\n", m + 1); MPI_Barrier(MPI_COMM_WORLD); } #endif /* BARRIER_CHECKS */ @@ -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); } /* @@ -1300,7 +1300,7 @@ create_group_recursive(hid_t memspace, hid_t filespace, hid_t gid, int counter) #ifdef BARRIER_CHECKS if (!((counter + 1) % 10)) { - HDprintf("created %dth child groups\n", counter + 1); + printf("created %dth child groups\n", counter + 1); MPI_Barrier(MPI_COMM_WORLD); } #endif /* BARRIER_CHECKS */ @@ -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; } @@ -1578,14 +1578,14 @@ check_value(DATATYPE *indata, DATATYPE *outdata, int size) for (j = chunk_origin[1]; j < (chunk_origin[1] + chunk_dims[1]); j++) { if (*indata != *outdata) if (err_num++ < MAX_ERR_REPORT || VERBOSE_MED) - HDprintf("Dataset Verify failed at [%lu][%lu](row %lu, col%lu): expect %d, got %d\n", - (unsigned long)i, (unsigned long)j, (unsigned long)i, (unsigned long)j, *outdata, - *indata); + printf("Dataset Verify failed at [%lu][%lu](row %lu, col%lu): expect %d, got %d\n", + (unsigned long)i, (unsigned long)j, (unsigned long)i, (unsigned long)j, *outdata, + *indata); } if (err_num > MAX_ERR_REPORT && !VERBOSE_MED) - HDprintf("[more errors ...]\n"); + printf("[more errors ...]\n"); if (err_num) - HDprintf("%d errors found in check_value\n", err_num); + printf("%d errors found in check_value\n", err_num); return err_num; } @@ -1697,7 +1697,7 @@ io_mode_confusion(void) */ if (verbose) - HDfprintf(stdout, "%0d:%s: Setting up property list.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Setting up property list.\n", mpi_rank, fcn_name); plist_id = H5Pcreate(H5P_FILE_ACCESS); VRFY((plist_id != -1), "H5Pcreate() failed"); @@ -1710,7 +1710,7 @@ io_mode_confusion(void) */ if (verbose) - HDfprintf(stdout, "%0d:%s: Creating new file.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Creating new file.\n", mpi_rank, fcn_name); file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, plist_id); VRFY((file_id >= 0), "H5Fcreate() failed"); @@ -1723,7 +1723,7 @@ io_mode_confusion(void) */ if (verbose) - HDfprintf(stdout, "%0d:%s: Creating the dataspace for the dataset.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Creating the dataspace for the dataset.\n", mpi_rank, fcn_name); dimsf[0] = N; filespace = H5Screate_simple(rank, dimsf, NULL); @@ -1734,7 +1734,7 @@ io_mode_confusion(void) */ if (verbose) - HDfprintf(stdout, "%0d:%s: Creating the dataset, and closing filespace.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Creating the dataset, and closing filespace.\n", mpi_rank, fcn_name); dset_id = H5Dcreate2(file_id, dataset_name, H5T_NATIVE_INT, filespace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); @@ -1744,33 +1744,33 @@ io_mode_confusion(void) VRFY((status >= 0), "H5Sclose() failed"); if (verbose) - HDfprintf(stdout, "%0d:%s: Calling H5Screate_simple().\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Calling H5Screate_simple().\n", mpi_rank, fcn_name); memspace = H5Screate_simple(rank, dimsf, NULL); VRFY((memspace >= 0), "H5Screate_simple() failed."); if (mpi_rank == 0) { if (verbose) - HDfprintf(stdout, "%0d:%s: Calling H5Sselect_all(memspace).\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Calling H5Sselect_all(memspace).\n", mpi_rank, fcn_name); status = H5Sselect_all(memspace); VRFY((status >= 0), "H5Sselect_all() failed"); } else { if (verbose) - HDfprintf(stdout, "%0d:%s: Calling H5Sselect_none(memspace).\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Calling H5Sselect_none(memspace).\n", mpi_rank, fcn_name); status = H5Sselect_none(memspace); VRFY((status >= 0), "H5Sselect_none() failed"); } if (verbose) - HDfprintf(stdout, "%0d:%s: Calling MPI_Barrier().\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Calling MPI_Barrier().\n", mpi_rank, fcn_name); MPI_Barrier(MPI_COMM_WORLD); if (verbose) - HDfprintf(stdout, "%0d:%s: Calling H5Dget_space().\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Calling H5Dget_space().\n", mpi_rank, fcn_name); filespace = H5Dget_space(dset_id); VRFY((filespace >= 0), "H5Dget_space() failed"); @@ -1778,32 +1778,32 @@ io_mode_confusion(void) /* select all */ if (mpi_rank == 0) { if (verbose) - HDfprintf(stdout, "%0d:%s: Calling H5Sselect_elements() -- set up hang?\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Calling H5Sselect_elements() -- set up hang?\n", mpi_rank, fcn_name); status = H5Sselect_elements(filespace, H5S_SELECT_SET, N, (const hsize_t *)&coord); VRFY((status >= 0), "H5Sselect_elements() failed"); } else { /* select nothing */ if (verbose) - HDfprintf(stdout, "%0d:%s: Calling H5Sselect_none().\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Calling H5Sselect_none().\n", mpi_rank, fcn_name); status = H5Sselect_none(filespace); VRFY((status >= 0), "H5Sselect_none() failed"); } if (verbose) - HDfprintf(stdout, "%0d:%s: Calling MPI_Barrier().\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Calling MPI_Barrier().\n", mpi_rank, fcn_name); MPI_Barrier(MPI_COMM_WORLD); if (verbose) - HDfprintf(stdout, "%0d:%s: Calling H5Pcreate().\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Calling H5Pcreate().\n", mpi_rank, fcn_name); plist_id = H5Pcreate(H5P_DATASET_XFER); VRFY((plist_id != -1), "H5Pcreate() failed"); if (verbose) - HDfprintf(stdout, "%0d:%s: Calling H5Pset_dxpl_mpio().\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Calling H5Pset_dxpl_mpio().\n", mpi_rank, fcn_name); status = H5Pset_dxpl_mpio(plist_id, H5FD_MPIO_COLLECTIVE); VRFY((status >= 0), "H5Pset_dxpl_mpio() failed"); @@ -1813,12 +1813,12 @@ io_mode_confusion(void) } if (verbose) - HDfprintf(stdout, "%0d:%s: Calling H5Dwrite() -- hang here?.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Calling H5Dwrite() -- hang here?.\n", mpi_rank, fcn_name); status = H5Dwrite(dset_id, H5T_NATIVE_INT, memspace, filespace, plist_id, data); if (verbose) - HDfprintf(stdout, "%0d:%s: Returned from H5Dwrite(), status=%d.\n", mpi_rank, fcn_name, status); + fprintf(stdout, "%0d:%s: Returned from H5Dwrite(), status=%d.\n", mpi_rank, fcn_name, status); VRFY((status >= 0), "H5Dwrite() failed"); /* @@ -1826,7 +1826,7 @@ io_mode_confusion(void) */ if (verbose) - HDfprintf(stdout, "%0d:%s: Cleaning up from test.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Cleaning up from test.\n", mpi_rank, fcn_name); status = H5Dclose(dset_id); VRFY((status >= 0), "H5Dclose() failed"); @@ -1844,7 +1844,7 @@ io_mode_confusion(void) VRFY((status >= 0), "H5Fclose() failed"); if (verbose) - HDfprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name); return; @@ -1955,7 +1955,7 @@ rr_obj_hdr_flush_confusion(void) return; } - HDassert(mpi_size > 2); + assert(mpi_size > 2); is_reader = mpi_rank % 2; mrc = MPI_Comm_split(MPI_COMM_WORLD, is_reader, mpi_rank, &comm); @@ -1975,7 +1975,7 @@ rr_obj_hdr_flush_confusion(void) MPI_Comm_free(&comm); if (verbose) - HDfprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name); return; @@ -2048,7 +2048,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: Setting up property list.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Setting up property list.\n", mpi_rank, fcn_name); fapl_id = H5Pcreate(H5P_FILE_ACCESS); VRFY((fapl_id != -1), "H5Pcreate(H5P_FILE_ACCESS) failed"); @@ -2061,7 +2061,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: Creating new file \"%s\".\n", mpi_rank, fcn_name, filename); + fprintf(stdout, "%0d:%s: Creating new file \"%s\".\n", mpi_rank, fcn_name, filename); file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id); VRFY((file_id >= 0), "H5Fcreate() failed"); @@ -2074,7 +2074,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: Creating the datasets.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Creating the datasets.\n", mpi_rank, fcn_name); disk_size[0] = (hsize_t)(LOCAL_DATA_SIZE * mpi_size); mem_size[0] = (hsize_t)(LOCAL_DATA_SIZE); @@ -2095,7 +2095,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: Setting up dxpl.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Setting up dxpl.\n", mpi_rank, fcn_name); dxpl_id = H5Pcreate(H5P_DATASET_XFER); VRFY((dxpl_id != -1), "H5Pcreate(H5P_DATASET_XFER) failed.\n"); @@ -2108,7 +2108,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: Writing datasets.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Writing datasets.\n", mpi_rank, fcn_name); disk_count[0] = (hsize_t)(LOCAL_DATA_SIZE); disk_start[0] = (hsize_t)(LOCAL_DATA_SIZE * mpi_rank); @@ -2137,7 +2137,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: closing dataspaces.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: closing dataspaces.\n", mpi_rank, fcn_name); for (i = 0; i < NUM_DATA_SETS; i++) { err = H5Sclose(disk_space[i]); @@ -2153,7 +2153,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name); err = H5Fflush(file_id, H5F_SCOPE_GLOBAL); VRFY((err >= 0), "H5Fflush(1) failed.\n"); @@ -2167,7 +2167,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: writing attributes.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: writing attributes.\n", mpi_rank, fcn_name); att_size[0] = (hsize_t)(LOCAL_DATA_SIZE); for (j = 0; j < LOCAL_DATA_SIZE; j++) { @@ -2192,7 +2192,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: closing attr ids and spaces .\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: closing attr ids and spaces .\n", mpi_rank, fcn_name); for (i = 0; i < NUM_DATA_SETS; i++) { err = H5Sclose(att_space[i]); @@ -2208,7 +2208,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name); err = H5Fflush(file_id, H5F_SCOPE_GLOBAL); VRFY((err >= 0), "H5Fflush(2) failed.\n"); @@ -2222,7 +2222,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: writing large attributes.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: writing large attributes.\n", mpi_rank, fcn_name); lg_att_size[0] = (hsize_t)(LARGE_ATTR_SIZE); @@ -2256,7 +2256,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name); err = H5Fflush(file_id, H5F_SCOPE_GLOBAL); VRFY((err >= 0), "H5Fflush(3) failed.\n"); @@ -2270,7 +2270,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: writing different large attributes.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: writing different large attributes.\n", mpi_rank, fcn_name); for (j = 0; j < LARGE_ATTR_SIZE; j++) { lg_att[j] = (double)(j + 2); @@ -2290,7 +2290,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) * flush the metadata cache again */ if (verbose) - HDfprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: flushing metadata cache.\n", mpi_rank, fcn_name); err = H5Fflush(file_id, H5F_SCOPE_GLOBAL); VRFY((err >= 0), "H5Fflush(3) failed.\n"); @@ -2306,7 +2306,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: closing large attr ids and spaces .\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: closing large attr ids and spaces .\n", mpi_rank, fcn_name); for (i = 0; i < NUM_DATA_SETS; i++) { @@ -2321,7 +2321,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: closing datasets .\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: closing datasets .\n", mpi_rank, fcn_name); for (i = 0; i < NUM_DATA_SETS; i++) { err = H5Dclose(dataset[i]); @@ -2333,7 +2333,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: closing dxpl .\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: closing dxpl .\n", mpi_rank, fcn_name); err = H5Pclose(dxpl_id); VRFY((err >= 0), "H5Pclose(dxpl_id) failed.\n"); @@ -2343,7 +2343,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: closing file.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: closing file.\n", mpi_rank, fcn_name); err = H5Fclose(file_id); VRFY((err >= 0), "H5Fclose(1) failed"); @@ -2360,7 +2360,7 @@ rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) VRFY((MPI_SUCCESS == mrc), "Reader_check failed"); if (verbose) - HDfprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name); return; @@ -2439,7 +2439,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: Setting up property list.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Setting up property list.\n", mpi_rank, fcn_name); fapl_id = H5Pcreate(H5P_FILE_ACCESS); VRFY((fapl_id != -1), "H5Pcreate(H5P_FILE_ACCESS) failed"); @@ -2451,7 +2451,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: Re-open file \"%s\".\n", mpi_rank, fcn_name, filename); + fprintf(stdout, "%0d:%s: Re-open file \"%s\".\n", mpi_rank, fcn_name, filename); file_id = H5Fopen(filename, H5F_ACC_RDONLY, fapl_id); VRFY((file_id >= 0), "H5Fopen() failed"); @@ -2465,7 +2465,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) *=====================================================*/ if (verbose) - HDfprintf(stdout, "%0d:%s: opening the datasets.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: opening the datasets.\n", mpi_rank, fcn_name); for (i = 0; i < NUM_DATA_SETS; i++) { dataset[i] = -1; @@ -2483,7 +2483,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: Setting up dxpl.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Setting up dxpl.\n", mpi_rank, fcn_name); dxpl_id = H5Pcreate(H5P_DATASET_XFER); VRFY((dxpl_id != -1), "H5Pcreate(H5P_DATASET_XFER) failed.\n"); @@ -2495,7 +2495,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: Reading datasets.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Reading datasets.\n", mpi_rank, fcn_name); disk_count[0] = (hsize_t)(LOCAL_DATA_SIZE); disk_start[0] = (hsize_t)(LOCAL_DATA_SIZE * mpi_rank); @@ -2525,10 +2525,10 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) /* compare read data with expected data */ for (j = 0; j < LOCAL_DATA_SIZE; j++) if (!H5_DBL_ABS_EQUAL(data_read[j], data[j])) { - HDfprintf(stdout, - "%0d:%s: Reading datasets value failed in " - "Dataset %d, at position %d: expect %f, got %f.\n", - mpi_rank, fcn_name, i, j, data[j], data_read[j]); + fprintf(stdout, + "%0d:%s: Reading datasets value failed in " + "Dataset %d, at position %d: expect %f, got %f.\n", + mpi_rank, fcn_name, i, j, data[j], data_read[j]); nerrors++; } for (j = 0; j < LOCAL_DATA_SIZE; j++) @@ -2540,7 +2540,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: closing dataspaces.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: closing dataspaces.\n", mpi_rank, fcn_name); for (i = 0; i < NUM_DATA_SETS; i++) { err = H5Sclose(disk_space[i]); @@ -2560,7 +2560,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) if (steps >= 2) { if (verbose) - HDfprintf(stdout, "%0d:%s: reading attributes.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: reading attributes.\n", mpi_rank, fcn_name); for (j = 0; j < LOCAL_DATA_SIZE; j++) { att[j] = (double)(j + 1); @@ -2576,8 +2576,8 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) tri_err = H5Tequal(att_type, H5T_NATIVE_DOUBLE); VRFY((tri_err >= 0), "H5Tequal failed.\n"); if (tri_err == 0) { - HDfprintf(stdout, "%0d:%s: Mismatched Attribute type of Dataset %d.\n", mpi_rank, - fcn_name, i); + fprintf(stdout, "%0d:%s: Mismatched Attribute type of Dataset %d.\n", mpi_rank, + fcn_name, i); nerrors++; } else { @@ -2587,10 +2587,10 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) /* compare read attribute data with expected data */ for (j = 0; j < LOCAL_DATA_SIZE; j++) if (!H5_DBL_ABS_EQUAL(att_read[j], att[j])) { - HDfprintf(stdout, - "%0d:%s: Mismatched attribute data read in Dataset %d, at position " - "%d: expect %f, got %f.\n", - mpi_rank, fcn_name, i, j, att[j], att_read[j]); + fprintf(stdout, + "%0d:%s: Mismatched attribute data read in Dataset %d, at position " + "%d: expect %f, got %f.\n", + mpi_rank, fcn_name, i, j, att[j], att_read[j]); nerrors++; } for (j = 0; j < LOCAL_DATA_SIZE; j++) { @@ -2613,7 +2613,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) if (steps >= 3) { if (verbose) - HDfprintf(stdout, "%0d:%s: reading large attributes.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: reading large attributes.\n", mpi_rank, fcn_name); for (j = 0; j < LARGE_ATTR_SIZE; j++) { lg_att[j] = (steps == 3) ? (double)(j + 1) : (double)(j + 2); @@ -2627,8 +2627,8 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) tri_err = H5Tequal(lg_att_type[i], H5T_NATIVE_DOUBLE); VRFY((tri_err >= 0), "H5Tequal failed.\n"); if (tri_err == 0) { - HDfprintf(stdout, "%0d:%s: Mismatched Large attribute type of Dataset %d.\n", - mpi_rank, fcn_name, i); + fprintf(stdout, "%0d:%s: Mismatched Large attribute type of Dataset %d.\n", mpi_rank, + fcn_name, i); nerrors++; } else { @@ -2638,10 +2638,10 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) /* compare read attribute data with expected data */ for (j = 0; j < LARGE_ATTR_SIZE; j++) if (!H5_DBL_ABS_EQUAL(lg_att_read[j], lg_att[j])) { - HDfprintf(stdout, - "%0d:%s: Mismatched large attribute data read in Dataset %d, at " - "position %d: expect %f, got %f.\n", - mpi_rank, fcn_name, i, j, lg_att[j], lg_att_read[j]); + fprintf(stdout, + "%0d:%s: Mismatched large attribute data read in Dataset %d, at " + "position %d: expect %f, got %f.\n", + mpi_rank, fcn_name, i, j, lg_att[j], lg_att_read[j]); nerrors++; } for (j = 0; j < LARGE_ATTR_SIZE; j++) { @@ -2675,7 +2675,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: closing datasets again.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: closing datasets again.\n", mpi_rank, fcn_name); for (i = 0; i < NUM_DATA_SETS; i++) { if (dataset[i] >= 0) { @@ -2689,7 +2689,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) */ if (verbose) - HDfprintf(stdout, "%0d:%s: closing dxpl .\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: closing dxpl .\n", mpi_rank, fcn_name); err = H5Pclose(dxpl_id); VRFY((err >= 0), "H5Pclose(dxpl_id) failed.\n"); @@ -2698,7 +2698,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) * Close the file */ if (verbose) - HDfprintf(stdout, "%0d:%s: closing file again.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: closing file again.\n", mpi_rank, fcn_name); err = H5Fclose(file_id); VRFY((err >= 0), "H5Fclose(1) failed"); @@ -2707,7 +2707,7 @@ rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) } /* end while(1) */ if (verbose) - HDfprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name); + fprintf(stdout, "%0d:%s: Done.\n", mpi_rank, fcn_name); return; } /* rr_obj_hdr_flush_confusion_reader() */ @@ -2781,7 +2781,7 @@ chunk_align_bug_1(void) #endif /* Set aggregator size and alignment, disable metadata aggregator */ - HDassert(AGGR_SIZE > CHUNK_SIZE); + assert(AGGR_SIZE > CHUNK_SIZE); ret = H5Pset_small_data_block_size(fapl_id, AGGR_SIZE); VRFY((ret >= 0), "H5Pset_small_data_block_size succeeded"); ret = H5Pset_meta_block_size(fapl_id, 0); diff --git a/testpar/API/t_ph5basic.c b/testpar/API/t_ph5basic.c index 1639aff..f35d906 100644 --- a/testpar/API/t_ph5basic.c +++ b/testpar/API/t_ph5basic.c @@ -47,13 +47,13 @@ test_fapl_mpio_dup(void) int nkeys, nkeys_tmp; if (VERBOSE_MED) - HDprintf("Verify fapl_mpio duplicates communicator and INFO objects\n"); + printf("Verify fapl_mpio duplicates communicator and INFO objects\n"); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); if (VERBOSE_MED) - HDprintf("rank/size of MPI_COMM_WORLD are %d/%d\n", mpi_rank, mpi_size); + printf("rank/size of MPI_COMM_WORLD are %d/%d\n", mpi_rank, mpi_size); /* Create a new communicator that has the same processes as MPI_COMM_WORLD. * Use MPI_Comm_split because it is simpler than MPI_Comm_create @@ -63,7 +63,7 @@ test_fapl_mpio_dup(void) MPI_Comm_size(comm, &mpi_size_old); MPI_Comm_rank(comm, &mpi_rank_old); if (VERBOSE_MED) - HDprintf("rank/size of comm are %d/%d\n", mpi_rank_old, mpi_size_old); + printf("rank/size of comm are %d/%d\n", mpi_rank_old, mpi_size_old); /* create a new INFO object with some trivial information. */ mrc = MPI_Info_create(&info); @@ -102,7 +102,7 @@ test_fapl_mpio_dup(void) MPI_Comm_size(comm_tmp, &mpi_size_tmp); MPI_Comm_rank(comm_tmp, &mpi_rank_tmp); if (VERBOSE_MED) - HDprintf("After H5Pget_fapl_mpio: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp); + printf("After H5Pget_fapl_mpio: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp); VRFY((mpi_size_tmp == mpi_size), "MPI_Comm_size"); VRFY((mpi_rank_tmp == mpi_rank), "MPI_Comm_rank"); if (MPI_INFO_NULL != info_tmp) { @@ -151,7 +151,7 @@ test_fapl_mpio_dup(void) MPI_Comm_size(comm_tmp, &mpi_size_tmp); MPI_Comm_rank(comm_tmp, &mpi_rank_tmp); if (VERBOSE_MED) - HDprintf("After second H5Pget_fapl_mpio: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp); + printf("After second H5Pget_fapl_mpio: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp); VRFY((mpi_size_tmp == mpi_size), "MPI_Comm_size"); VRFY((mpi_rank_tmp == mpi_rank), "MPI_Comm_rank"); if (MPI_INFO_NULL != info_tmp) { @@ -172,7 +172,7 @@ test_fapl_mpio_dup(void) MPI_Comm_size(comm_tmp, &mpi_size_tmp); MPI_Comm_rank(comm_tmp, &mpi_rank_tmp); if (VERBOSE_MED) - HDprintf("After Property list closed: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp); + printf("After Property list closed: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp); if (MPI_INFO_NULL != info_tmp) { mrc = MPI_Info_get_nkeys(info_tmp, &nkeys_tmp); VRFY((mrc == MPI_SUCCESS), "MPI_Info_get_nkeys"); diff --git a/testpar/API/t_prop.c b/testpar/API/t_prop.c index 3659501..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; @@ -152,7 +152,7 @@ test_plist_ed(void) herr_t ret; /* Generic return value */ if (VERBOSE_MED) - HDprintf("Encode/Decode DCPLs\n"); + printf("Encode/Decode DCPLs\n"); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -480,7 +480,7 @@ external_links(void) char link_path[50]; if (VERBOSE_MED) - HDprintf("Check external links\n"); + printf("Check external links\n"); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); diff --git a/testpar/API/t_pshutdown.c b/testpar/API/t_pshutdown.c index 48a8005..e1f9189 100644 --- a/testpar/API/t_pshutdown.c +++ b/testpar/API/t_pshutdown.c @@ -70,7 +70,7 @@ main(int argc, char **argv) !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { if (MAINPROCESS) { puts("SKIPPED"); - HDprintf( + printf( " API functions for basic file, group, or dataset aren't supported with this connector\n"); fflush(stdout); } @@ -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 2a029ab..f7a8d70 100644 --- a/testpar/API/t_shapesame.c +++ b/testpar/API/t_shapesame.c @@ -151,12 +151,12 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker hid_t large_ds_dcpl_id = H5P_DEFAULT; herr_t ret; /* Generic return value */ - HDassert(edge_size >= 6); - HDassert(edge_size >= chunk_edge_size); - HDassert((chunk_edge_size == 0) || (chunk_edge_size >= 3)); - HDassert(1 < small_rank); - HDassert(small_rank < large_rank); - HDassert(large_rank <= PAR_SS_DR_MAX_RANK); + assert(edge_size >= 6); + assert(edge_size >= chunk_edge_size); + assert((chunk_edge_size == 0) || (chunk_edge_size >= 3)); + assert(1 < small_rank); + assert(small_rank < large_rank); + assert(large_rank <= PAR_SS_DR_MAX_RANK); tv_ptr->test_num = test_num; tv_ptr->edge_size = edge_size; @@ -171,7 +171,7 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker /* the VRFY() macro needs the local variable mpi_rank -- set it up now */ mpi_rank = tv_ptr->mpi_rank; - HDassert(tv_ptr->mpi_size >= 1); + assert(tv_ptr->mpi_size >= 1); tv_ptr->mpi_comm = MPI_COMM_WORLD; tv_ptr->mpi_info = MPI_INFO_NULL; @@ -185,8 +185,8 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker /* used by checker board tests only */ tv_ptr->small_ds_offset = PAR_SS_DR_MAX_RANK - tv_ptr->small_rank; - HDassert(0 < tv_ptr->small_ds_offset); - HDassert(tv_ptr->small_ds_offset < PAR_SS_DR_MAX_RANK); + assert(0 < tv_ptr->small_ds_offset); + assert(tv_ptr->small_ds_offset < PAR_SS_DR_MAX_RANK); for (i = 0; i < tv_ptr->large_rank - 1; i++) { @@ -198,8 +198,8 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker /* used by checker board tests only */ tv_ptr->large_ds_offset = PAR_SS_DR_MAX_RANK - tv_ptr->large_rank; - HDassert(0 <= tv_ptr->large_ds_offset); - HDassert(tv_ptr->large_ds_offset < PAR_SS_DR_MAX_RANK); + assert(0 <= tv_ptr->large_ds_offset); + assert(tv_ptr->large_ds_offset < PAR_SS_DR_MAX_RANK); /* set up the start, stride, count, and block pointers */ /* used by contiguous tests only */ @@ -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 */ @@ -238,34 +238,34 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker ptr_0 = tv_ptr->small_ds_buf_0; for (i = 0; i < (int)(tv_ptr->small_ds_size); i++) *ptr_0++ = (uint32_t)i; - HDmemset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size); - HDmemset(tv_ptr->small_ds_buf_2, 0, sizeof(uint32_t) * tv_ptr->small_ds_size); + memset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size); + memset(tv_ptr->small_ds_buf_2, 0, sizeof(uint32_t) * tv_ptr->small_ds_size); - HDmemset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size); + memset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size); ptr_0 = tv_ptr->large_ds_buf_0; for (i = 0; i < (int)(tv_ptr->large_ds_size); i++) *ptr_0++ = (uint32_t)i; - HDmemset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size); - HDmemset(tv_ptr->large_ds_buf_2, 0, sizeof(uint32_t) * tv_ptr->large_ds_size); + memset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size); + memset(tv_ptr->large_ds_buf_2, 0, sizeof(uint32_t) * tv_ptr->large_ds_size); - HDmemset(tv_ptr->large_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->large_ds_slice_size); + memset(tv_ptr->large_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->large_ds_slice_size); filename = filenames[0]; /* (const char *)GetTestParameters(); */ - HDassert(filename != NULL); + assert(filename != NULL); #if CONTIG_HS_DR_PIO_TEST__SETUP__DEBUG if (MAINPROCESS) { - HDfprintf(stdout, "%d: test num = %d.\n", tv_ptr->mpi_rank, tv_ptr->test_num); - HDfprintf(stdout, "%d: mpi_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->mpi_size); - HDfprintf(stdout, "%d: small/large rank = %d/%d, use_collective_io = %d.\n", tv_ptr->mpi_rank, - tv_ptr->small_rank, tv_ptr->large_rank, (int)use_collective_io); - HDfprintf(stdout, "%d: edge_size = %d, chunk_edge_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->edge_size, - tv_ptr->chunk_edge_size); - HDfprintf(stdout, "%d: checker_edge_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->checker_edge_size); - HDfprintf(stdout, "%d: small_ds_size = %d, large_ds_size = %d.\n", tv_ptr->mpi_rank, - (int)(tv_ptr->small_ds_size), (int)(tv_ptr->large_ds_size)); - HDfprintf(stdout, "%d: filename = %s.\n", tv_ptr->mpi_rank, filename); + fprintf(stdout, "%d: test num = %d.\n", tv_ptr->mpi_rank, tv_ptr->test_num); + fprintf(stdout, "%d: mpi_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->mpi_size); + fprintf(stdout, "%d: small/large rank = %d/%d, use_collective_io = %d.\n", tv_ptr->mpi_rank, + tv_ptr->small_rank, tv_ptr->large_rank, (int)use_collective_io); + fprintf(stdout, "%d: edge_size = %d, chunk_edge_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->edge_size, + tv_ptr->chunk_edge_size); + fprintf(stdout, "%d: checker_edge_size = %d.\n", tv_ptr->mpi_rank, tv_ptr->checker_edge_size); + fprintf(stdout, "%d: small_ds_size = %d, large_ds_size = %d.\n", tv_ptr->mpi_rank, + (int)(tv_ptr->small_ds_size), (int)(tv_ptr->large_ds_size)); + fprintf(stdout, "%d: filename = %s.\n", tv_ptr->mpi_rank, filename); } #endif /* CONTIG_HS_DR_PIO_TEST__SETUP__DEBUG */ /* ---------------------------------------- @@ -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; @@ -744,10 +744,10 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr) } /* zero out the buffer we will be reading into */ - HDmemset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size); + memset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size); #if CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG - HDfprintf(stdout, "%s reading slices from big cube on disk into small cube slice.\n", fcnName); + fprintf(stdout, "%s reading slices from big cube on disk into small cube slice.\n", fcnName); #endif /* CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG */ /* in serial versions of this test, we loop through all the dimensions @@ -834,12 +834,12 @@ contig_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr) /* Read selection from disk */ #if CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG - HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank), - (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]), - (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4])); - HDfprintf(stdout, "%s slice/file extent dims = %d/%d.\n", fcnName, - H5Sget_simple_extent_ndims(tv_ptr->small_ds_slice_sid), - H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0)); + fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank), + (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]), + (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4])); + fprintf(stdout, "%s slice/file extent dims = %d/%d.\n", fcnName, + H5Sget_simple_extent_ndims(tv_ptr->small_ds_slice_sid), + H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0)); #endif /* CONTIG_HS_DR_PIO_TEST__D2M_L2S__DEBUG */ ret = H5Dread(tv_ptr->large_dataset, H5T_NATIVE_UINT32, tv_ptr->small_ds_slice_sid, @@ -955,11 +955,11 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr) VRFY((ret >= 0), "H5Sselect_hyperslab(file_small_ds_sid_0, set) succeeded"); #if CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG - HDfprintf(stdout, "%s reading slices of on disk small data set into slices of big data set.\n", fcnName); + fprintf(stdout, "%s reading slices of on disk small data set into slices of big data set.\n", fcnName); #endif /* CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG */ /* zero out the in memory large ds */ - HDmemset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size); + memset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size); /* set up start, stride, count, and block -- note that we will * change start[] so as to read slices of the large cube. @@ -1065,12 +1065,12 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr) /* Read selection from disk */ #if CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG - HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank), - (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]), - (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4])); - HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, - H5Sget_simple_extent_ndims(tv_ptr->mem_large_ds_sid), - H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_0)); + fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank), + (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]), + (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4])); + fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, + H5Sget_simple_extent_ndims(tv_ptr->mem_large_ds_sid), + H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_0)); #endif /* CONTIG_HS_DR_PIO_TEST__D2M_S2L__DEBUG */ ret = H5Dread(tv_ptr->small_dataset, H5T_NATIVE_UINT32, tv_ptr->mem_large_ds_sid, tv_ptr->file_small_ds_sid_0, tv_ptr->xfer_plist, tv_ptr->large_ds_buf_1); @@ -1088,8 +1088,8 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr) (k * tv_ptr->edge_size * tv_ptr->edge_size) + (l * tv_ptr->edge_size)); stop_index = start_index + tv_ptr->small_ds_slice_size - 1; - HDassert(start_index < stop_index); - HDassert(stop_index <= tv_ptr->large_ds_size); + assert(start_index < stop_index); + assert(stop_index <= tv_ptr->large_ds_size); for (n = 0; n < tv_ptr->large_ds_size; n++) { @@ -1230,10 +1230,10 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr) } /* zero out the in memory small ds */ - HDmemset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size); + memset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size); #if CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG - HDfprintf(stdout, "%s writing slices from big ds to slices of small ds on disk.\n", fcnName); + fprintf(stdout, "%s writing slices from big ds to slices of small ds on disk.\n", fcnName); #endif /* CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG */ /* in serial versions of this test, we loop through all the dimensions @@ -1334,12 +1334,12 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr) /* write the slice from the in memory large data set to the * slice of the on disk small dataset. */ #if CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG - HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank), - (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]), - (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4])); - HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, - H5Sget_simple_extent_ndims(tv_ptr->mem_large_ds_sid), - H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_0)); + fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank), + (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]), + (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4])); + fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, + H5Sget_simple_extent_ndims(tv_ptr->mem_large_ds_sid), + H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_0)); #endif /* CONTIG_HS_DR_PIO_TEST__M2D_L2S__DEBUG */ ret = H5Dwrite(tv_ptr->small_dataset, H5T_NATIVE_UINT32, tv_ptr->mem_large_ds_sid, tv_ptr->file_small_ds_sid_0, tv_ptr->xfer_plist, tv_ptr->large_ds_buf_0); @@ -1364,8 +1364,8 @@ contig_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr) start_index = (size_t)(tv_ptr->mpi_rank) * tv_ptr->small_ds_slice_size; stop_index = start_index + tv_ptr->small_ds_slice_size - 1; - HDassert(start_index < stop_index); - HDassert(stop_index <= tv_ptr->small_ds_size); + assert(start_index < stop_index); + assert(stop_index <= tv_ptr->small_ds_size); for (n = 0; n < tv_ptr->small_ds_size; n++) { @@ -1505,10 +1505,10 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr) } /* zero out the in memory large ds */ - HDmemset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size); + memset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size); #if CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG - HDfprintf(stdout, "%s writing process slices of small ds to slices of large ds on disk.\n", fcnName); + fprintf(stdout, "%s writing process slices of small ds to slices of large ds on disk.\n", fcnName); #endif /* CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG */ if (PAR_SS_DR_MAX_RANK - tv_ptr->large_rank == 0) { @@ -1569,12 +1569,12 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr) tv_ptr->start[3] = (hsize_t)l; tv_ptr->start[4] = 0; - HDfprintf(stdout, "%s:%d: skipping test with start = %d %d %d %d %d.\n", fcnName, - (int)(tv_ptr->mpi_rank), (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), - (int)(tv_ptr->start[2]), (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4])); - HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, - H5Sget_simple_extent_ndims(tv_ptr->mem_small_ds_sid), - H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0)); + fprintf(stdout, "%s:%d: skipping test with start = %d %d %d %d %d.\n", fcnName, + (int)(tv_ptr->mpi_rank), (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), + (int)(tv_ptr->start[2]), (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4])); + fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, + H5Sget_simple_extent_ndims(tv_ptr->mem_small_ds_sid), + H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0)); #endif /* CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG */ } else { /* run the test */ @@ -1620,12 +1620,12 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr) * target slice of the disk data set */ #if CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG - HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank), - (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]), - (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4])); - HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, - H5Sget_simple_extent_ndims(tv_ptr->mem_small_ds_sid), - H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0)); + fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, (int)(tv_ptr->mpi_rank), + (int)(tv_ptr->start[0]), (int)(tv_ptr->start[1]), (int)(tv_ptr->start[2]), + (int)(tv_ptr->start[3]), (int)(tv_ptr->start[4])); + fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, + H5Sget_simple_extent_ndims(tv_ptr->mem_small_ds_sid), + H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0)); #endif /* CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG */ ret = H5Dwrite(tv_ptr->large_dataset, H5T_NATIVE_UINT32, tv_ptr->mem_small_ds_sid, tv_ptr->file_large_ds_sid_0, tv_ptr->xfer_plist, tv_ptr->small_ds_buf_0); @@ -1653,8 +1653,8 @@ contig_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr) (k * tv_ptr->edge_size * tv_ptr->edge_size) + (l * tv_ptr->edge_size)); stop_index = start_index + tv_ptr->small_ds_slice_size - 1; - HDassert(start_index < stop_index); - HDassert(stop_index < tv_ptr->large_ds_size); + assert(start_index < stop_index); + assert(stop_index < tv_ptr->large_ds_size); for (n = 0; n < tv_ptr->large_ds_size; n++) { @@ -1797,8 +1797,8 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i #if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG if (MAINPROCESS) { - HDfprintf(stdout, "test %d: small rank = %d, large rank = %d.\n", test_num, small_rank, large_rank); - HDfprintf(stdout, "test %d: Initialization complete.\n", test_num); + fprintf(stdout, "test %d: small rank = %d, large rank = %d.\n", test_num, small_rank, large_rank); + fprintf(stdout, "test %d: Initialization complete.\n", test_num); } #endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */ @@ -1813,7 +1813,7 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i #if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG if (MAINPROCESS) { - HDfprintf(stdout, "test %d: running contig_hs_dr_pio_test__d2m_l2s.\n", test_num); + fprintf(stdout, "test %d: running contig_hs_dr_pio_test__d2m_l2s.\n", test_num); } #endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */ contig_hs_dr_pio_test__d2m_l2s(tv_ptr); @@ -1825,7 +1825,7 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i #if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG if (MAINPROCESS) { - HDfprintf(stdout, "test %d: running contig_hs_dr_pio_test__d2m_s2l.\n", test_num); + fprintf(stdout, "test %d: running contig_hs_dr_pio_test__d2m_s2l.\n", test_num); } #endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */ contig_hs_dr_pio_test__d2m_s2l(tv_ptr); @@ -1843,7 +1843,7 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i #if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG if (MAINPROCESS) { - HDfprintf(stdout, "test %d: running contig_hs_dr_pio_test__m2d_l2s.\n", test_num); + fprintf(stdout, "test %d: running contig_hs_dr_pio_test__m2d_l2s.\n", test_num); } #endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */ contig_hs_dr_pio_test__m2d_l2s(tv_ptr); @@ -1858,16 +1858,16 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i #if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG if (MAINPROCESS) { - HDfprintf(stdout, "test %d: running contig_hs_dr_pio_test__m2d_s2l.\n", test_num); + fprintf(stdout, "test %d: running contig_hs_dr_pio_test__m2d_s2l.\n", test_num); } #endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */ contig_hs_dr_pio_test__m2d_s2l(tv_ptr); #if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG if (MAINPROCESS) { - HDfprintf(stdout, "test %d: Subtests complete -- tests run/skipped/total = %lld/%lld/%lld.\n", - test_num, (long long)(tv_ptr->tests_run), (long long)(tv_ptr->tests_skipped), - (long long)(tv_ptr->total_tests)); + fprintf(stdout, "test %d: Subtests complete -- tests run/skipped/total = %lld/%lld/%lld.\n", test_num, + (long long)(tv_ptr->tests_run), (long long)(tv_ptr->tests_skipped), + (long long)(tv_ptr->total_tests)); } #endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */ @@ -1875,7 +1875,7 @@ contig_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i #if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG if (MAINPROCESS) { - HDfprintf(stdout, "test %d: Takedown complete.\n", test_num); + fprintf(stdout, "test %d: Takedown complete.\n", test_num); } #endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */ @@ -2009,8 +2009,8 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type) } /* end of switch(sstest_type) */ #if CONTIG_HS_DR_PIO_TEST__DEBUG if ((MAINPROCESS) && (tests_skipped > 0)) { - HDfprintf(stdout, " run/skipped/total = %lld/%lld/%lld.\n", tests_run, tests_skipped, - total_tests); + fprintf(stdout, " run/skipped/total = %lld/%lld/%lld.\n", tests_run, tests_skipped, + total_tests); } #endif /* CONTIG_HS_DR_PIO_TEST__DEBUG */ } @@ -2018,11 +2018,11 @@ contig_hs_dr_pio_test(ShapeSameTestMethods sstest_type) if (MAINPROCESS) { if (tests_skipped > 0) { - HDfprintf(stdout, " %" PRId64 " of %" PRId64 " subtests skipped to expedite testing.\n", - tests_skipped, total_tests); + fprintf(stdout, " %" PRId64 " of %" PRId64 " subtests skipped to expedite testing.\n", + tests_skipped, total_tests); } else - HDprintf("\n"); + printf("\n"); } return; @@ -2076,26 +2076,26 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons hsize_t block[PAR_SS_DR_MAX_RANK]; herr_t ret; /* Generic return value */ - HDassert(edge_size >= 6); - HDassert(0 < checker_edge_size); - HDassert(checker_edge_size <= edge_size); - HDassert(0 < sel_rank); - HDassert(sel_rank <= tgt_rank); - HDassert(tgt_rank <= test_max_rank); - HDassert(test_max_rank <= PAR_SS_DR_MAX_RANK); + assert(edge_size >= 6); + assert(0 < checker_edge_size); + assert(checker_edge_size <= edge_size); + assert(0 < sel_rank); + assert(sel_rank <= tgt_rank); + assert(tgt_rank <= test_max_rank); + assert(test_max_rank <= PAR_SS_DR_MAX_RANK); sel_offset = test_max_rank - sel_rank; - HDassert(sel_offset >= 0); + assert(sel_offset >= 0); n_cube_offset = test_max_rank - tgt_rank; - HDassert(n_cube_offset >= 0); - HDassert(n_cube_offset <= sel_offset); + assert(n_cube_offset >= 0); + assert(n_cube_offset <= sel_offset); #if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG - HDfprintf(stdout, "%s:%d: edge_size/checker_edge_size = %d/%d\n", fcnName, mpi_rank, edge_size, - checker_edge_size); - HDfprintf(stdout, "%s:%d: sel_rank/sel_offset = %d/%d.\n", fcnName, mpi_rank, sel_rank, sel_offset); - HDfprintf(stdout, "%s:%d: tgt_rank/n_cube_offset = %d/%d.\n", fcnName, mpi_rank, tgt_rank, n_cube_offset); + fprintf(stdout, "%s:%d: edge_size/checker_edge_size = %d/%d\n", fcnName, mpi_rank, edge_size, + checker_edge_size); + fprintf(stdout, "%s:%d: sel_rank/sel_offset = %d/%d.\n", fcnName, mpi_rank, sel_rank, sel_offset); + fprintf(stdout, "%s:%d: tgt_rank/n_cube_offset = %d/%d.\n", fcnName, mpi_rank, tgt_rank, n_cube_offset); #endif /* CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG */ /* First, compute the base count (which assumes start == 0 @@ -2242,25 +2242,25 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons if (((i + j + k + l + m) % 2) == 0) { #if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG - HDfprintf(stdout, "%s%d: *** first_selection = %d ***\n", fcnName, mpi_rank, - (int)first_selection); - HDfprintf(stdout, "%s:%d: i/j/k/l/m = %d/%d/%d/%d/%d\n", fcnName, mpi_rank, i, j, - k, l, m); - HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, mpi_rank, - (int)start[0], (int)start[1], (int)start[2], (int)start[3], - (int)start[4]); - HDfprintf(stdout, "%s:%d: stride = %d %d %d %d %d.\n", fcnName, mpi_rank, - (int)stride[0], (int)stride[1], (int)stride[2], (int)stride[3], - (int)stride[4]); - HDfprintf(stdout, "%s:%d: count = %d %d %d %d %d.\n", fcnName, mpi_rank, - (int)count[0], (int)count[1], (int)count[2], (int)count[3], - (int)count[4]); - HDfprintf(stdout, "%s:%d: block = %d %d %d %d %d.\n", fcnName, mpi_rank, - (int)block[0], (int)block[1], (int)block[2], (int)block[3], - (int)block[4]); - HDfprintf(stdout, "%s:%d: n-cube extent dims = %d.\n", fcnName, mpi_rank, - H5Sget_simple_extent_ndims(tgt_sid)); - HDfprintf(stdout, "%s:%d: selection rank = %d.\n", fcnName, mpi_rank, sel_rank); + fprintf(stdout, "%s%d: *** first_selection = %d ***\n", fcnName, mpi_rank, + (int)first_selection); + fprintf(stdout, "%s:%d: i/j/k/l/m = %d/%d/%d/%d/%d\n", fcnName, mpi_rank, i, j, k, + l, m); + fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, mpi_rank, + (int)start[0], (int)start[1], (int)start[2], (int)start[3], + (int)start[4]); + fprintf(stdout, "%s:%d: stride = %d %d %d %d %d.\n", fcnName, mpi_rank, + (int)stride[0], (int)stride[1], (int)stride[2], (int)stride[3], + (int)stride[4]); + fprintf(stdout, "%s:%d: count = %d %d %d %d %d.\n", fcnName, mpi_rank, + (int)count[0], (int)count[1], (int)count[2], (int)count[3], + (int)count[4]); + fprintf(stdout, "%s:%d: block = %d %d %d %d %d.\n", fcnName, mpi_rank, + (int)block[0], (int)block[1], (int)block[2], (int)block[3], + (int)block[4]); + fprintf(stdout, "%s:%d: n-cube extent dims = %d.\n", fcnName, mpi_rank, + H5Sget_simple_extent_ndims(tgt_sid)); + fprintf(stdout, "%s:%d: selection rank = %d.\n", fcnName, mpi_rank, sel_rank); #endif if (first_selection) { @@ -2304,8 +2304,8 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons } while ((i <= 1) && (0 >= sel_offset)); #if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG - HDfprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank, - (int)H5Sget_select_npoints(tgt_sid)); + fprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank, + (int)H5Sget_select_npoints(tgt_sid)); #endif /* CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG */ /* Clip the selection back to the dataspace proper. */ @@ -2323,9 +2323,9 @@ ckrbrd_hs_dr_pio_test__slct_ckrbrd(const int mpi_rank, const hid_t tgt_sid, cons VRFY((ret != FAIL), "H5Sselect_hyperslab(AND) succeeded"); #if CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG - HDfprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank, - (int)H5Sget_select_npoints(tgt_sid)); - HDfprintf(stdout, "%s%d: done.\n", fcnName, mpi_rank); + fprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank, + (int)H5Sget_select_npoints(tgt_sid)); + fprintf(stdout, "%s%d: done.\n", fcnName, mpi_rank); #endif /* CKRBRD_HS_DR_PIO_TEST__SELECT_CHECKER_BOARD__DEBUG */ return; @@ -2407,25 +2407,25 @@ ckrbrd_hs_dr_pio_test__verify_data(uint32_t *buf_ptr, const int rank, const int int v, w, x, y, z; /* to track position in checker */ const int test_max_rank = 5; /* code changes needed if this is increased */ - HDassert(buf_ptr != NULL); - HDassert(0 < rank); - HDassert(rank <= test_max_rank); - HDassert(edge_size >= 6); - HDassert(0 < checker_edge_size); - HDassert(checker_edge_size <= edge_size); - HDassert(test_max_rank <= PAR_SS_DR_MAX_RANK); + assert(buf_ptr != NULL); + assert(0 < rank); + assert(rank <= test_max_rank); + assert(edge_size >= 6); + assert(0 < checker_edge_size); + assert(checker_edge_size <= edge_size); + assert(test_max_rank <= PAR_SS_DR_MAX_RANK); #if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG int mpi_rank; MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); - HDfprintf(stdout, "%s mpi_rank = %d.\n", fcnName, mpi_rank); - HDfprintf(stdout, "%s rank = %d.\n", fcnName, rank); - HDfprintf(stdout, "%s edge_size = %d.\n", fcnName, edge_size); - HDfprintf(stdout, "%s checker_edge_size = %d.\n", fcnName, checker_edge_size); - HDfprintf(stdout, "%s first_expected_val = %d.\n", fcnName, (int)first_expected_val); - HDfprintf(stdout, "%s starts_in_checker = %d.\n", fcnName, (int)buf_starts_in_checker); + fprintf(stdout, "%s mpi_rank = %d.\n", fcnName, mpi_rank); + fprintf(stdout, "%s rank = %d.\n", fcnName, rank); + fprintf(stdout, "%s edge_size = %d.\n", fcnName, edge_size); + fprintf(stdout, "%s checker_edge_size = %d.\n", fcnName, checker_edge_size); + fprintf(stdout, "%s first_expected_val = %d.\n", fcnName, (int)first_expected_val); + fprintf(stdout, "%s starts_in_checker = %d.\n", fcnName, (int)buf_starts_in_checker); } #endif @@ -2475,12 +2475,12 @@ do { m = 0; z = 0; #if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG - HDfprintf(stdout, "%d, %d, %d, %d, %d:", i, j, k, l, m); + fprintf(stdout, "%d, %d, %d, %d, %d:", i, j, k, l, m); #endif in_checker = start_in_checker[3]; do { #if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG - HDfprintf(stdout, " %d", (int)(*val_ptr)); + fprintf(stdout, " %d", (int)(*val_ptr)); #endif if (z >= checker_edge_size) { @@ -2513,7 +2513,7 @@ do { } while ((rank >= (test_max_rank - 4)) && (m < edge_size)); #if CKRBRD_HS_DR_PIO_TEST__VERIFY_DATA__DEBUG - HDfprintf(stdout, "\n"); + fprintf(stdout, "\n"); #endif l++; y++; @@ -2596,16 +2596,16 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr) sel_start); /* zero out the buffer we will be reading into */ - HDmemset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size); + memset(tv_ptr->small_ds_slice_buf, 0, sizeof(uint32_t) * tv_ptr->small_ds_slice_size); #if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG - HDfprintf(stdout, "%s:%d: initial small_ds_slice_buf = ", fcnName, tv_ptr->mpi_rank); + fprintf(stdout, "%s:%d: initial small_ds_slice_buf = ", fcnName, tv_ptr->mpi_rank); ptr_0 = tv_ptr->small_ds_slice_buf; for (i = 0; i < (int)(tv_ptr->small_ds_slice_size); i++) { - HDfprintf(stdout, "%d ", (int)(*ptr_0)); + fprintf(stdout, "%d ", (int)(*ptr_0)); ptr_0++; } - HDfprintf(stdout, "\n"); + fprintf(stdout, "\n"); #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */ /* set up start, stride, count, and block -- note that we will @@ -2627,8 +2627,8 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr) } #if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG - HDfprintf(stdout, "%s:%d: reading slice from big ds on disk into small ds slice.\n", fcnName, - tv_ptr->mpi_rank); + fprintf(stdout, "%s:%d: reading slice from big ds on disk into small ds slice.\n", fcnName, + tv_ptr->mpi_rank); #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */ /* in serial versions of this test, we loop through all the dimensions * of the large data set. However, in the parallel version, each @@ -2702,11 +2702,11 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr) tv_ptr->start[3] = (hsize_t)l; tv_ptr->start[4] = 0; - HDassert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1)); - HDassert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1)); - HDassert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1)); - HDassert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1)); - HDassert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1)); ckrbrd_hs_dr_pio_test__slct_ckrbrd( tv_ptr->mpi_rank, tv_ptr->file_large_ds_sid_0, tv_ptr->large_rank, tv_ptr->edge_size, @@ -2720,12 +2720,12 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr) /* Read selection from disk */ #if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG - HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank, - tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3], - tv_ptr->start[4]); - HDfprintf(stdout, "%s slice/file extent dims = %d/%d.\n", fcnName, - H5Sget_simple_extent_ndims(tv_ptr->small_ds_slice_sid), - H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0)); + fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank, + tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3], + tv_ptr->start[4]); + fprintf(stdout, "%s slice/file extent dims = %d/%d.\n", fcnName, + H5Sget_simple_extent_ndims(tv_ptr->small_ds_slice_sid), + H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_0)); #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */ ret = @@ -2734,7 +2734,7 @@ ckrbrd_hs_dr_pio_test__d2m_l2s(struct hs_dr_pio_test_vars_t *tv_ptr) VRFY((ret >= 0), "H5Dread() slice from large ds succeeded."); #if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG - HDfprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, tv_ptr->mpi_rank); + fprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, tv_ptr->mpi_rank); #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_L2S__DEBUG */ /* verify that expected data is retrieved */ @@ -2826,11 +2826,11 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr) sel_start); #if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG - HDfprintf(stdout, "%s reading slices of on disk small data set into slices of big data set.\n", fcnName); + fprintf(stdout, "%s reading slices of on disk small data set into slices of big data set.\n", fcnName); #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG */ /* zero out the buffer we will be reading into */ - HDmemset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size); + memset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size); /* set up start, stride, count, and block -- note that we will * change start[] so as to read the slice of the small data set @@ -2926,11 +2926,11 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr) tv_ptr->start[3] = (hsize_t)l; tv_ptr->start[4] = 0; - HDassert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1)); - HDassert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1)); - HDassert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1)); - HDassert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1)); - HDassert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1)); ckrbrd_hs_dr_pio_test__slct_ckrbrd( tv_ptr->mpi_rank, tv_ptr->mem_large_ds_sid, tv_ptr->large_rank, tv_ptr->edge_size, @@ -2944,12 +2944,12 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr) /* Read selection from disk */ #if CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG - HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank, - tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3], - tv_ptr->start[4]); - HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, - H5Sget_simple_extent_ndims(tv_ptr->large_ds_slice_sid), - H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_0)); + fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank, + tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3], + tv_ptr->start[4]); + fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, + H5Sget_simple_extent_ndims(tv_ptr->large_ds_slice_sid), + H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_0)); #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG */ ret = H5Dread(tv_ptr->small_dataset, H5T_NATIVE_UINT32, tv_ptr->mem_large_ds_sid, tv_ptr->file_small_ds_sid_0, tv_ptr->xfer_plist, tv_ptr->large_ds_buf_1); @@ -2972,27 +2972,27 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr) { int m, n; - HDfprintf(stdout, "%s:%d: expected_value = %d.\n", fcnName, tv_ptr->mpi_rank, - expected_value); - HDfprintf(stdout, "%s:%d: start/stop index = %d/%d.\n", fcnName, tv_ptr->mpi_rank, - start_index, stop_index); + fprintf(stdout, "%s:%d: expected_value = %d.\n", fcnName, tv_ptr->mpi_rank, + expected_value); + fprintf(stdout, "%s:%d: start/stop index = %d/%d.\n", fcnName, tv_ptr->mpi_rank, + start_index, stop_index); n = 0; for (m = 0; (unsigned)m < tv_ptr->large_ds_size; m++) { - HDfprintf(stdout, "%d ", (int)(*ptr_1)); + fprintf(stdout, "%d ", (int)(*ptr_1)); ptr_1++; n++; if (n >= tv_ptr->edge_size) { - HDfprintf(stdout, "\n"); + fprintf(stdout, "\n"); n = 0; } } - HDfprintf(stdout, "\n"); + fprintf(stdout, "\n"); ptr_1 = tv_ptr->large_ds_buf_1; } #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__D2M_S2L__DEBUG */ - HDassert(start_index < stop_index); - HDassert(stop_index <= tv_ptr->large_ds_size); + assert(start_index < stop_index); + assert(stop_index <= tv_ptr->large_ds_size); for (u = 0; u < start_index; u++) { @@ -3156,12 +3156,12 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr) } /* zero out the in memory small ds */ - HDmemset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size); + memset(tv_ptr->small_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->small_ds_size); #if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG - HDfprintf(stdout, - "%s writing checker boards selections of slices from big ds to slices of small ds on disk.\n", - fcnName); + fprintf(stdout, + "%s writing checker boards selections of slices from big ds to slices of small ds on disk.\n", + fcnName); #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG */ /* in serial versions of this test, we loop through all the dimensions @@ -3248,11 +3248,11 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr) tv_ptr->start[3] = (hsize_t)l; tv_ptr->start[4] = 0; - HDassert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1)); - HDassert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1)); - HDassert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1)); - HDassert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1)); - HDassert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1)); ckrbrd_hs_dr_pio_test__slct_ckrbrd( tv_ptr->mpi_rank, tv_ptr->mem_large_ds_sid, tv_ptr->large_rank, tv_ptr->edge_size, @@ -3271,12 +3271,12 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr) * dataset. */ #if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG - HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank, - tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3], - tv_ptr->start[4]); - HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, - H5Sget_simple_extent_ndims(tv_ptr->mem_large_ds_sid), - H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_1)); + fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank, + tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3], + tv_ptr->start[4]); + fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, + H5Sget_simple_extent_ndims(tv_ptr->mem_large_ds_sid), + H5Sget_simple_extent_ndims(tv_ptr->file_small_ds_sid_1)); #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG */ ret = H5Dwrite(tv_ptr->small_dataset, H5T_NATIVE_UINT32, tv_ptr->mem_large_ds_sid, tv_ptr->file_small_ds_sid_1, tv_ptr->xfer_plist, tv_ptr->large_ds_buf_0); @@ -3298,8 +3298,8 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t *tv_ptr) start_index = (size_t)(tv_ptr->mpi_rank) * tv_ptr->small_ds_slice_size; stop_index = start_index + tv_ptr->small_ds_slice_size - 1; - HDassert(start_index < stop_index); - HDassert(stop_index <= tv_ptr->small_ds_size); + assert(start_index < stop_index); + assert(stop_index <= tv_ptr->small_ds_size); data_ok = TRUE; @@ -3455,13 +3455,13 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr) } /* zero out the in memory large ds */ - HDmemset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size); + memset(tv_ptr->large_ds_buf_1, 0, sizeof(uint32_t) * tv_ptr->large_ds_size); #if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG - HDfprintf(stdout, - "%s writing process checkerboard selections of slices of small ds to process slices of large " - "ds on disk.\n", - fcnName); + fprintf(stdout, + "%s writing process checkerboard selections of slices of small ds to process slices of large " + "ds on disk.\n", + fcnName); #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG */ if (PAR_SS_DR_MAX_RANK - tv_ptr->large_rank == 0) { @@ -3541,11 +3541,11 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr) tv_ptr->start[3] = (hsize_t)l; tv_ptr->start[4] = 0; - HDassert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1)); - HDassert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1)); - HDassert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1)); - HDassert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1)); - HDassert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[0] == 0) || (0 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[1] == 0) || (1 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[2] == 0) || (2 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[3] == 0) || (3 < tv_ptr->small_ds_offset + 1)); + assert((tv_ptr->start[4] == 0) || (4 < tv_ptr->small_ds_offset + 1)); ckrbrd_hs_dr_pio_test__slct_ckrbrd( tv_ptr->mpi_rank, tv_ptr->file_large_ds_sid_1, tv_ptr->large_rank, tv_ptr->edge_size, @@ -3563,12 +3563,12 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr) * target slice of the disk data set */ #if CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG - HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank, - tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3], - tv_ptr->start[4]); - HDfprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, - H5Sget_simple_extent_ndims(tv_ptr->mem_small_ds_sid), - H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_1)); + fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, tv_ptr->mpi_rank, + tv_ptr->start[0], tv_ptr->start[1], tv_ptr->start[2], tv_ptr->start[3], + tv_ptr->start[4]); + fprintf(stdout, "%s:%d: mem/file extent dims = %d/%d.\n", fcnName, tv_ptr->mpi_rank, + H5Sget_simple_extent_ndims(tv_ptr->mem_small_ds_sid), + H5Sget_simple_extent_ndims(tv_ptr->file_large_ds_sid_1)); #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_S2L__DEBUG */ ret = H5Dwrite(tv_ptr->large_dataset, H5T_NATIVE_UINT32, tv_ptr->mem_small_ds_sid, tv_ptr->file_large_ds_sid_1, tv_ptr->xfer_plist, tv_ptr->small_ds_buf_0); @@ -3594,8 +3594,8 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t *tv_ptr) (k * tv_ptr->edge_size * tv_ptr->edge_size) + (l * tv_ptr->edge_size)); stop_index = start_index + tv_ptr->small_ds_slice_size - 1; - HDassert(start_index < stop_index); - HDassert(stop_index < tv_ptr->large_ds_size); + assert(start_index < stop_index); + assert(stop_index < tv_ptr->large_ds_size); data_ok = TRUE; @@ -3743,8 +3743,8 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i #if CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG if (MAINPROCESS) { - HDfprintf(stdout, "test %d: small rank = %d, large rank = %d.\n", test_num, small_rank, large_rank); - HDfprintf(stdout, "test %d: Initialization complete.\n", test_num); + fprintf(stdout, "test %d: small rank = %d, large rank = %d.\n", test_num, small_rank, large_rank); + fprintf(stdout, "test %d: Initialization complete.\n", test_num); } #endif /* CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG */ @@ -3795,9 +3795,9 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i #if CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG if (MAINPROCESS) { - HDfprintf(stdout, "test %d: Subtests complete -- tests run/skipped/total = %lld/%lld/%lld.\n", - test_num, (long long)(tv_ptr->tests_run), (long long)(tv_ptr->tests_skipped), - (long long)(tv_ptr->total_tests)); + fprintf(stdout, "test %d: Subtests complete -- tests run/skipped/total = %lld/%lld/%lld.\n", test_num, + (long long)(tv_ptr->tests_run), (long long)(tv_ptr->tests_skipped), + (long long)(tv_ptr->total_tests)); } #endif /* CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG */ @@ -3805,7 +3805,7 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, const int edge_size, const i #if CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG if (MAINPROCESS) { - HDfprintf(stdout, "test %d: Takedown complete.\n", test_num); + fprintf(stdout, "test %d: Takedown complete.\n", test_num); } #endif /* CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG */ @@ -3945,8 +3945,8 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type) } /* end of switch(sstest_type) */ #if CONTIG_HS_DR_PIO_TEST__DEBUG if ((MAINPROCESS) && (tests_skipped > 0)) { - HDfprintf(stdout, " run/skipped/total = %" PRId64 "/%" PRId64 "/%" PRId64 ".\n", - tests_run, tests_skipped, total_tests); + fprintf(stdout, " run/skipped/total = %" PRId64 "/%" PRId64 "/%" PRId64 ".\n", tests_run, + tests_skipped, total_tests); } #endif /* CONTIG_HS_DR_PIO_TEST__DEBUG */ } @@ -3954,11 +3954,11 @@ ckrbrd_hs_dr_pio_test(ShapeSameTestMethods sstest_type) if (MAINPROCESS) { if (tests_skipped > 0) { - HDfprintf(stdout, " %" PRId64 " of %" PRId64 " subtests skipped to expedite testing.\n", - tests_skipped, total_tests); + fprintf(stdout, " %" PRId64 " of %" PRId64 " subtests skipped to expedite testing.\n", + tests_skipped, total_tests); } else - HDprintf("\n"); + printf("\n"); } return; @@ -4019,10 +4019,9 @@ pause_proc(void) if (MAINPROCESS) while ((HDstat(greenlight, &statbuf) == -1) && loops < maxloop) { if (!loops++) { - HDprintf("Proc %d (%*s, %d): to debug, attach %d\n", mpi_rank, mpi_namelen, mpi_name, pid, - pid); + printf("Proc %d (%*s, %d): to debug, attach %d\n", mpi_rank, mpi_namelen, mpi_name, pid, pid); } - HDprintf("waiting(%ds) for file %s ...\n", time_int, greenlight); + printf("waiting(%ds) for file %s ...\n", time_int, greenlight); fflush(stdout); HDsleep(time_int); } @@ -4046,20 +4045,20 @@ MPI_Init(int *argc, char ***argv) static void usage(void) { - HDprintf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] " - "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n"); - HDprintf("\t-m<n_datasets>" - "\tset number of datasets for the multiple dataset test\n"); - HDprintf("\t-n<n_groups>" - "\tset number of groups for the multiple group test\n"); + printf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] " + "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n"); + printf("\t-m<n_datasets>" + "\tset number of datasets for the multiple dataset test\n"); + printf("\t-n<n_groups>" + "\tset number of groups for the multiple group test\n"); #if 0 - HDprintf("\t-f <prefix>\tfilename prefix\n"); + printf("\t-f <prefix>\tfilename prefix\n"); #endif - HDprintf("\t-2\t\tuse Split-file together with MPIO\n"); - HDprintf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", ROW_FACTOR, - COL_FACTOR); - HDprintf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n"); - HDprintf("\n"); + printf("\t-2\t\tuse Split-file together with MPIO\n"); + printf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", ROW_FACTOR, + COL_FACTOR); + printf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n"); + printf("\n"); } /* @@ -4142,7 +4141,7 @@ parse_options(int argc, char **argv) case 'h': /* print help message--return with nerrors set */ return (1); default: - HDprintf("Illegal option(%s)\n", *argv); + printf("Illegal option(%s)\n", *argv); nerrors++; return (1); } @@ -4151,12 +4150,12 @@ parse_options(int argc, char **argv) /* check validity of dimension and chunk sizes */ if (dim0 <= 0 || dim1 <= 0) { - HDprintf("Illegal dim sizes (%d, %d)\n", dim0, dim1); + printf("Illegal dim sizes (%d, %d)\n", dim0, dim1); nerrors++; return (1); } if (chunkdim0 <= 0 || chunkdim1 <= 0) { - HDprintf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1); + printf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1); nerrors++; return (1); } @@ -4164,7 +4163,7 @@ parse_options(int argc, char **argv) /* Make sure datasets can be divided into equal portions by the processes */ if ((dim0 % mpi_size) || (dim1 % mpi_size)) { if (MAINPROCESS) - HDprintf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size); + printf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size); nerrors++; return (1); } @@ -4179,15 +4178,15 @@ parse_options(int argc, char **argv) strncpy(filenames[i], FILENAME[i], PATH_MAX); #if 0 /* no support for VFDs right now */ if (h5_fixname(FILENAME[i], fapl, filenames[i], PATH_MAX) == NULL) { - HDprintf("h5_fixname failed\n"); + printf("h5_fixname failed\n"); nerrors++; return (1); } #endif if (MAINPROCESS) { - HDprintf("Test filenames are:\n"); + printf("Test filenames are:\n"); for (i = 0; i < n; i++) - HDprintf(" %s\n", filenames[i]); + printf(" %s\n", filenames[i]); } } @@ -4322,10 +4321,10 @@ main(int argc, char **argv) dim1 = COL_FACTOR * mpi_size; if (MAINPROCESS) { - HDprintf("===================================\n"); - HDprintf("Shape Same Tests Start\n"); - HDprintf(" express_test = %d.\n", EXPRESS_MODE /* GetTestExpress() */); - HDprintf("===================================\n"); + printf("===================================\n"); + printf("Shape Same Tests Start\n"); + printf(" express_test = %d.\n", EXPRESS_MODE /* GetTestExpress() */); + printf("===================================\n"); } /* Attempt to turn off atexit post processing so that in case errors @@ -4335,7 +4334,7 @@ main(int argc, char **argv) */ if (H5dont_atexit() < 0) { if (MAINPROCESS) - HDprintf("%d: Failed to turn off atexit processing. Continue.\n", mpi_rank); + printf("%d: Failed to turn off atexit processing. Continue.\n", mpi_rank); }; H5open(); /* h5_show_hostname(); */ @@ -4345,7 +4344,7 @@ main(int argc, char **argv) /* Get the capability flag of the VOL connector being used */ if (H5Pget_vol_cap_flags(fapl, &vol_cap_flags_g) < 0) { if (MAINPROCESS) - HDprintf("Failed to get the capability flag of the VOL connector being used\n"); + printf("Failed to get the capability flag of the VOL connector being used\n"); MPI_Finalize(); return 0; @@ -4356,17 +4355,17 @@ main(int argc, char **argv) */ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) { if (MAINPROCESS) - HDprintf("API functions for basic file and dataset aren't supported with this connector\n"); + printf("API functions for basic file and dataset aren't supported with this connector\n"); MPI_Finalize(); return 0; } #if 0 - HDmemset(filenames, 0, sizeof(filenames)); + memset(filenames, 0, sizeof(filenames)); for (int i = 0; i < NFILENAME; i++) { - if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) { - HDprintf("couldn't allocate filename array\n"); + if (NULL == (filenames[i] = malloc(PATH_MAX))) { + printf("couldn't allocate filename array\n"); MPI_Abort(MPI_COMM_WORLD, -1); } } @@ -4381,9 +4380,9 @@ main(int argc, char **argv) } if (dxfer_coll_type == DXFER_INDEPENDENT_IO && MAINPROCESS) { - HDprintf("===================================\n" - " Using Independent I/O with file set view to replace collective I/O \n" - "===================================\n"); + printf("===================================\n" + " Using Independent I/O with file set view to replace collective I/O \n" + "===================================\n"); } /* Shape Same tests using contiguous hyperslab */ @@ -4486,17 +4485,17 @@ main(int argc, char **argv) } if (MAINPROCESS) { /* only process 0 reports */ - HDprintf("===================================\n"); + printf("===================================\n"); if (nerrors) - HDprintf("***Shape Same tests detected %d errors***\n", nerrors); + printf("***Shape Same tests detected %d errors***\n", nerrors); else - HDprintf("Shape Same tests finished successfully\n"); - HDprintf("===================================\n"); + printf("Shape Same tests finished successfully\n"); + printf("===================================\n"); } #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 5aafb0b..c7cb257 100644 --- a/testpar/API/t_span_tree.c +++ b/testpar/API/t_span_tree.c @@ -337,11 +337,11 @@ 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); + memset(vector, 0, sizeof(int) * (size_t)mdim1[0] * (size_t)mpi_size); vector[0] = vector[MSPACE1_DIM * mpi_size - 1] = -1; for (i = 1; i < MSPACE1_DIM * mpi_size - 1; i++) vector[i] = (int)i; @@ -664,8 +664,8 @@ coll_write_test(int chunk_factor) * Initialize data buffer. */ - HDmemset(matrix_out, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); - HDmemset(matrix_out1, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); + memset(matrix_out, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); + memset(matrix_out1, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); /* * Read data back to the buffer matrix_out. */ @@ -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 ***/ @@ -905,8 +905,8 @@ coll_read_test(void) * Initialize data buffer. */ - HDmemset(matrix_out, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); - HDmemset(matrix_out1, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); + memset(matrix_out, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); + memset(matrix_out1, 0, sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); /* * Read data back to the buffer matrix_out. @@ -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. @@ -1033,31 +1033,31 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t #if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s:%d: dims/checker_edge_size = %d %d %d %d %d / %d\n", fcnName, mpi_rank, - (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4], checker_edge_size); + fprintf(stdout, "%s:%d: dims/checker_edge_size = %d %d %d %d %d / %d\n", fcnName, mpi_rank, + (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4], checker_edge_size); } #endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */ - HDassert(0 < checker_edge_size); - HDassert(0 < sel_rank); - HDassert(sel_rank <= tgt_rank); - HDassert(tgt_rank <= test_max_rank); - HDassert(test_max_rank <= LDSCT_DS_RANK); + assert(0 < checker_edge_size); + assert(0 < sel_rank); + assert(sel_rank <= tgt_rank); + assert(tgt_rank <= test_max_rank); + assert(test_max_rank <= LDSCT_DS_RANK); sel_offset = test_max_rank - sel_rank; - HDassert(sel_offset >= 0); + assert(sel_offset >= 0); ds_offset = test_max_rank - tgt_rank; - HDassert(ds_offset >= 0); - HDassert(ds_offset <= sel_offset); + assert(ds_offset >= 0); + assert(ds_offset <= sel_offset); - HDassert((hsize_t)checker_edge_size <= dims[sel_offset]); - HDassert(dims[sel_offset] == 10); + assert((hsize_t)checker_edge_size <= dims[sel_offset]); + assert(dims[sel_offset] == 10); #if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s:%d: sel_rank/sel_offset = %d/%d.\n", fcnName, mpi_rank, sel_rank, sel_offset); - HDfprintf(stdout, "%s:%d: tgt_rank/ds_offset = %d/%d.\n", fcnName, mpi_rank, tgt_rank, ds_offset); + fprintf(stdout, "%s:%d: sel_rank/sel_offset = %d/%d.\n", fcnName, mpi_rank, sel_rank, sel_offset); + fprintf(stdout, "%s:%d: tgt_rank/ds_offset = %d/%d.\n", fcnName, mpi_rank, tgt_rank, ds_offset); } #endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */ @@ -1091,8 +1091,8 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t #if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s:%d: base_count/offset_count = %d/%d.\n", fcnName, mpi_rank, base_count, - offset_count); + fprintf(stdout, "%s:%d: base_count/offset_count = %d/%d.\n", fcnName, mpi_rank, base_count, + offset_count); } #endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */ @@ -1215,26 +1215,25 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t #if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s%d: *** first_selection = %d ***\n", fcnName, mpi_rank, - (int)first_selection); - HDfprintf(stdout, "%s:%d: i/j/k/l/m = %d/%d/%d/%d/%d\n", fcnName, mpi_rank, i, - j, k, l, m); - HDfprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, mpi_rank, - (int)start[0], (int)start[1], (int)start[2], (int)start[3], - (int)start[4]); - HDfprintf(stdout, "%s:%d: stride = %d %d %d %d %d.\n", fcnName, mpi_rank, - (int)stride[0], (int)stride[1], (int)stride[2], (int)stride[3], - (int)stride[4]); - HDfprintf(stdout, "%s:%d: count = %d %d %d %d %d.\n", fcnName, mpi_rank, - (int)count[0], (int)count[1], (int)count[2], (int)count[3], - (int)count[4]); - HDfprintf(stdout, "%s:%d: block = %d %d %d %d %d.\n", fcnName, mpi_rank, - (int)block[0], (int)block[1], (int)block[2], (int)block[3], - (int)block[4]); - HDfprintf(stdout, "%s:%d: n-cube extent dims = %d.\n", fcnName, mpi_rank, - H5Sget_simple_extent_ndims(tgt_sid)); - HDfprintf(stdout, "%s:%d: selection rank = %d.\n", fcnName, mpi_rank, - sel_rank); + fprintf(stdout, "%s%d: *** first_selection = %d ***\n", fcnName, mpi_rank, + (int)first_selection); + fprintf(stdout, "%s:%d: i/j/k/l/m = %d/%d/%d/%d/%d\n", fcnName, mpi_rank, i, + j, k, l, m); + fprintf(stdout, "%s:%d: start = %d %d %d %d %d.\n", fcnName, mpi_rank, + (int)start[0], (int)start[1], (int)start[2], (int)start[3], + (int)start[4]); + fprintf(stdout, "%s:%d: stride = %d %d %d %d %d.\n", fcnName, mpi_rank, + (int)stride[0], (int)stride[1], (int)stride[2], (int)stride[3], + (int)stride[4]); + fprintf(stdout, "%s:%d: count = %d %d %d %d %d.\n", fcnName, mpi_rank, + (int)count[0], (int)count[1], (int)count[2], (int)count[3], + (int)count[4]); + fprintf(stdout, "%s:%d: block = %d %d %d %d %d.\n", fcnName, mpi_rank, + (int)block[0], (int)block[1], (int)block[2], (int)block[3], + (int)block[4]); + fprintf(stdout, "%s:%d: n-cube extent dims = %d.\n", fcnName, mpi_rank, + H5Sget_simple_extent_ndims(tgt_sid)); + fprintf(stdout, "%s:%d: selection rank = %d.\n", fcnName, mpi_rank, sel_rank); } #endif @@ -1280,8 +1279,8 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t #if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank, - (int)H5Sget_select_npoints(tgt_sid)); + fprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank, + (int)H5Sget_select_npoints(tgt_sid)); } #endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */ @@ -1301,9 +1300,9 @@ lower_dim_size_comp_test__select_checker_board(const int mpi_rank, const hid_t t #if LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank, - (int)H5Sget_select_npoints(tgt_sid)); - HDfprintf(stdout, "%s%d: done.\n", fcnName, mpi_rank); + fprintf(stdout, "%s%d: H5Sget_select_npoints(tgt_sid) = %d.\n", fcnName, mpi_rank, + (int)H5Sget_select_npoints(tgt_sid)); + fprintf(stdout, "%s%d: done.\n", fcnName, mpi_rank); } #endif /* LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG */ @@ -1389,22 +1388,22 @@ lower_dim_size_comp_test__verify_data(uint32_t *buf_ptr, int v, w, x, y, z; /* to track position in checker */ const int test_max_rank = 5; /* code changes needed if this is increased */ - HDassert(buf_ptr != NULL); - HDassert(0 < rank); - HDassert(rank <= test_max_rank); - HDassert(edge_size >= 6); - HDassert(0 < checker_edge_size); - HDassert(checker_edge_size <= edge_size); - HDassert(test_max_rank <= LDSCT_DS_RANK); + assert(buf_ptr != NULL); + assert(0 < rank); + assert(rank <= test_max_rank); + assert(edge_size >= 6); + assert(0 < checker_edge_size); + assert(checker_edge_size <= edge_size); + assert(test_max_rank <= LDSCT_DS_RANK); #if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s mpi_rank = %d.\n", fcnName, mpi_rank); - HDfprintf(stdout, "%s rank = %d.\n", fcnName, rank); - HDfprintf(stdout, "%s edge_size = %d.\n", fcnName, edge_size); - HDfprintf(stdout, "%s checker_edge_size = %d.\n", fcnName, checker_edge_size); - HDfprintf(stdout, "%s first_expected_val = %d.\n", fcnName, (int)first_expected_val); - HDfprintf(stdout, "%s starts_in_checker = %d.\n", fcnName, (int)buf_starts_in_checker); + fprintf(stdout, "%s mpi_rank = %d.\n", fcnName, mpi_rank); + fprintf(stdout, "%s rank = %d.\n", fcnName, rank); + fprintf(stdout, "%s edge_size = %d.\n", fcnName, edge_size); + fprintf(stdout, "%s checker_edge_size = %d.\n", fcnName, checker_edge_size); + fprintf(stdout, "%s first_expected_val = %d.\n", fcnName, (int)first_expected_val); + fprintf(stdout, "%s starts_in_checker = %d.\n", fcnName, (int)buf_starts_in_checker); } #endif @@ -1455,14 +1454,14 @@ lower_dim_size_comp_test__verify_data(uint32_t *buf_ptr, z = 0; #if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%d, %d, %d, %d, %d:", i, j, k, l, m); + fprintf(stdout, "%d, %d, %d, %d, %d:", i, j, k, l, m); } #endif in_checker = start_in_checker[3]; do { #if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, " %d", (int)(*val_ptr)); + fprintf(stdout, " %d", (int)(*val_ptr)); } #endif if (z >= checker_edge_size) { @@ -1497,7 +1496,7 @@ lower_dim_size_comp_test__verify_data(uint32_t *buf_ptr, } while ((rank >= (test_max_rank - 4)) && (m < edge_size)); #if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "\n"); + fprintf(stdout, "\n"); } #endif l++; @@ -1598,15 +1597,15 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); - HDassert(mpi_size >= 1); + assert(mpi_size >= 1); mpi_comm = MPI_COMM_WORLD; mpi_info = MPI_INFO_NULL; #if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s:%d: chunk_edge_size = %d.\n", fcnName, mpi_rank, (int)chunk_edge_size); - HDfprintf(stdout, "%s:%d: use_collective_io = %d.\n", fcnName, mpi_rank, (int)use_collective_io); + fprintf(stdout, "%s:%d: chunk_edge_size = %d.\n", fcnName, mpi_rank, (int)chunk_edge_size); + fprintf(stdout, "%s:%d: use_collective_io = %d.\n", fcnName, mpi_rank, (int)use_collective_io); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ @@ -1618,24 +1617,24 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ large_ds_slice_size = (size_t)(10 * 10 * 10 * 10); if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s:%d: small ds size / slice size = %d / %d.\n", fcnName, mpi_rank, - (int)small_ds_size, (int)small_ds_slice_size); - HDfprintf(stdout, "%s:%d: large ds size / slice size = %d / %d.\n", fcnName, mpi_rank, - (int)large_ds_size, (int)large_ds_slice_size); + fprintf(stdout, "%s:%d: small ds size / slice size = %d / %d.\n", fcnName, mpi_rank, + (int)small_ds_size, (int)small_ds_slice_size); + fprintf(stdout, "%s:%d: large ds size / slice size = %d / %d.\n", fcnName, mpi_rank, + (int)large_ds_size, (int)large_ds_slice_size); } #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 */ @@ -1667,7 +1666,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ /* get the file name */ filename = (const char *)PARATESTFILE /* GetTestParameters() */; - HDassert(filename != NULL); + assert(filename != NULL); /* ---------------------------------------- * CREATE AN HDF5 FILE WITH PARALLEL ACCESS @@ -1701,10 +1700,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ #if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s:%d: small_dims[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)small_dims[0], - (int)small_dims[1], (int)small_dims[2], (int)small_dims[3], (int)small_dims[4]); - HDfprintf(stdout, "%s:%d: large_dims[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)large_dims[0], - (int)large_dims[1], (int)large_dims[2], (int)large_dims[3], (int)large_dims[4]); + fprintf(stdout, "%s:%d: small_dims[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)small_dims[0], + (int)small_dims[1], (int)small_dims[2], (int)small_dims[3], (int)small_dims[4]); + fprintf(stdout, "%s:%d: large_dims[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)large_dims[0], + (int)large_dims[1], (int)large_dims[2], (int)large_dims[3], (int)large_dims[4]); } #endif @@ -1760,9 +1759,9 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ #if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s:%d: small chunk dims[] = %d %d %d %d %d\n", fcnName, mpi_rank, - (int)small_chunk_dims[0], (int)small_chunk_dims[1], (int)small_chunk_dims[2], - (int)small_chunk_dims[3], (int)small_chunk_dims[4]); + fprintf(stdout, "%s:%d: small chunk dims[] = %d %d %d %d %d\n", fcnName, mpi_rank, + (int)small_chunk_dims[0], (int)small_chunk_dims[1], (int)small_chunk_dims[2], + (int)small_chunk_dims[3], (int)small_chunk_dims[4]); } #endif @@ -1781,9 +1780,9 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ #if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s:%d: large chunk dims[] = %d %d %d %d %d\n", fcnName, mpi_rank, - (int)large_chunk_dims[0], (int)large_chunk_dims[1], (int)large_chunk_dims[2], - (int)large_chunk_dims[3], (int)large_chunk_dims[4]); + fprintf(stdout, "%s:%d: large chunk dims[] = %d %d %d %d %d\n", fcnName, mpi_rank, + (int)large_chunk_dims[0], (int)large_chunk_dims[1], (int)large_chunk_dims[2], + (int)large_chunk_dims[3], (int)large_chunk_dims[4]); } #endif @@ -1809,8 +1808,8 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ #if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s:%d: small/large ds id = %d / %d.\n", fcnName, mpi_rank, (int)small_dataset, - (int)large_dataset); + fprintf(stdout, "%s:%d: small/large ds id = %d / %d.\n", fcnName, mpi_rank, (int)small_dataset, + (int)large_dataset); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ @@ -1842,15 +1841,15 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ #if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s:%d: settings for small data set initialization.\n", fcnName, mpi_rank); - HDfprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0], - (int)start[1], (int)start[2], (int)start[3], (int)start[4]); - HDfprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0], - (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]); - HDfprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0], - (int)count[1], (int)count[2], (int)count[3], (int)count[4]); - HDfprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0], - (int)block[1], (int)block[2], (int)block[3], (int)block[4]); + fprintf(stdout, "%s:%d: settings for small data set initialization.\n", fcnName, mpi_rank); + fprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0], (int)start[1], + (int)start[2], (int)start[3], (int)start[4]); + fprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0], + (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]); + fprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0], (int)count[1], + (int)count[2], (int)count[3], (int)count[4]); + fprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0], (int)block[1], + (int)block[2], (int)block[3], (int)block[4]); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ @@ -1867,15 +1866,15 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ #if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s:%d: added settings for main process.\n", fcnName, mpi_rank); - HDfprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0], - (int)start[1], (int)start[2], (int)start[3], (int)start[4]); - HDfprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0], - (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]); - HDfprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0], - (int)count[1], (int)count[2], (int)count[3], (int)count[4]); - HDfprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0], - (int)block[1], (int)block[2], (int)block[3], (int)block[4]); + fprintf(stdout, "%s:%d: added settings for main process.\n", fcnName, mpi_rank); + fprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0], + (int)start[1], (int)start[2], (int)start[3], (int)start[4]); + fprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0], + (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]); + fprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0], + (int)count[1], (int)count[2], (int)count[3], (int)count[4]); + fprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0], + (int)block[1], (int)block[2], (int)block[3], (int)block[4]); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ @@ -1895,7 +1894,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ /* write the initial value of the small data set to file */ #if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s:%d: writing init value of small ds to file.\n", fcnName, mpi_rank); + fprintf(stdout, "%s:%d: writing init value of small ds to file.\n", fcnName, mpi_rank); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ ret = H5Dwrite(small_dataset, dset_type, mem_small_ds_sid, file_small_ds_sid, xfer_plist, small_ds_buf_0); @@ -1953,15 +1952,15 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ #if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s:%d: settings for large data set initialization.\n", fcnName, mpi_rank); - HDfprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0], - (int)start[1], (int)start[2], (int)start[3], (int)start[4]); - HDfprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0], - (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]); - HDfprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0], - (int)count[1], (int)count[2], (int)count[3], (int)count[4]); - HDfprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0], - (int)block[1], (int)block[2], (int)block[3], (int)block[4]); + fprintf(stdout, "%s:%d: settings for large data set initialization.\n", fcnName, mpi_rank); + fprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0], (int)start[1], + (int)start[2], (int)start[3], (int)start[4]); + fprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0], + (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]); + fprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0], (int)count[1], + (int)count[2], (int)count[3], (int)count[4]); + fprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0], (int)block[1], + (int)block[2], (int)block[3], (int)block[4]); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ @@ -1973,10 +1972,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ #if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s%d: H5Sget_select_npoints(mem_large_ds_sid) = %d.\n", fcnName, mpi_rank, - (int)H5Sget_select_npoints(mem_large_ds_sid)); - HDfprintf(stdout, "%s%d: H5Sget_select_npoints(file_large_ds_sid) = %d.\n", fcnName, mpi_rank, - (int)H5Sget_select_npoints(file_large_ds_sid)); + fprintf(stdout, "%s%d: H5Sget_select_npoints(mem_large_ds_sid) = %d.\n", fcnName, mpi_rank, + (int)H5Sget_select_npoints(mem_large_ds_sid)); + fprintf(stdout, "%s%d: H5Sget_select_npoints(file_large_ds_sid) = %d.\n", fcnName, mpi_rank, + (int)H5Sget_select_npoints(file_large_ds_sid)); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ @@ -1986,15 +1985,15 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ #if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s:%d: added settings for main process.\n", fcnName, mpi_rank); - HDfprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0], - (int)start[1], (int)start[2], (int)start[3], (int)start[4]); - HDfprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0], - (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]); - HDfprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0], - (int)count[1], (int)count[2], (int)count[3], (int)count[4]); - HDfprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0], - (int)block[1], (int)block[2], (int)block[3], (int)block[4]); + fprintf(stdout, "%s:%d: added settings for main process.\n", fcnName, mpi_rank); + fprintf(stdout, "%s:%d: start[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)start[0], + (int)start[1], (int)start[2], (int)start[3], (int)start[4]); + fprintf(stdout, "%s:%d: stride[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)stride[0], + (int)stride[1], (int)stride[2], (int)stride[3], (int)stride[4]); + fprintf(stdout, "%s:%d: count[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)count[0], + (int)count[1], (int)count[2], (int)count[3], (int)count[4]); + fprintf(stdout, "%s:%d: block[] = %d %d %d %d %d\n", fcnName, mpi_rank, (int)block[0], + (int)block[1], (int)block[2], (int)block[3], (int)block[4]); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ @@ -2006,10 +2005,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ #if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s%d: H5Sget_select_npoints(mem_large_ds_sid) = %d.\n", fcnName, mpi_rank, - (int)H5Sget_select_npoints(mem_large_ds_sid)); - HDfprintf(stdout, "%s%d: H5Sget_select_npoints(file_large_ds_sid) = %d.\n", fcnName, mpi_rank, - (int)H5Sget_select_npoints(file_large_ds_sid)); + fprintf(stdout, "%s%d: H5Sget_select_npoints(mem_large_ds_sid) = %d.\n", fcnName, mpi_rank, + (int)H5Sget_select_npoints(mem_large_ds_sid)); + fprintf(stdout, "%s%d: H5Sget_select_npoints(file_large_ds_sid) = %d.\n", fcnName, mpi_rank, + (int)H5Sget_select_npoints(file_large_ds_sid)); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ } @@ -2035,12 +2034,12 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { rank = H5Sget_simple_extent_dims(mem_large_ds_sid, dims, max_dims); - HDfprintf(stdout, "%s:%d: mem_large_ds_sid dims[%d] = %d %d %d %d %d\n", fcnName, mpi_rank, rank, - (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4]); + fprintf(stdout, "%s:%d: mem_large_ds_sid dims[%d] = %d %d %d %d %d\n", fcnName, mpi_rank, rank, + (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4]); rank = H5Sget_simple_extent_dims(file_large_ds_sid, dims, max_dims); - HDfprintf(stdout, "%s:%d: file_large_ds_sid dims[%d] = %d %d %d %d %d\n", fcnName, mpi_rank, rank, - (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4]); + fprintf(stdout, "%s:%d: file_large_ds_sid dims[%d] = %d %d %d %d %d\n", fcnName, mpi_rank, rank, + (int)dims[0], (int)dims[1], (int)dims[2], (int)dims[3], (int)dims[4]); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ @@ -2053,10 +2052,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ /* write the initial value of the large data set to file */ #if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s:%d: writing init value of large ds to file.\n", fcnName, mpi_rank); - HDfprintf(stdout, "%s:%d: large_dataset = %d.\n", fcnName, mpi_rank, (int)large_dataset); - HDfprintf(stdout, "%s:%d: mem_large_ds_sid = %d, file_large_ds_sid = %d.\n", fcnName, mpi_rank, - (int)mem_large_ds_sid, (int)file_large_ds_sid); + fprintf(stdout, "%s:%d: writing init value of large ds to file.\n", fcnName, mpi_rank); + fprintf(stdout, "%s:%d: large_dataset = %d.\n", fcnName, mpi_rank, (int)large_dataset); + fprintf(stdout, "%s:%d: mem_large_ds_sid = %d, file_large_ds_sid = %d.\n", fcnName, mpi_rank, + (int)mem_large_ds_sid, (int)file_large_ds_sid); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ @@ -2145,7 +2144,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ #if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, mpi_rank); + fprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, mpi_rank); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ @@ -2160,9 +2159,9 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ stop_index = start_index + (int)small_ds_slice_size; - HDassert(0 <= start_index); - HDassert(start_index < stop_index); - HDassert(stop_index <= (int)large_ds_size); + assert(0 <= start_index); + assert(start_index < stop_index); + assert(stop_index <= (int)large_ds_size); ptr_1 = large_ds_buf_1; @@ -2242,7 +2241,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ #if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, mpi_rank); + fprintf(stdout, "%s:%d: H5Dread() returns.\n", fcnName, mpi_rank); } #endif /* LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG */ @@ -2260,9 +2259,9 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ stop_index = start_index + (int)small_ds_slice_size; - HDassert(0 <= start_index); - HDassert(start_index < stop_index); - HDassert(stop_index <= (int)small_ds_size); + assert(0 <= start_index); + assert(start_index < stop_index); + assert(stop_index <= (int)small_ds_size); ptr_1 = small_ds_buf_1; @@ -2300,8 +2299,8 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ #if LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG if (mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK) { - HDfprintf(stdout, "%s:%d: unexpected value at index %d: %d.\n", fcnName, mpi_rank, (int)i, - (int)(*ptr_1)); + fprintf(stdout, "%s:%d: unexpected value at index %d: %d.\n", fcnName, mpi_rank, (int)i, + (int)(*ptr_1)); } #endif /* LOWER_DIM_SIZE_COMP_TEST__VERIFY_DATA__DEBUG */ @@ -2353,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; @@ -2490,11 +2489,11 @@ link_chunk_collective_io_test(void) return; } - HDassert(mpi_size > 0); + assert(mpi_size > 0); /* get the file name */ filename = (const char *)PARATESTFILE /* GetTestParameters() */; - HDassert(filename != NULL); + assert(filename != NULL); /* setup file access template */ acc_tpl = create_faccess_plist(mpi_comm, mpi_info, facc_type); diff --git a/testpar/API/testphdf5.c b/testpar/API/testphdf5.c index ec5dae2..9469c12 100644 --- a/testpar/API/testphdf5.c +++ b/testpar/API/testphdf5.c @@ -80,11 +80,10 @@ pause_proc(void) if (MAINPROCESS) while ((HDstat(greenlight, &statbuf) == -1) && loops < maxloop) { if (!loops++) { - HDprintf("Proc %d (%*s, %d): to debug, attach %d\n", mpi_rank, mpi_namelen, mpi_name, pid, - pid); + printf("Proc %d (%*s, %d): to debug, attach %d\n", mpi_rank, mpi_namelen, mpi_name, pid, pid); } - HDprintf("waiting(%ds) for file %s ...\n", time_int, greenlight); - HDfflush(stdout); + printf("waiting(%ds) for file %s ...\n", time_int, greenlight); + fflush(stdout); HDsleep(time_int); } MPI_Barrier(MPI_COMM_WORLD); @@ -107,20 +106,20 @@ MPI_Init(int *argc, char ***argv) static void usage(void) { - HDprintf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] " - "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n"); - HDprintf("\t-m<n_datasets>" - "\tset number of datasets for the multiple dataset test\n"); - HDprintf("\t-n<n_groups>" - "\tset number of groups for the multiple group test\n"); + printf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] " + "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n"); + printf("\t-m<n_datasets>" + "\tset number of datasets for the multiple dataset test\n"); + printf("\t-n<n_groups>" + "\tset number of groups for the multiple group test\n"); #if 0 - HDprintf("\t-f <prefix>\tfilename prefix\n"); + printf("\t-f <prefix>\tfilename prefix\n"); #endif - HDprintf("\t-2\t\tuse Split-file together with MPIO\n"); - HDprintf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", ROW_FACTOR, - COL_FACTOR); - HDprintf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n"); - HDprintf("\n"); + printf("\t-2\t\tuse Split-file together with MPIO\n"); + printf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", ROW_FACTOR, + COL_FACTOR); + printf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n"); + printf("\n"); } /* @@ -203,7 +202,7 @@ parse_options(int argc, char **argv) case 'h': /* print help message--return with nerrors set */ return (1); default: - HDprintf("Illegal option(%s)\n", *argv); + printf("Illegal option(%s)\n", *argv); nerrors++; return (1); } @@ -212,12 +211,12 @@ parse_options(int argc, char **argv) /* check validity of dimension and chunk sizes */ if (dim0 <= 0 || dim1 <= 0) { - HDprintf("Illegal dim sizes (%d, %d)\n", dim0, dim1); + printf("Illegal dim sizes (%d, %d)\n", dim0, dim1); nerrors++; return (1); } if (chunkdim0 <= 0 || chunkdim1 <= 0) { - HDprintf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1); + printf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1); nerrors++; return (1); } @@ -225,7 +224,7 @@ parse_options(int argc, char **argv) /* Make sure datasets can be divided into equal portions by the processes */ if ((dim0 % mpi_size) || (dim1 % mpi_size)) { if (MAINPROCESS) - HDprintf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size); + printf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size); nerrors++; return (1); } @@ -240,15 +239,15 @@ parse_options(int argc, char **argv) strncpy(filenames[i], FILENAME[i], PATH_MAX); #if 0 /* no support for VFDs right now */ if (h5_fixname(FILENAME[i], fapl, filenames[i], PATH_MAX) == NULL) { - HDprintf("h5_fixname failed\n"); + printf("h5_fixname failed\n"); nerrors++; return (1); } #endif if (MAINPROCESS) { - HDprintf("Test filenames are:\n"); + printf("Test filenames are:\n"); for (i = 0; i < n; i++) - HDprintf(" %s\n", filenames[i]); + printf(" %s\n", filenames[i]); } } @@ -335,9 +334,9 @@ main(int argc, char **argv) dim1 = COL_FACTOR * mpi_size; if (MAINPROCESS) { - HDprintf("===================================\n"); - HDprintf("PHDF5 TESTS START\n"); - HDprintf("===================================\n"); + printf("===================================\n"); + printf("PHDF5 TESTS START\n"); + printf("===================================\n"); } /* Attempt to turn off atexit post processing so that in case errors @@ -346,16 +345,16 @@ main(int argc, char **argv) * calls. By then, MPI calls may not work. */ if (H5dont_atexit() < 0) { - HDprintf("Failed to turn off atexit processing. Continue.\n"); + printf("Failed to turn off atexit processing. Continue.\n"); }; H5open(); /* h5_show_hostname(); */ #if 0 - HDmemset(filenames, 0, sizeof(filenames)); + memset(filenames, 0, sizeof(filenames)); for (int i = 0; i < NFILENAME; i++) { - if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) { - HDprintf("couldn't allocate filename array\n"); + if (NULL == (filenames[i] = malloc(PATH_MAX))) { + printf("couldn't allocate filename array\n"); MPI_Abort(MPI_COMM_WORLD, -1); } } @@ -585,7 +584,7 @@ main(int argc, char **argv) AddTest("bigdset", big_dataset, NULL, "big dataset test", PARATESTFILE); #else - HDprintf("big dataset test will be skipped on Windows (JIRA HDDFV-8064)\n"); + printf("big dataset test will be skipped on Windows (JIRA HDDFV-8064)\n"); #endif #endif @@ -644,9 +643,9 @@ main(int argc, char **argv) coll_chunk4(); if ((mpi_size < 3) && MAINPROCESS) { - HDprintf("Collective chunk IO optimization APIs "); - HDprintf("needs at least 3 processes to participate\n"); - HDprintf("Collective chunk IO API tests will be skipped \n"); + printf("Collective chunk IO optimization APIs "); + printf("needs at least 3 processes to participate\n"); + printf("Collective chunk IO API tests will be skipped \n"); } #if 0 @@ -783,8 +782,8 @@ main(int argc, char **argv) io_mode_confusion(); if ((mpi_size < 3) && MAINPROCESS) { - HDprintf("rr_obj_hdr_flush_confusion test needs at least 3 processes.\n"); - HDprintf("rr_obj_hdr_flush_confusion test will be skipped \n"); + printf("rr_obj_hdr_flush_confusion test needs at least 3 processes.\n"); + printf("rr_obj_hdr_flush_confusion test will be skipped \n"); } if (mpi_size > 2) { @@ -863,8 +862,8 @@ main(int argc, char **argv) test_plist_ed(); if ((mpi_size < 2) && MAINPROCESS) { - HDprintf("File Image Ops daisy chain test needs at least 2 processes.\n"); - HDprintf("File Image Ops daisy chain test will be skipped \n"); + printf("File Image Ops daisy chain test needs at least 2 processes.\n"); + printf("File Image Ops daisy chain test will be skipped \n"); } #if 0 @@ -881,11 +880,11 @@ main(int argc, char **argv) } if ((mpi_size < 2) && MAINPROCESS) { - HDprintf("Atomicity tests need at least 2 processes to participate\n"); - HDprintf("8 is more recommended.. Atomicity tests will be skipped \n"); + printf("Atomicity tests need at least 2 processes to participate\n"); + printf("8 is more recommended.. Atomicity tests will be skipped \n"); } else if (facc_type != FACC_MPIO && MAINPROCESS) { - HDprintf("Atomicity tests will not work with a non MPIO VFD\n"); + printf("Atomicity tests will not work with a non MPIO VFD\n"); } else if (mpi_size >= 2 && facc_type == FACC_MPIO) { #if 0 @@ -946,9 +945,9 @@ main(int argc, char **argv) /* TestParseCmdLine(argc, argv); */ if (dxfer_coll_type == DXFER_INDEPENDENT_IO && MAINPROCESS) { - HDprintf("===================================\n" - " Using Independent I/O with file set view to replace collective I/O \n" - "===================================\n"); + printf("===================================\n" + " Using Independent I/O with file set view to replace collective I/O \n" + "===================================\n"); } /* Perform requested testing */ @@ -978,17 +977,17 @@ main(int argc, char **argv) } if (MAINPROCESS) { /* only process 0 reports */ - HDprintf("===================================\n"); + printf("===================================\n"); if (nerrors) - HDprintf("***PHDF5 tests detected %d errors***\n", nerrors); + printf("***PHDF5 tests detected %d errors***\n", nerrors); else - HDprintf("PHDF5 tests finished successfully\n"); - HDprintf("===================================\n"); + printf("PHDF5 tests finished successfully\n"); + printf("===================================\n"); } #if 0 for (int i = 0; i < NFILENAME; i++) { - HDfree(filenames[i]); + free(filenames[i]); filenames[i] = NULL; } #endif |