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 | |
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')
53 files changed, 5664 insertions, 5708 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 diff --git a/testpar/t_2Gio.c b/testpar/t_2Gio.c index 8b67dd9..a64b6c1 100644 --- a/testpar/t_2Gio.c +++ b/testpar/t_2Gio.c @@ -96,18 +96,18 @@ MPI_Comm test_comm = MPI_COMM_WORLD; static void usage(void) { - HDprintf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] " - "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n"); - HDprintf("\t-m<n_datasets>" - "\tset number of datasets for the multiple dataset test\n"); - HDprintf("\t-n<n_groups>" - "\tset number of groups for the multiple group test\n"); - HDprintf("\t-f <prefix>\tfilename prefix\n"); - HDprintf("\t-2\t\tuse Split-file together with MPIO\n"); - HDprintf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", BIG_X_FACTOR, - BIG_Y_FACTOR); - HDprintf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n"); - HDprintf("\n"); + printf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] " + "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n"); + printf("\t-m<n_datasets>" + "\tset number of datasets for the multiple dataset test\n"); + printf("\t-n<n_groups>" + "\tset number of groups for the multiple group test\n"); + printf("\t-f <prefix>\tfilename prefix\n"); + printf("\t-2\t\tuse Split-file together with MPIO\n"); + printf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", BIG_X_FACTOR, + BIG_Y_FACTOR); + printf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n"); + printf("\n"); } /* @@ -189,7 +189,7 @@ parse_options(int argc, char **argv) case 'h': /* print help message--return with nerrors set */ return (1); default: - HDprintf("Illegal option(%s)\n", *argv); + printf("Illegal option(%s)\n", *argv); nerrors++; return (1); } @@ -198,12 +198,12 @@ parse_options(int argc, char **argv) /* check validity of dimension and chunk sizes */ if (dim0 <= 0 || dim1 <= 0) { - HDprintf("Illegal dim sizes (%d, %d)\n", dim0, dim1); + printf("Illegal dim sizes (%d, %d)\n", dim0, dim1); nerrors++; return (1); } if (chunkdim0 <= 0 || chunkdim1 <= 0) { - HDprintf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1); + printf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1); nerrors++; return (1); } @@ -211,7 +211,7 @@ parse_options(int argc, char **argv) /* Make sure datasets can be divided into equal portions by the processes */ if ((dim0 % mpi_size) || (dim1 % mpi_size)) { if (MAINPROCESS) - HDprintf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size); + printf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n", dim0, dim1, mpi_size); nerrors++; return (1); } @@ -224,15 +224,15 @@ parse_options(int argc, char **argv) for (i = 0; i < n; i++) if (h5_fixname(FILENAME[i], fapl, filenames[i], PATH_MAX) == NULL) { - HDprintf("h5_fixname failed\n"); + printf("h5_fixname failed\n"); nerrors++; return (1); } if (MAINPROCESS) { - HDprintf("Test filenames are:\n"); + printf("Test filenames are:\n"); for (i = 0; i < n; i++) - HDprintf(" %s\n", filenames[i]); + printf(" %s\n", filenames[i]); } } @@ -317,7 +317,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s start[0] = (hsize_t)mpi_rank * block[0]; start[1] = 0; if (VERBOSE_MED) - HDprintf("slab_set BYROW\n"); + printf("slab_set BYROW\n"); break; case BYCOL: /* Each process takes a block of columns. */ @@ -330,7 +330,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s start[0] = 0; start[1] = (hsize_t)mpi_rank * block[1]; if (VERBOSE_MED) - HDprintf("slab_set BYCOL\n"); + printf("slab_set BYCOL\n"); break; case ZROW: /* Similar to BYROW except process 0 gets 0 row */ @@ -343,7 +343,7 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s start[0] = (hsize_t)(mpi_rank ? (hsize_t)mpi_rank * block[0] : 0); start[1] = 0; if (VERBOSE_MED) - HDprintf("slab_set ZROW\n"); + printf("slab_set ZROW\n"); break; case ZCOL: /* Similar to BYCOL except process 0 gets 0 column */ @@ -356,11 +356,11 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s start[0] = 0; start[1] = (hsize_t)(mpi_rank ? (hsize_t)mpi_rank * block[1] : 0); if (VERBOSE_MED) - HDprintf("slab_set ZCOL\n"); + printf("slab_set ZCOL\n"); break; default: /* Unknown mode. Set it to cover the whole dataset. */ - HDprintf("unknown slab_set mode (%d)\n", mode); + printf("unknown slab_set mode (%d)\n", mode); block[0] = (hsize_t)dim0; block[1] = (hsize_t)dim1; stride[0] = block[0]; @@ -370,16 +370,16 @@ slab_set(int mpi_rank, int mpi_size, hsize_t start[], hsize_t count[], hsize_t s start[0] = 0; start[1] = 0; if (VERBOSE_MED) - HDprintf("slab_set wholeset\n"); + printf("slab_set wholeset\n"); break; } if (VERBOSE_MED) { - HDprintf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total " - "datapoints=%lu\n", - (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], - (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], - (unsigned long)block[0], (unsigned long)block[1], - (unsigned long)(block[0] * block[1] * count[0] * count[1])); + printf("start[]=(%lu,%lu), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total " + "datapoints=%lu\n", + (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], + (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], + (unsigned long)block[0], (unsigned long)block[1], + (unsigned long)(block[0] * block[1] * count[0] * count[1])); } } @@ -417,15 +417,15 @@ point_set(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[], s } if (VERBOSE_MED) { - HDprintf("start[]=(%lu, %lu), count[]=(%lu, %lu), stride[]=(%lu, %lu), block[]=(%lu, %lu), total " - "datapoints=%lu\n", - (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], - (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], - (unsigned long)block[0], (unsigned long)block[1], - (unsigned long)(block[0] * block[1] * count[0] * count[1])); + printf("start[]=(%lu, %lu), count[]=(%lu, %lu), stride[]=(%lu, %lu), block[]=(%lu, %lu), total " + "datapoints=%lu\n", + (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], + (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], + (unsigned long)block[0], (unsigned long)block[1], + (unsigned long)(block[0] * block[1] * count[0] * count[1])); k = 0; for (i = 0; i < num_points; i++) { - HDprintf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]); + printf("(%d, %d)\n", (int)coords[k], (int)coords[k + 1]); k += 2; } } @@ -460,19 +460,19 @@ dataset_print(hsize_t start[], hsize_t block[], DATATYPE *dataset) hsize_t i, j; /* print the column heading */ - HDprintf("%-8s", "Cols:"); + printf("%-8s", "Cols:"); for (j = 0; j < block[1]; j++) { - HDprintf("%3lu ", (unsigned long)(start[1] + j)); + printf("%3lu ", (unsigned long)(start[1] + j)); } - HDprintf("\n"); + printf("\n"); /* print the slab data */ for (i = 0; i < block[0]; i++) { - HDprintf("Row %2lu: ", (unsigned long)(i + start[0])); + printf("Row %2lu: ", (unsigned long)(i + start[0])); for (j = 0; j < block[1]; j++) { - HDprintf("%03d ", *dataptr++); + printf("%03d ", *dataptr++); } - HDprintf("\n"); + printf("\n"); } } @@ -488,14 +488,14 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[] /* print it if VERBOSE_MED */ if (VERBOSE_MED) { - HDprintf("dataset_vrfy dumping:::\n"); - HDprintf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n", - (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], - (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], - (unsigned long)block[0], (unsigned long)block[1]); - HDprintf("original values:\n"); + printf("dataset_vrfy dumping:::\n"); + printf("start(%lu, %lu), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n", + (unsigned long)start[0], (unsigned long)start[1], (unsigned long)count[0], + (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], + (unsigned long)block[0], (unsigned long)block[1]); + printf("original values:\n"); dataset_print(start, block, original); - HDprintf("compared values:\n"); + printf("compared values:\n"); dataset_print(start, block, dataset); } @@ -504,9 +504,9 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[] for (j = 0; j < block[1]; j++) { if (*dataset != *original) { if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED) { - HDprintf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n", - (unsigned long)i, (unsigned long)j, (unsigned long)(i + start[0]), - (unsigned long)(j + start[1]), *(original), *(dataset)); + printf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n", + (unsigned long)i, (unsigned long)j, (unsigned long)(i + start[0]), + (unsigned long)(j + start[1]), *(original), *(dataset)); } dataset++; original++; @@ -514,9 +514,9 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[] } } if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED) - HDprintf("[more errors ...]\n"); + printf("[more errors ...]\n"); if (vrfyerrs) - HDprintf("%d errors found in dataset_vrfy\n", vrfyerrs); + printf("%d errors found in dataset_vrfy\n", vrfyerrs); return (vrfyerrs); } @@ -577,9 +577,9 @@ MpioTest2G(MPI_Comm comm) MPI_Comm_rank(comm, &mpi_rank); if (mpi_rank == 0) { - HDprintf("Using %d process on dataset shape " - "[%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE "]\n", - mpi_size, shape[0], shape[1], shape[2]); + printf("Using %d process on dataset shape " + "[%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE "]\n", + mpi_size, shape[0], shape[1], shape[2]); } /* @@ -606,7 +606,7 @@ MpioTest2G(MPI_Comm comm) tot_size_bytes *= shape[i]; } if (mpi_rank == 0) { - HDprintf("Dataset of %zu bytes\n", tot_size_bytes); + printf("Dataset of %zu bytes\n", tot_size_bytes); } filespace = H5Screate_simple(3, shape, NULL); VRFY((filespace >= 0), "H5Screate_simple succeeded"); @@ -641,8 +641,8 @@ MpioTest2G(MPI_Comm comm) hsize_t); data_size = slice_per_process * shape[1] * shape[2]; data_size_bytes = sizeof(int) * data_size; - data = HDmalloc(data_size_bytes); - VRFY((data != NULL), "data HDmalloc succeeded"); + data = malloc(data_size_bytes); + VRFY((data != NULL), "data malloc succeeded"); for (size_t i = 0; i < data_size; i++) { data[i] = mpi_rank; @@ -681,7 +681,7 @@ MpioTest2G(MPI_Comm comm) H5Fclose(file_id); free(data); - HDprintf("Proc %d - MpioTest2G test succeeded\n", mpi_rank); + printf("Proc %d - MpioTest2G test succeeded\n", mpi_rank); if (mpi_rank == 0) HDremove(FILENAME[1]); @@ -729,7 +729,7 @@ dataset_writeInd(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Independent write test on file %s\n", filename); + printf("Independent write test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(test_comm, &mpi_size); @@ -738,8 +738,8 @@ dataset_writeInd(void) /* allocate memory for data buffer */ data_size = sizeof(DATATYPE); data_size *= (hsize_t)dim0 * (hsize_t)dim1; - data_array1 = (DATATYPE *)HDmalloc(data_size); - VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); + data_array1 = (DATATYPE *)malloc(data_size); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* ---------------------------------------- * CREATE AN HDF5 FILE WITH PARALLEL ACCESS @@ -806,7 +806,7 @@ dataset_writeInd(void) /* setup dimensions again to write with zero rows for process 0 */ if (VERBOSE_MED) - HDprintf("writeInd by some with zero row\n"); + printf("writeInd by some with zero row\n"); slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW); ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); @@ -841,7 +841,7 @@ dataset_writeInd(void) /* release data buffers */ if (data_array1) - HDfree(data_array1); + free(data_array1); } /* Example of using the parallel HDF5 library to read a dataset */ @@ -869,17 +869,17 @@ dataset_readInd(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Independent read test on file %s\n", filename); + printf("Independent read test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(test_comm, &mpi_size); MPI_Comm_rank(test_comm, &mpi_rank); /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); - data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded"); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); + data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded"); /* setup file access template */ acc_tpl = create_faccess_plist(comm, info, facc_type); @@ -949,9 +949,9 @@ dataset_readInd(void) /* release data buffers */ if (data_array1) - HDfree(data_array1); + free(data_array1); if (data_origin1) - HDfree(data_origin1); + free(data_origin1); } /* @@ -1002,7 +1002,7 @@ dataset_writeAll(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Collective write test on file %s\n", filename); + printf("Collective write test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(test_comm, &mpi_size); @@ -1010,12 +1010,12 @@ dataset_writeAll(void) /* set up the coords array selection */ num_points = (size_t)dim1; - coords = (hsize_t *)HDmalloc((size_t)dim1 * (size_t)MAX_RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc((size_t)dim1 * (size_t)MAX_RANK * sizeof(hsize_t)); VRFY((coords != NULL), "coords malloc succeeded"); /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* ------------------- * START AN HDF5 FILE @@ -1121,7 +1121,7 @@ dataset_writeAll(void) /* setup dimensions again to writeAll with zero rows for process 0 */ if (VERBOSE_MED) - HDprintf("writeAll by some with zero row\n"); + printf("writeAll by some with zero row\n"); slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW); ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); @@ -1186,7 +1186,7 @@ dataset_writeAll(void) /* setup dimensions again to writeAll with zero columns for process 0 */ if (VERBOSE_MED) - HDprintf("writeAll by some with zero col\n"); + printf("writeAll by some with zero col\n"); slab_set(mpi_rank, mpi_size, start, count, stride, block, ZCOL); ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); @@ -1326,7 +1326,7 @@ dataset_writeAll(void) if (data_array1) free(data_array1); - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); block[0] = 1; @@ -1475,9 +1475,9 @@ dataset_writeAll(void) /* release data buffers */ if (coords) - HDfree(coords); + free(coords); if (data_array1) - HDfree(data_array1); + free(data_array1); } /* @@ -1518,7 +1518,7 @@ dataset_readAll(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Collective read test on file %s\n", filename); + printf("Collective read test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(test_comm, &mpi_size); @@ -1526,14 +1526,14 @@ dataset_readAll(void) /* set up the coords array selection */ num_points = (size_t)dim1; - coords = (hsize_t *)HDmalloc((size_t)dim0 * (size_t)dim1 * MAX_RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc((size_t)dim0 * (size_t)dim1 * MAX_RANK * sizeof(hsize_t)); VRFY((coords != NULL), "coords malloc succeeded"); /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); - data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded"); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); + data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded"); /* ------------------- * OPEN AN HDF5 FILE @@ -1615,7 +1615,7 @@ dataset_readAll(void) /* setup dimensions again to readAll with zero columns for process 0 */ if (VERBOSE_MED) - HDprintf("readAll by some with zero col\n"); + printf("readAll by some with zero col\n"); slab_set(mpi_rank, mpi_size, start, count, stride, block, ZCOL); ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); @@ -1682,7 +1682,7 @@ dataset_readAll(void) /* setup dimensions again to readAll with zero rows for process 0 */ if (VERBOSE_MED) - HDprintf("readAll by some with zero row\n"); + printf("readAll by some with zero row\n"); slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW); ret = H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); VRFY((ret >= 0), "H5Sset_hyperslab succeeded"); @@ -1709,9 +1709,9 @@ dataset_readAll(void) free(data_array1); if (data_origin1) free(data_origin1); - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); - data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded"); block[0] = 1; @@ -1770,7 +1770,7 @@ dataset_readAll(void) if (data_array1) free(data_array1); - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* Dataset6: point selection in File - Point selection in Memory*/ @@ -1816,7 +1816,7 @@ dataset_readAll(void) if (data_array1) free(data_array1); - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* Dataset7: point selection in memory - All selection in file*/ @@ -1884,11 +1884,11 @@ dataset_readAll(void) /* release data buffers */ if (coords) - HDfree(coords); + free(coords); if (data_array1) - HDfree(data_array1); + free(data_array1); if (data_origin1) - HDfree(data_origin1); + free(data_origin1); } /* @@ -1932,7 +1932,7 @@ extend_writeInd(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Extend independent write test on file %s\n", filename); + printf("Extend independent write test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(test_comm, &mpi_size); @@ -1943,8 +1943,8 @@ extend_writeInd(void) chunk_dims[1] = (hsize_t)chunkdim1; /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* ------------------- * START AN HDF5 FILE @@ -1984,7 +1984,7 @@ extend_writeInd(void) /* set up dataset storage chunk sizes and creation property list */ if (VERBOSE_MED) - HDprintf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]); + printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]); dataset_pl = H5Pcreate(H5P_DATASET_CREATE); VRFY((dataset_pl >= 0), "H5Pcreate succeeded"); ret = H5Pset_chunk(dataset_pl, MAX_RANK, chunk_dims); @@ -2116,7 +2116,7 @@ extend_writeInd(void) /* release data buffers */ if (data_array1) - HDfree(data_array1); + free(data_array1); } /* @@ -2148,7 +2148,7 @@ extend_writeInd2(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Extend independent write test #2 on file %s\n", filename); + printf("Extend independent write test #2 on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(test_comm, &mpi_size); @@ -2205,8 +2205,8 @@ extend_writeInd2(void) if (VERBOSE_MED) { MESG("writing at offset zero: "); for (i = 0; i < (int)orig_size; i++) - HDprintf("%s%d", i ? ", " : "", written[i]); - HDprintf("\n"); + printf("%s%d", i ? ", " : "", written[i]); + printf("\n"); } ret = H5Dwrite(dataset, H5T_NATIVE_INT, ms, fs, H5P_DEFAULT, written); VRFY((ret >= 0), "H5Dwrite succeeded"); @@ -2218,15 +2218,15 @@ extend_writeInd2(void) VRFY((ret >= 0), "H5Dread succeeded"); for (i = 0; i < (int)orig_size; i++) if (written[i] != retrieved[i]) { - HDprintf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i, - written[i], i, retrieved[i]); + printf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i, + written[i], i, retrieved[i]); nerrors++; } if (VERBOSE_MED) { MESG("read at offset zero: "); for (i = 0; i < (int)orig_size; i++) - HDprintf("%s%d", i ? ", " : "", retrieved[i]); - HDprintf("\n"); + printf("%s%d", i ? ", " : "", retrieved[i]); + printf("\n"); } /* ------------------------- @@ -2248,8 +2248,8 @@ extend_writeInd2(void) if (VERBOSE_MED) { MESG("writing at offset 10: "); for (i = 0; i < (int)orig_size; i++) - HDprintf("%s%d", i ? ", " : "", written[i]); - HDprintf("\n"); + printf("%s%d", i ? ", " : "", written[i]); + printf("\n"); } ret = H5Sselect_hyperslab(fs, H5S_SELECT_SET, &orig_size, NULL, &one, &orig_size); VRFY((ret >= 0), "H5Sselect_hyperslab succeeded"); @@ -2263,15 +2263,15 @@ extend_writeInd2(void) VRFY((ret >= 0), "H5Dread succeeded"); for (i = 0; i < (int)orig_size; i++) if (written[i] != retrieved[i]) { - HDprintf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i, - written[i], i, retrieved[i]); + printf("Line #%d: written!=retrieved: written[%d]=%d, retrieved[%d]=%d\n", __LINE__, i, + written[i], i, retrieved[i]); nerrors++; } if (VERBOSE_MED) { MESG("read at offset 10: "); for (i = 0; i < (int)orig_size; i++) - HDprintf("%s%d", i ? ", " : "", retrieved[i]); - HDprintf("\n"); + printf("%s%d", i ? ", " : "", retrieved[i]); + printf("\n"); } /* Close dataset collectively */ @@ -2310,19 +2310,19 @@ extend_readInd(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Extend independent read test on file %s\n", filename); + printf("Extend independent read test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(test_comm, &mpi_size); MPI_Comm_rank(test_comm, &mpi_rank); /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); - data_array2 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array2 != NULL), "data_array2 HDmalloc succeeded"); - data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded"); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); + data_array2 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array2 != NULL), "data_array2 malloc succeeded"); + data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded"); /* ------------------- * OPEN AN HDF5 FILE @@ -2443,11 +2443,11 @@ extend_readInd(void) /* release data buffers */ if (data_array1) - HDfree(data_array1); + free(data_array1); if (data_array2) - HDfree(data_array2); + free(data_array2); if (data_origin1) - HDfree(data_origin1); + free(data_origin1); } /* @@ -2492,7 +2492,7 @@ extend_writeAll(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Extend independent write test on file %s\n", filename); + printf("Extend independent write test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(test_comm, &mpi_size); @@ -2503,8 +2503,8 @@ extend_writeAll(void) chunk_dims[1] = (hsize_t)chunkdim1; /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* ------------------- * START AN HDF5 FILE @@ -2544,7 +2544,7 @@ extend_writeAll(void) /* set up dataset storage chunk sizes and creation property list */ if (VERBOSE_MED) - HDprintf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]); + printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]); dataset_pl = H5Pcreate(H5P_DATASET_CREATE); VRFY((dataset_pl >= 0), "H5Pcreate succeeded"); ret = H5Pset_chunk(dataset_pl, MAX_RANK, chunk_dims); @@ -2699,7 +2699,7 @@ extend_writeAll(void) /* release data buffers */ if (data_array1) - HDfree(data_array1); + free(data_array1); } /* Example of using the parallel HDF5 library to read an extendible dataset */ @@ -2730,19 +2730,19 @@ extend_readAll(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Extend independent read test on file %s\n", filename); + printf("Extend independent read test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(test_comm, &mpi_size); MPI_Comm_rank(test_comm, &mpi_rank); /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); - data_array2 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array2 != NULL), "data_array2 HDmalloc succeeded"); - data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded"); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); + data_array2 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array2 != NULL), "data_array2 malloc succeeded"); + data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded"); /* ------------------- * OPEN AN HDF5 FILE @@ -2885,11 +2885,11 @@ extend_readAll(void) /* release data buffers */ if (data_array1) - HDfree(data_array1); + free(data_array1); if (data_array2) - HDfree(data_array2); + free(data_array2); if (data_origin1) - HDfree(data_origin1); + free(data_origin1); } /* @@ -2921,17 +2921,17 @@ compress_readAll(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Collective chunked dataset read test on file %s\n", filename); + printf("Collective chunked dataset read test on file %s\n", filename); /* Retrieve MPI parameters */ MPI_Comm_size(comm, &mpi_size); MPI_Comm_rank(comm, &mpi_rank); /* Allocate data buffer */ - data_orig = (DATATYPE *)HDmalloc((size_t)dim * sizeof(DATATYPE)); - VRFY((data_orig != NULL), "data_origin1 HDmalloc succeeded"); - data_read = (DATATYPE *)HDmalloc((size_t)dim * sizeof(DATATYPE)); - VRFY((data_read != NULL), "data_array1 HDmalloc succeeded"); + data_orig = (DATATYPE *)malloc((size_t)dim * sizeof(DATATYPE)); + VRFY((data_orig != NULL), "data_origin1 malloc succeeded"); + data_read = (DATATYPE *)malloc((size_t)dim * sizeof(DATATYPE)); + VRFY((data_read != NULL), "data_array1 malloc succeeded"); /* Initialize data buffers */ for (u = 0; u < dim; u++) @@ -3041,8 +3041,8 @@ compress_readAll(void) /* Verify data read */ for (u = 0; u < dim; u++) if (data_orig[u] != data_read[u]) { - HDprintf("Line #%d: written!=retrieved: data_orig[%u]=%d, data_read[%u]=%d\n", __LINE__, - (unsigned)u, data_orig[u], (unsigned)u, data_read[u]); + printf("Line #%d: written!=retrieved: data_orig[%u]=%d, data_read[%u]=%d\n", __LINE__, + (unsigned)u, data_orig[u], (unsigned)u, data_read[u]); nerrors++; } @@ -3064,9 +3064,9 @@ compress_readAll(void) /* release data buffers */ if (data_read) - HDfree(data_read); + free(data_read); if (data_orig) - HDfree(data_orig); + free(data_orig); } #endif /* H5_HAVE_FILTER_DEFLATE */ @@ -3113,7 +3113,7 @@ none_selection_chunk(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Extend independent write test on file %s\n", filename); + printf("Extend independent write test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(test_comm, &mpi_size); @@ -3144,7 +3144,7 @@ none_selection_chunk(void) /* set up dataset storage chunk sizes and creation property list */ if (VERBOSE_MED) - HDprintf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]); + printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]); dataset_pl = H5Pcreate(H5P_DATASET_CREATE); VRFY((dataset_pl >= 0), "H5Pcreate succeeded"); ret = H5Pset_chunk(dataset_pl, MAX_RANK, chunk_dims); @@ -3177,11 +3177,11 @@ none_selection_chunk(void) /* allocate memory for data buffer. Only allocate enough buffer for * each processor's data. */ if (mpi_rank) { - data_origin = (DATATYPE *)HDmalloc(block[0] * block[1] * sizeof(DATATYPE)); - VRFY((data_origin != NULL), "data_origin HDmalloc succeeded"); + data_origin = (DATATYPE *)malloc(block[0] * block[1] * sizeof(DATATYPE)); + VRFY((data_origin != NULL), "data_origin malloc succeeded"); - data_array = (DATATYPE *)HDmalloc(block[0] * block[1] * sizeof(DATATYPE)); - VRFY((data_array != NULL), "data_array HDmalloc succeeded"); + data_array = (DATATYPE *)malloc(block[0] * block[1] * sizeof(DATATYPE)); + VRFY((data_array != NULL), "data_array malloc succeeded"); /* put some trivial data in the data_array */ mstart[0] = mstart[1] = 0; @@ -3276,9 +3276,9 @@ none_selection_chunk(void) /* release data buffers */ if (data_origin) - HDfree(data_origin); + free(data_origin); if (data_array) - HDfree(data_array); + free(data_array); } /* Function: test_actual_io_mode @@ -3408,13 +3408,13 @@ test_actual_io_mode(int selection_mode) MPI_Barrier(test_comm); - HDassert(mpi_size >= 1); + assert(mpi_size >= 1); mpi_comm = test_comm; mpi_info = MPI_INFO_NULL; filename = (const char *)GetTestParameters(); - HDassert(filename != NULL); + assert(filename != NULL); /* Setup the file access template */ fapl_id = create_faccess_plist(mpi_comm, mpi_info, facc_type); @@ -3625,8 +3625,8 @@ test_actual_io_mode(int selection_mode) length = dim0 * dim1; /* Allocate and initialize the buffer */ - buffer = (int *)HDmalloc(sizeof(int) * (size_t)length); - VRFY((buffer != NULL), "HDmalloc of buffer succeeded"); + buffer = (int *)malloc(sizeof(int) * (size_t)length); + VRFY((buffer != NULL), "malloc of buffer succeeded"); for (i = 0; i < length; i++) buffer[i] = i; @@ -3710,8 +3710,8 @@ test_actual_io_mode(int selection_mode) VRFY((actual_io_mode_write == actual_io_mode_expected), message); } else { - HDfprintf(stderr, "%s %d -> (%d,%d)\n", test_name, mpi_rank, actual_chunk_opt_mode_write, - actual_io_mode_write); + fprintf(stderr, "%s %d -> (%d,%d)\n", test_name, mpi_rank, actual_chunk_opt_mode_write, + actual_io_mode_write); } /* To test that the property is successfully reset to the default, we perform some @@ -3767,7 +3767,7 @@ test_actual_io_mode(int selection_mode) ret = H5Sclose(mem_space); ret = H5Sclose(file_space); ret = H5Fclose(fid); - HDfree(buffer); + free(buffer); return; } @@ -3798,7 +3798,7 @@ actual_io_mode_tests(void) if (mpi_size > 2) test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_MIX); else - HDfprintf(stdout, "Multi Chunk Mixed test requires 3 processes minimum\n"); + fprintf(stdout, "Multi Chunk Mixed test requires 3 processes minimum\n"); test_actual_io_mode(TEST_ACTUAL_IO_MULTI_CHUNK_MIX_DISAGREE); @@ -3906,7 +3906,7 @@ test_no_collective_cause_mode(int selection_mode) MPI_Barrier(test_comm); - HDassert(mpi_size >= 1); + assert(mpi_size >= 1); mpi_comm = test_comm; mpi_info = MPI_INFO_NULL; @@ -3948,7 +3948,7 @@ test_no_collective_cause_mode(int selection_mode) } filename = (const char *)GetTestParameters(); - HDassert(filename != NULL); + assert(filename != NULL); /* Setup the file access template */ fapl_id = create_faccess_plist(mpi_comm, mpi_info, l_facc_type); @@ -4063,8 +4063,8 @@ test_no_collective_cause_mode(int selection_mode) H5_CHECKED_ASSIGN(length, int, dims[0] * dims[1], hsize_t); /* Allocate and initialize the buffer */ - buffer = (int *)HDmalloc(sizeof(int) * (size_t)length); - VRFY((buffer != NULL), "HDmalloc of buffer succeeded"); + buffer = (int *)malloc(sizeof(int) * (size_t)length); + VRFY((buffer != NULL), "malloc of buffer succeeded"); for (i = 0; i < length; i++) buffer[i] = i; @@ -4150,11 +4150,11 @@ test_no_collective_cause_mode(int selection_mode) "reading and writing are the same for global cause of Broken Collective I/O"); /* Test values */ - HDmemset(message, 0, sizeof(message)); + memset(message, 0, sizeof(message)); HDsnprintf(message, sizeof(message), "Local cause of Broken Collective I/O has the correct value for %s.\n", test_name); VRFY((no_collective_cause_local_write == no_collective_cause_local_expected), message); - HDmemset(message, 0, sizeof(message)); + memset(message, 0, sizeof(message)); HDsnprintf(message, sizeof(message), "Global cause of Broken Collective I/O has the correct value for %s.\n", test_name); VRFY((no_collective_cause_global_write == no_collective_cause_global_expected), message); @@ -4178,7 +4178,7 @@ test_no_collective_cause_mode(int selection_mode) H5Sclose(file_space); if (fid) H5Fclose(fid); - HDfree(buffer); + free(buffer); /* clean up external file */ if (selection_mode & TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL) @@ -4260,11 +4260,11 @@ dataset_atomicity(void) dim1 = 32; filename = GetTestParameters(); if (facc_type != FACC_MPIO) { - HDprintf("Atomicity tests will not work without the MPIO VFD\n"); + printf("Atomicity tests will not work without the MPIO VFD\n"); return; } if (VERBOSE_MED) - HDprintf("atomic writes to file %s\n", filename); + printf("atomic writes to file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(test_comm, &mpi_size); @@ -4272,11 +4272,11 @@ dataset_atomicity(void) buf_size = dim0 * dim1; /* allocate memory for data buffer */ - write_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int)); - VRFY((write_buf != NULL), "write_buf HDcalloc succeeded"); + write_buf = (int *)calloc((size_t)buf_size, sizeof(int)); + VRFY((write_buf != NULL), "write_buf calloc succeeded"); /* allocate memory for data buffer */ - read_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int)); - VRFY((read_buf != NULL), "read_buf HDcalloc succeeded"); + read_buf = (int *)calloc((size_t)buf_size, sizeof(int)); + VRFY((read_buf != NULL), "read_buf calloc succeeded"); /* setup file access template */ acc_tpl = create_faccess_plist(comm, info, facc_type); @@ -4394,9 +4394,9 @@ dataset_atomicity(void) j = 0; k = 0; for (i = 0; i < dim0; i++) { - HDprintf("\n"); + printf("\n"); for (j = 0; j < dim1; j++) - HDprintf("%d ", read_buf[k++]); + printf("%d ", read_buf[k++]); } } @@ -4410,8 +4410,8 @@ dataset_atomicity(void) "Atomicity Test Failed Process %d: Value read should be 0 or 5\n"); for (i = 1; i < buf_size; i++) { if (read_buf[i] != compare) { - HDprintf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank, i, - read_buf[i], compare); + printf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank, i, + read_buf[i], compare); nerrors++; } } @@ -4422,20 +4422,20 @@ dataset_atomicity(void) /* release data buffers */ if (write_buf) - HDfree(write_buf); + free(write_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); /* open dataset2 (non-contiguous case) */ dataset2 = H5Dopen2(fid, DATASETNAME6, H5P_DEFAULT); VRFY((dataset2 >= 0), "H5Dopen2 succeeded"); /* allocate memory for data buffer */ - write_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int)); - VRFY((write_buf != NULL), "write_buf HDcalloc succeeded"); + write_buf = (int *)calloc((size_t)buf_size, sizeof(int)); + VRFY((write_buf != NULL), "write_buf calloc succeeded"); /* allocate memory for data buffer */ - read_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int)); - VRFY((read_buf != NULL), "read_buf HDcalloc succeeded"); + read_buf = (int *)calloc((size_t)buf_size, sizeof(int)); + VRFY((read_buf != NULL), "read_buf calloc succeeded"); for (i = 0; i < buf_size; i++) { write_buf[i] = 5; @@ -4494,11 +4494,11 @@ dataset_atomicity(void) j = 0; k = 0; for (i = 0; i < dim0; i++) { - HDprintf("\n"); + printf("\n"); for (j = 0; j < dim1; j++) - HDprintf("%d ", read_buf[k++]); + printf("%d ", read_buf[k++]); } - HDprintf("\n"); + printf("\n"); } } @@ -4531,8 +4531,8 @@ dataset_atomicity(void) continue; } else if (compare != read_buf[k]) { - HDprintf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank, - k, read_buf[k], compare); + printf("Atomicity Test Failed Process %d: read_buf[%d] is %d, should be %d\n", mpi_rank, + k, read_buf[k], compare); nerrors++; } k++; @@ -4549,9 +4549,9 @@ dataset_atomicity(void) /* release data buffers */ if (write_buf) - HDfree(write_buf); + free(write_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); ret = H5Fclose(fid); VRFY((ret >= 0), "H5Fclose succeeded"); @@ -4577,7 +4577,7 @@ test_dense_attr(void) /* get filename */ filename = (const char *)GetTestParameters(); - HDassert(filename != NULL); + assert(filename != NULL); /* set up MPI parameters */ MPI_Comm_size(test_comm, &mpi_size); @@ -4638,29 +4638,29 @@ main(int argc, char **argv) MPI_Comm_size(test_comm, &mpi_size); MPI_Comm_rank(test_comm, &mpi_rank); - HDmemset(filenames, 0, sizeof(filenames)); + memset(filenames, 0, sizeof(filenames)); dim0 = BIG_X_FACTOR; dim1 = BIG_Y_FACTOR; dim2 = BIG_Z_FACTOR; if (MAINPROCESS) { - HDprintf("===================================\n"); - HDprintf("2 GByte IO TESTS START\n"); - HDprintf("2 MPI ranks will run the tests...\n"); - HDprintf("===================================\n"); + printf("===================================\n"); + printf("2 GByte IO TESTS START\n"); + printf("2 MPI ranks will run the tests...\n"); + printf("===================================\n"); h5_show_hostname(); } if (H5dont_atexit() < 0) { - HDprintf("Failed to turn off atexit processing. Continue.\n"); + printf("Failed to turn off atexit processing. Continue.\n"); }; H5open(); - HDmemset(filenames, 0, sizeof(filenames)); + memset(filenames, 0, sizeof(filenames)); for (int i = 0; i < NFILENAME; i++) { - if (NULL == (filenames[i] = HDmalloc(PATH_MAX))) { - HDprintf("couldn't allocate filename array\n"); + if (NULL == (filenames[i] = malloc(PATH_MAX))) { + printf("couldn't allocate filename array\n"); MPI_Abort(MPI_COMM_WORLD, -1); } } @@ -4675,7 +4675,7 @@ main(int argc, char **argv) if (mpi_rank >= 2) rank_color = 1; if (MPI_Comm_split(test_comm, rank_color, mpi_rank, &test_comm) != MPI_SUCCESS) { - HDprintf("MPI returned an error. Exiting\n"); + printf("MPI returned an error. Exiting\n"); } } @@ -4730,7 +4730,7 @@ main(int argc, char **argv) HDremove(FILENAME[0]); for (int i = 0; i < NFILENAME; i++) { - HDfree(filenames[i]); + free(filenames[i]); filenames[i] = NULL; } diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c index 0f8d01f..909b793 100644 --- a/testpar/t_bigio.c +++ b/testpar/t_bigio.c @@ -130,16 +130,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; } } @@ -155,19 +155,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"); } } @@ -183,15 +183,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); } @@ -200,10 +200,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++; @@ -211,9 +211,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); } @@ -311,12 +311,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])); } } @@ -369,20 +369,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"); } } @@ -399,14 +399,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); } @@ -429,8 +429,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)); } } } @@ -438,9 +438,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); } @@ -474,7 +474,7 @@ dataset_big_write(void) B_DATATYPE *wdata; /* allocate memory for data buffer */ - wdata = (B_DATATYPE *)HDmalloc(bigcount * sizeof(B_DATATYPE)); + wdata = (B_DATATYPE *)malloc(bigcount * sizeof(B_DATATYPE)); VRFY_G((wdata != NULL), "wdata malloc succeeded"); /* setup file access template */ @@ -492,7 +492,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; @@ -553,7 +553,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; @@ -614,7 +614,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; @@ -675,7 +675,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); @@ -697,7 +697,7 @@ dataset_big_write(void) num_points = bigcount; - coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t)); VRFY_G((coords != NULL), "coords malloc succeeded"); set_coords(start, count, stride, block, num_points, coords, IN_ORDER); @@ -746,7 +746,7 @@ dataset_big_write(void) ret = H5Dclose(dataset); VRFY_G((ret >= 0), "H5Dclose1 succeeded"); - HDfree(wdata); + free(wdata); H5Fclose(fid); } @@ -779,12 +779,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); @@ -800,7 +800,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"); @@ -851,7 +851,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); } @@ -863,8 +863,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"); @@ -914,7 +914,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); } @@ -926,8 +926,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"); @@ -979,7 +979,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); } } @@ -992,7 +992,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"); @@ -1017,7 +1017,7 @@ dataset_big_read(void) num_points = bigcount; - coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t)); VRFY_G((coords != NULL), "coords malloc succeeded"); set_coords(start, count, stride, block, num_points, coords, IN_ORDER); @@ -1028,7 +1028,7 @@ dataset_big_read(void) VRFY_G((ret >= 0), "H5Sselect_elements succeeded"); if (coords) - HDfree(coords); + free(coords); /* create a memory dataspace */ /* Warning: H5Screate_simple requires an array of hsize_t elements @@ -1054,7 +1054,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); } @@ -1065,8 +1065,8 @@ dataset_big_read(void) ret = H5Dclose(dataset); VRFY_G((ret >= 0), "H5Dclose1 succeeded"); - HDfree(wdata); - HDfree(rdata); + free(wdata); + free(rdata); wdata = NULL; rdata = NULL; @@ -1093,9 +1093,9 @@ dataset_big_read(void) /* release data buffers */ if (rdata) - HDfree(rdata); + free(rdata); if (wdata) - HDfree(wdata); + free(wdata); } /* dataset_large_readAll */ @@ -1103,7 +1103,7 @@ static void single_rank_independent_io(void) { if (mpi_rank_g == 0) - HDprintf("\nSingle Rank Independent I/O\n"); + printf("\nSingle Rank Independent I/O\n"); if (MAIN_PROCESS) { hsize_t dims[1]; @@ -1150,7 +1150,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); @@ -1159,7 +1159,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); } @@ -1266,7 +1266,7 @@ coll_chunk1(void) { const char *filename = FILENAME[0]; if (mpi_rank_g == 0) - HDprintf("\nCollective chunk I/O Test #1\n"); + printf("\nCollective chunk I/O Test #1\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); @@ -1317,7 +1317,7 @@ coll_chunk2(void) { const char *filename = FILENAME[0]; if (mpi_rank_g == 0) - HDprintf("\nCollective chunk I/O Test #2\n"); + printf("\nCollective chunk I/O Test #2\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); @@ -1369,7 +1369,7 @@ coll_chunk3(void) { const char *filename = FILENAME[0]; if (mpi_rank_g == 0) - HDprintf("\nCollective chunk I/O Test #3\n"); + printf("\nCollective chunk I/O Test #3\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); @@ -1443,7 +1443,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap dims[1] = space_dim2; /* allocate memory for data buffer */ - data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int)); + data_array1 = (int *)malloc(dims[0] * dims[1] * sizeof(int)); VRFY_G((data_array1 != NULL), "data_array1 malloc succeeded"); /* set up dimensions of the slab this process accesses */ @@ -1451,7 +1451,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap /* set up the coords array selection */ num_points = block[0] * block[1] * count[0] * count[1]; - coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t)); VRFY_G((coords != NULL), "coords malloc succeeded"); point_set(start, count, stride, block, num_points, coords, mode); @@ -1716,16 +1716,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); @@ -1854,11 +1854,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 @@ -1886,7 +1886,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(); diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 4d3aff5..b374a48 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -480,13 +480,13 @@ static hbool_t trace_file_check(int metadata_write_strategy); static void print_stats(void) { - HDfprintf(stdout, "%d: datum clears / pinned clears / destroys = %ld / %ld / %ld\n", world_mpi_rank, - datum_clears, datum_pinned_clears, datum_destroys); - HDfprintf(stdout, "%d: datum flushes / pinned flushes / loads = %ld / %ld / %ld\n", world_mpi_rank, - datum_flushes, datum_pinned_flushes, datum_loads); - HDfprintf(stdout, "%d: pins: global / global dirty / local = %ld / %ld / %ld\n", world_mpi_rank, - global_pins, global_dirty_pins, local_pins); - HDfflush(stdout); + fprintf(stdout, "%d: datum clears / pinned clears / destroys = %ld / %ld / %ld\n", world_mpi_rank, + datum_clears, datum_pinned_clears, datum_destroys); + fprintf(stdout, "%d: datum flushes / pinned flushes / loads = %ld / %ld / %ld\n", world_mpi_rank, + datum_flushes, datum_pinned_flushes, datum_loads); + fprintf(stdout, "%d: pins: global / global dirty / local = %ld / %ld / %ld\n", world_mpi_rank, + global_pins, global_dirty_pins, local_pins); + fflush(stdout); return; @@ -560,8 +560,8 @@ set_up_file_communicator(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Comm_group() failed with error %d.\n", world_mpi_rank, __func__, - mpi_result); + fprintf(stdout, "%d:%s: MPI_Comm_group() failed with error %d.\n", world_mpi_rank, __func__, + mpi_result); } } } @@ -577,8 +577,8 @@ set_up_file_communicator(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Group_excl() failed with error %d.\n", world_mpi_rank, __func__, - mpi_result); + fprintf(stdout, "%d:%s: MPI_Group_excl() failed with error %d.\n", world_mpi_rank, __func__, + mpi_result); } } } @@ -592,8 +592,8 @@ set_up_file_communicator(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Comm_create() failed with error %d.\n", world_mpi_rank, - __func__, mpi_result); + fprintf(stdout, "%d:%s: MPI_Comm_create() failed with error %d.\n", world_mpi_rank, __func__, + mpi_result); } } else { @@ -605,8 +605,7 @@ set_up_file_communicator(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: file_mpi_comm == MPI_COMM_NULL.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: file_mpi_comm == MPI_COMM_NULL.\n", world_mpi_rank, __func__); } } } @@ -619,8 +618,7 @@ set_up_file_communicator(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: file_mpi_comm != MPI_COMM_NULL.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: file_mpi_comm != MPI_COMM_NULL.\n", world_mpi_rank, __func__); } } } @@ -636,8 +634,8 @@ set_up_file_communicator(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Comm_size() failed with error %d.\n", world_mpi_rank, __func__, - mpi_result); + fprintf(stdout, "%d:%s: MPI_Comm_size() failed with error %d.\n", world_mpi_rank, __func__, + mpi_result); } } } @@ -651,8 +649,8 @@ set_up_file_communicator(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Comm_rank() failed with error %d.\n", world_mpi_rank, __func__, - mpi_result); + fprintf(stdout, "%d:%s: MPI_Comm_rank() failed with error %d.\n", world_mpi_rank, __func__, + mpi_result); } } } @@ -747,8 +745,8 @@ init_data(void) haddr_t addr = BASE_ADDR; /* this must hold so moves don't change entry size. */ - HDassert((NUM_DATA_ENTRIES / 2) % 20 == 0); - HDassert((virt_num_data_entries / 2) % 20 == 0); + assert((NUM_DATA_ENTRIES / 2) % 20 == 0); + assert((virt_num_data_entries / 2) % 20 == 0); for (i = 0; i < NUM_DATA_ENTRIES; i++) { data[i].base_addr = addr; @@ -770,7 +768,7 @@ init_data(void) data_index[i] = i; addr += addr_offsets[j]; - HDassert(addr > data[i].base_addr); + assert(addr > data[i].base_addr); j = (j + 1) % num_addr_offsets; } @@ -823,7 +821,7 @@ do_express_test(void) nerrors++; max_express_test = -1; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n", world_mpi_rank, __func__); } } @@ -871,7 +869,7 @@ do_sync(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -882,7 +880,7 @@ do_sync(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } else if ((mssg.req != SYNC_ACK_CODE) || (mssg.src != world_server_mpi_rank) || @@ -890,7 +888,7 @@ do_sync(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in sync ack.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad data in sync ack.\n", world_mpi_rank, __func__); } } } @@ -927,7 +925,7 @@ get_max_nerrors(void) nerrors++; max_nerrors = -1; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: MPI_Allreduce() failed.\n", world_mpi_rank, __func__); } } @@ -970,7 +968,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: bad param(s) on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: bad param(s) on entry.\n", world_mpi_rank, __func__); } } else { @@ -987,7 +985,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Recv() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: MPI_Recv() failed.\n", world_mpi_rank, __func__); } } else if (mssg_ptr->magic != MSSG_MAGIC) { @@ -995,7 +993,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: invalid magic.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: invalid magic.\n", world_mpi_rank, __func__); } } else if (mssg_ptr->src != status.MPI_SOURCE) { @@ -1003,7 +1001,7 @@ recv_mssg(struct mssg_t *mssg_ptr, int mssg_tag_offset) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: mssg_ptr->src != status.MPI_SOURCE.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: mssg_ptr->src != status.MPI_SOURCE.\n", world_mpi_rank, __func__); } } } @@ -1043,7 +1041,7 @@ send_mssg(struct mssg_t *mssg_ptr, hbool_t add_req_to_tag) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Invalid mssg on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Invalid mssg on entry.\n", world_mpi_rank, __func__); } } @@ -1063,7 +1061,7 @@ send_mssg(struct mssg_t *mssg_ptr, hbool_t add_req_to_tag) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Send() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: MPI_Send() failed.\n", world_mpi_rank, __func__); } } } @@ -1098,7 +1096,7 @@ setup_derived_types(void) MPI_Aint displs[9]; struct mssg_t sample; /* used to compute displacements */ - HDmemset(&sample, 0, sizeof(struct mssg_t)); + memset(&sample, 0, sizeof(struct mssg_t)); /* setup the displacements array */ if ((MPI_SUCCESS != MPI_Get_address(&sample.req, &displs[0])) || @@ -1114,7 +1112,7 @@ setup_derived_types(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Get_address() call failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: MPI_Get_address() call failed.\n", world_mpi_rank, __func__); } } else { @@ -1134,7 +1132,7 @@ setup_derived_types(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Type_create_struct() call failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: MPI_Type_create_struct() call failed.\n", world_mpi_rank, __func__); } } } @@ -1148,7 +1146,7 @@ setup_derived_types(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Type_commit() call failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: MPI_Type_commit() call failed.\n", world_mpi_rank, __func__); } } } @@ -1187,7 +1185,7 @@ takedown_derived_types(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: MPI_Type_free() call failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: MPI_Type_free() call failed.\n", world_mpi_rank, __func__); } } @@ -1240,8 +1238,8 @@ reset_server_counters(void) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%d).\n", world_mpi_rank, __func__, - actual_total_reads, total_reads); + fprintf(stdout, "%d:%s: actual/total reads mismatch (%ld/%d).\n", world_mpi_rank, __func__, + actual_total_reads, total_reads); } } @@ -1250,8 +1248,8 @@ reset_server_counters(void) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%d).\n", world_mpi_rank, __func__, - actual_total_writes, total_writes); + fprintf(stdout, "%d:%s: actual/total writes mismatch (%ld/%d).\n", world_mpi_rank, __func__, + actual_total_writes, total_writes); } } @@ -1293,7 +1291,7 @@ server_main(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: This isn't the server process?!?!?\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: This isn't the server process?!?!?\n", world_mpi_rank, __func__); } } @@ -1310,7 +1308,7 @@ server_main(void) case WRITE_REQ_ACK_CODE: success = FALSE; if (verbose) - HDfprintf(stdout, "%s: Received write ack?!?.\n", __func__); + fprintf(stdout, "%s: Received write ack?!?.\n", __func__); break; case READ_REQ_CODE: @@ -1320,7 +1318,7 @@ server_main(void) case READ_REQ_REPLY_CODE: success = FALSE; if (verbose) - HDfprintf(stdout, "%s: Received read req reply?!?.\n", __func__); + fprintf(stdout, "%s: Received read req reply?!?.\n", __func__); break; case SYNC_REQ_CODE: @@ -1330,7 +1328,7 @@ server_main(void) case SYNC_ACK_CODE: success = FALSE; if (verbose) - HDfprintf(stdout, "%s: Received sync ack?!?.\n", __func__); + fprintf(stdout, "%s: Received sync ack?!?.\n", __func__); break; case REQ_TTL_WRITES_CODE: @@ -1340,7 +1338,7 @@ server_main(void) case REQ_TTL_WRITES_RPLY_CODE: success = FALSE; if (verbose) - HDfprintf(stdout, "%s: Received total writes reply?!?.\n", __func__); + fprintf(stdout, "%s: Received total writes reply?!?.\n", __func__); break; case REQ_TTL_READS_CODE: @@ -1350,7 +1348,7 @@ server_main(void) case REQ_TTL_READS_RPLY_CODE: success = FALSE; if (verbose) - HDfprintf(stdout, "%s: Received total reads reply?!?.\n", __func__); + fprintf(stdout, "%s: Received total reads reply?!?.\n", __func__); break; case REQ_ENTRY_WRITES_CODE: @@ -1360,7 +1358,7 @@ server_main(void) case REQ_ENTRY_WRITES_RPLY_CODE: success = FALSE; if (verbose) - HDfprintf(stdout, "%s: Received entry writes reply?!?.\n", __func__); + fprintf(stdout, "%s: Received entry writes reply?!?.\n", __func__); break; case REQ_ENTRY_READS_CODE: @@ -1370,7 +1368,7 @@ server_main(void) case REQ_ENTRY_READS_RPLY_CODE: success = FALSE; if (verbose) - HDfprintf(stdout, "%s: Received entry reads reply?!?.\n", __func__); + fprintf(stdout, "%s: Received entry reads reply?!?.\n", __func__); break; case REQ_RW_COUNT_RESET_CODE: @@ -1380,7 +1378,7 @@ server_main(void) case REQ_RW_COUNT_RESET_RPLY_CODE: success = FALSE; if (verbose) - HDfprintf(stdout, "%s: Received RW count reset reply?!?.\n", __func__); + fprintf(stdout, "%s: Received RW count reset reply?!?.\n", __func__); break; case DONE_REQ_CODE: @@ -1393,7 +1391,7 @@ server_main(void) nerrors++; success = FALSE; if (verbose) - HDfprintf(stdout, "%d:%s: Unknown request code.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Unknown request code.\n", world_mpi_rank, __func__); break; } } @@ -1435,7 +1433,7 @@ serve_read_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); } } @@ -1449,8 +1447,8 @@ serve_read_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__, - target_addr); + fprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__, + target_addr); } } else if (data[target_index].len != mssg_ptr->len) { @@ -1458,8 +1456,8 @@ serve_read_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, __func__, - data[target_index].len, mssg_ptr->len); + fprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, __func__, + data[target_index].len, mssg_ptr->len); } } else if (!(data[target_index].valid)) { @@ -1467,11 +1465,10 @@ serve_read_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, - "%d:%s: proc %d read invalid entry. " - "idx/base_addr = %d/%" PRIuHADDR ".\n", - world_mpi_rank, __func__, mssg_ptr->src, target_index, - data[target_index].base_addr); + fprintf(stdout, + "%d:%s: proc %d read invalid entry. " + "idx/base_addr = %d/%" PRIuHADDR ".\n", + world_mpi_rank, __func__, mssg_ptr->src, target_index, data[target_index].base_addr); } } else { @@ -1502,15 +1499,15 @@ serve_read_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d read 0x%llx. len = %d. ver = %d.\n", (int)(mssg_ptr->src), - (long long)(data[target_index].base_addr), (int)(data[target_index].len), - (int)(data[target_index].ver)); + fprintf(stdout, "%d read 0x%llx. len = %d. ver = %d.\n", (int)(mssg_ptr->src), + (long long)(data[target_index].base_addr), (int)(data[target_index].len), + (int)(data[target_index].ver)); } else { - HDfprintf(stdout, "%d read 0x%llx FAILED. len = %d. ver = %d.\n", (int)(mssg_ptr->src), - (long long)(data[target_index].base_addr), (int)(data[target_index].len), - (int)(data[target_index].ver)); + fprintf(stdout, "%d read 0x%llx FAILED. len = %d. ver = %d.\n", (int)(mssg_ptr->src), + (long long)(data[target_index].base_addr), (int)(data[target_index].len), + (int)(data[target_index].ver)); } } @@ -1551,7 +1548,7 @@ serve_sync_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); } } @@ -1578,11 +1575,11 @@ serve_sync_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d sync.\n", (int)(mssg_ptr->src)); + fprintf(stdout, "%d sync.\n", (int)(mssg_ptr->src)); } else { - HDfprintf(stdout, "%d sync FAILED.\n", (int)(mssg_ptr->src)); + fprintf(stdout, "%d sync FAILED.\n", (int)(mssg_ptr->src)); } } @@ -1625,7 +1622,7 @@ serve_write_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); } } @@ -1639,8 +1636,8 @@ serve_write_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__, - target_addr); + fprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__, + target_addr); } } else if (data[target_index].len != mssg_ptr->len) { @@ -1648,8 +1645,8 @@ serve_write_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, __func__, - data[target_index].len, mssg_ptr->len); + fprintf(stdout, "%d:%s: data[i].len = %zu != mssg->len = %d.\n", world_mpi_rank, __func__, + data[target_index].len, mssg_ptr->len); } } } @@ -1664,8 +1661,8 @@ serve_write_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: new ver = %d <= old ver = %d.\n", world_mpi_rank, __func__, - new_ver_num, data[target_index].ver); + fprintf(stdout, "%d:%s: new ver = %d <= old ver = %d.\n", world_mpi_rank, __func__, + new_ver_num, data[target_index].ver); } } } @@ -1703,15 +1700,15 @@ serve_write_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d write 0x%llx. len = %d. ver = %d.\n", (int)(mssg_ptr->src), - (long long)(data[target_index].base_addr), (int)(data[target_index].len), - (int)(data[target_index].ver)); + fprintf(stdout, "%d write 0x%llx. len = %d. ver = %d.\n", (int)(mssg_ptr->src), + (long long)(data[target_index].base_addr), (int)(data[target_index].len), + (int)(data[target_index].ver)); } else { - HDfprintf(stdout, "%d write 0x%llx FAILED. len = %d. ver = %d.\n", (int)(mssg_ptr->src), - (long long)(data[target_index].base_addr), (int)(data[target_index].len), - (int)(data[target_index].ver)); + fprintf(stdout, "%d write 0x%llx FAILED. len = %d. ver = %d.\n", (int)(mssg_ptr->src), + (long long)(data[target_index].base_addr), (int)(data[target_index].len), + (int)(data[target_index].ver)); } } @@ -1750,7 +1747,7 @@ serve_total_writes_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); } } @@ -1777,11 +1774,11 @@ serve_total_writes_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d request total writes %d.\n", (int)(mssg_ptr->src), total_writes); + fprintf(stdout, "%d request total writes %d.\n", (int)(mssg_ptr->src), total_writes); } else { - HDfprintf(stdout, "%d request total writes %d -- FAILED.\n", (int)(mssg_ptr->src), total_writes); + fprintf(stdout, "%d request total writes %d -- FAILED.\n", (int)(mssg_ptr->src), total_writes); } } @@ -1820,7 +1817,7 @@ serve_total_reads_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); } } @@ -1847,11 +1844,11 @@ serve_total_reads_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d request total reads %d.\n", (int)(mssg_ptr->src), total_reads); + fprintf(stdout, "%d request total reads %d.\n", (int)(mssg_ptr->src), total_reads); } else { - HDfprintf(stdout, "%d request total reads %d -- FAILED.\n", (int)(mssg_ptr->src), total_reads); + fprintf(stdout, "%d request total reads %d -- FAILED.\n", (int)(mssg_ptr->src), total_reads); } } @@ -1892,7 +1889,7 @@ serve_entry_writes_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); } } @@ -1906,8 +1903,8 @@ serve_entry_writes_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__, - target_addr); + fprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__, + target_addr); } } else { @@ -1934,13 +1931,13 @@ serve_entry_writes_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d request entry 0x%llx writes = %ld.\n", (int)(mssg_ptr->src), - (long long)(data[target_index].base_addr), (long)(data[target_index].writes)); + fprintf(stdout, "%d request entry 0x%llx writes = %ld.\n", (int)(mssg_ptr->src), + (long long)(data[target_index].base_addr), (long)(data[target_index].writes)); } else { - HDfprintf(stdout, "%d request entry 0x%llx writes = %ld FAILED.\n", (int)(mssg_ptr->src), - (long long)(data[target_index].base_addr), (long)(data[target_index].writes)); + fprintf(stdout, "%d request entry 0x%llx writes = %ld FAILED.\n", (int)(mssg_ptr->src), + (long long)(data[target_index].base_addr), (long)(data[target_index].writes)); } } @@ -1981,7 +1978,7 @@ serve_entry_reads_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); } } @@ -1995,8 +1992,8 @@ serve_entry_reads_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__, - target_addr); + fprintf(stdout, "%d:%s: addr lookup failed for %" PRIuHADDR ".\n", world_mpi_rank, __func__, + target_addr); } } else { @@ -2023,13 +2020,13 @@ serve_entry_reads_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d request entry 0x%llx reads = %ld.\n", (int)(mssg_ptr->src), - (long long)(data[target_index].base_addr), (long)(data[target_index].reads)); + fprintf(stdout, "%d request entry 0x%llx reads = %ld.\n", (int)(mssg_ptr->src), + (long long)(data[target_index].base_addr), (long)(data[target_index].reads)); } else { - HDfprintf(stdout, "%d request entry 0x%llx reads = %ld FAILED.\n", (int)(mssg_ptr->src), - (long long)(data[target_index].base_addr), (long)(data[target_index].reads)); + fprintf(stdout, "%d request entry 0x%llx reads = %ld FAILED.\n", (int)(mssg_ptr->src), + (long long)(data[target_index].base_addr), (long)(data[target_index].reads)); } } @@ -2067,7 +2064,7 @@ serve_rw_count_reset_request(struct mssg_t *mssg_ptr) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad mssg on entry.\n", world_mpi_rank, __func__); } } @@ -2099,11 +2096,11 @@ serve_rw_count_reset_request(struct mssg_t *mssg_ptr) if (success) { - HDfprintf(stdout, "%d request R/W counter reset.\n", (int)(mssg_ptr->src)); + fprintf(stdout, "%d request R/W counter reset.\n", (int)(mssg_ptr->src)); } else { - HDfprintf(stdout, "%d request R/w counter reset FAILED.\n", (int)(mssg_ptr->src)); + fprintf(stdout, "%d request R/w counter reset FAILED.\n", (int)(mssg_ptr->src)); } } @@ -2134,25 +2131,25 @@ datum_get_initial_load_size(void *udata_ptr, size_t *image_len_ptr) int idx; struct datum *entry_ptr; - HDassert(udata_ptr); - HDassert(image_len_ptr); + assert(udata_ptr); + assert(image_len_ptr); idx = addr_to_datum_index(addr); - HDassert(idx >= 0); - HDassert(idx < NUM_DATA_ENTRIES); - HDassert(idx < virt_num_data_entries); + assert(idx >= 0); + assert(idx < NUM_DATA_ENTRIES); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(addr == entry_ptr->base_addr); - HDassert(!entry_ptr->global_pinned); - HDassert(!entry_ptr->local_pinned); + assert(addr == entry_ptr->base_addr); + assert(!entry_ptr->global_pinned); + assert(!entry_ptr->local_pinned); if (callbacks_verbose) { - HDfprintf(stdout, "%d: get_initial_load_size() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, - idx, (long)addr, (int)entry_ptr->local_len); + fprintf(stdout, "%d: get_initial_load_size() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, idx, + (long)addr, (int)entry_ptr->local_len); fflush(stdout); } @@ -2183,26 +2180,26 @@ datum_deserialize(const void H5_ATTR_NDEBUG_UNUSED *image_ptr, H5_ATTR_UNUSED si int idx; struct datum *entry_ptr = NULL; - HDassert(image_ptr != NULL); + assert(image_ptr != NULL); idx = addr_to_datum_index(addr); - HDassert(idx >= 0); - HDassert(idx < NUM_DATA_ENTRIES); - HDassert(idx < virt_num_data_entries); + assert(idx >= 0); + assert(idx < NUM_DATA_ENTRIES); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(addr == entry_ptr->base_addr); - HDassert(!entry_ptr->global_pinned); - HDassert(!entry_ptr->local_pinned); + assert(addr == entry_ptr->base_addr); + assert(!entry_ptr->global_pinned); + assert(!entry_ptr->local_pinned); - HDassert(dirty_ptr); + assert(dirty_ptr); if (callbacks_verbose) { - HDfprintf(stdout, "%d: deserialize() idx = %d, addr = %ld, len = %d, is_dirty = %d.\n", - world_mpi_rank, idx, (long)addr, (int)len, (int)(entry_ptr->header.is_dirty)); + fprintf(stdout, "%d: deserialize() idx = %d, addr = %ld, len = %d, is_dirty = %d.\n", world_mpi_rank, + idx, (long)addr, (int)len, (int)(entry_ptr->header.is_dirty)); fflush(stdout); } @@ -2238,27 +2235,27 @@ datum_image_len(const void *thing, size_t *image_len) int idx; const struct datum *entry_ptr; - HDassert(thing); - HDassert(image_len); + assert(thing); + assert(image_len); entry_ptr = (const struct datum *)thing; idx = addr_to_datum_index(entry_ptr->base_addr); - HDassert(idx >= 0); - HDassert(idx < NUM_DATA_ENTRIES); - HDassert(idx < virt_num_data_entries); - HDassert(&(data[idx]) == entry_ptr); - HDassert(entry_ptr->local_len > 0); - HDassert(entry_ptr->local_len <= entry_ptr->len); + assert(idx >= 0); + assert(idx < NUM_DATA_ENTRIES); + assert(idx < virt_num_data_entries); + assert(&(data[idx]) == entry_ptr); + assert(entry_ptr->local_len > 0); + assert(entry_ptr->local_len <= entry_ptr->len); if (callbacks_verbose) { - HDfprintf(stdout, "%d: image_len() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, idx, - (long)(entry_ptr->base_addr), (int)(entry_ptr->local_len)); + fprintf(stdout, "%d: image_len() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, idx, + (long)(entry_ptr->base_addr), (int)(entry_ptr->local_len)); fflush(stdout); } - HDassert(entry_ptr->header.addr == entry_ptr->base_addr); + assert(entry_ptr->header.addr == entry_ptr->base_addr); *image_len = entry_ptr->local_len; @@ -2285,49 +2282,49 @@ datum_serialize(const H5F_t *f, void H5_ATTR_NDEBUG_UNUSED *image_ptr, size_t le struct datum *entry_ptr; struct H5AC_aux_t *aux_ptr; - HDassert(thing_ptr); - HDassert(image_ptr); + assert(thing_ptr); + assert(image_ptr); entry_ptr = (struct datum *)thing_ptr; - HDassert(f); - HDassert(f->shared); - HDassert(f->shared->cache); - HDassert(f->shared->cache->magic == H5C__H5C_T_MAGIC); - HDassert(f->shared->cache->aux_ptr); + assert(f); + assert(f->shared); + assert(f->shared->cache); + assert(f->shared->cache->magic == H5C__H5C_T_MAGIC); + assert(f->shared->cache->aux_ptr); aux_ptr = (H5AC_aux_t *)(f->shared->cache->aux_ptr); - HDassert(aux_ptr); - HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + assert(aux_ptr); + assert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); entry_ptr->aux_ptr = aux_ptr; idx = addr_to_datum_index(entry_ptr->base_addr); - HDassert(idx >= 0); - HDassert(idx < NUM_DATA_ENTRIES); - HDassert(idx < virt_num_data_entries); - HDassert(&(data[idx]) == entry_ptr); + assert(idx >= 0); + assert(idx < NUM_DATA_ENTRIES); + assert(idx < virt_num_data_entries); + assert(&(data[idx]) == entry_ptr); if (callbacks_verbose) { - HDfprintf(stdout, "%d: serialize() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, idx, - (long)entry_ptr->header.addr, (int)len); + fprintf(stdout, "%d: serialize() idx = %d, addr = %ld, len = %d.\n", world_mpi_rank, idx, + (long)entry_ptr->header.addr, (int)len); fflush(stdout); } - HDassert(entry_ptr->header.addr == entry_ptr->base_addr); - HDassert((entry_ptr->header.size == entry_ptr->len) || (entry_ptr->header.size == entry_ptr->local_len)); + assert(entry_ptr->header.addr == entry_ptr->base_addr); + assert((entry_ptr->header.size == entry_ptr->len) || (entry_ptr->header.size == entry_ptr->local_len)); - HDassert(entry_ptr->header.is_dirty == entry_ptr->dirty); + assert(entry_ptr->header.is_dirty == entry_ptr->dirty); datum_flushes++; if (entry_ptr->header.is_pinned) { datum_pinned_flushes++; - HDassert(entry_ptr->global_pinned || entry_ptr->local_pinned); + assert(entry_ptr->global_pinned || entry_ptr->local_pinned); } return (ret_value); @@ -2357,39 +2354,39 @@ datum_notify(H5C_notify_action_t action, void *thing) struct mssg_t mssg; int idx; - HDassert(thing); + assert(thing); entry_ptr = (struct datum *)thing; idx = addr_to_datum_index(entry_ptr->base_addr); - HDassert(idx >= 0); - HDassert(idx < NUM_DATA_ENTRIES); - HDassert(idx < virt_num_data_entries); - HDassert(&(data[idx]) == entry_ptr); + assert(idx >= 0); + assert(idx < NUM_DATA_ENTRIES); + assert(idx < virt_num_data_entries); + assert(&(data[idx]) == entry_ptr); if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = %d, idx = %d, addr = %ld.\n", world_mpi_rank, (int)action, - idx, (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = %d, idx = %d, addr = %ld.\n", world_mpi_rank, (int)action, idx, + (long)entry_ptr->header.addr); fflush(stdout); } - HDassert(entry_ptr->header.addr == entry_ptr->base_addr); + assert(entry_ptr->header.addr == entry_ptr->base_addr); /* Skip this check when the entry is being dirtied, since the resize * operation sends the message before the len/local_len is updated * (after the resize operation completes successfully) (QAK - 2016/10/19) */ if (H5AC_NOTIFY_ACTION_ENTRY_DIRTIED != action) - HDassert((entry_ptr->header.size == entry_ptr->len) || - (entry_ptr->header.size == entry_ptr->local_len)); + assert((entry_ptr->header.size == entry_ptr->len) || + (entry_ptr->header.size == entry_ptr->local_len)); switch (action) { case H5AC_NOTIFY_ACTION_AFTER_INSERT: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = insert, idx = %d, addr = %ld.\n", world_mpi_rank, - idx, (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = insert, idx = %d, addr = %ld.\n", world_mpi_rank, idx, + (long)entry_ptr->header.addr); fflush(stdout); } /* do nothing */ @@ -2398,8 +2395,8 @@ datum_notify(H5C_notify_action_t action, void *thing) case H5AC_NOTIFY_ACTION_AFTER_LOAD: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = load, idx = %d, addr = %ld.\n", world_mpi_rank, idx, - (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = load, idx = %d, addr = %ld.\n", world_mpi_rank, idx, + (long)entry_ptr->header.addr); fflush(stdout); } @@ -2419,7 +2416,7 @@ datum_notify(H5C_notify_action_t action, void *thing) nerrors++; ret_value = FAIL; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); } } @@ -2430,7 +2427,7 @@ datum_notify(H5C_notify_action_t action, void *thing) nerrors++; ret_value = FAIL; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -2445,41 +2442,41 @@ datum_notify(H5C_notify_action_t action, void *thing) nerrors++; ret_value = FAIL; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, __func__); } #if 0 /* This has been useful debugging code -- keep it for now. */ if ( mssg.req != READ_REQ_REPLY_CODE ) { - HDfprintf(stdout, + fprintf(stdout, "%d:%s: mssg.req != READ_REQ_REPLY_CODE.\n", world_mpi_rank, __func__); - HDfprintf(stdout, "%d:%s: mssg.req = %d.\n", + fprintf(stdout, "%d:%s: mssg.req = %d.\n", world_mpi_rank, __func__, (int)(mssg.req)); } if ( mssg.src != world_server_mpi_rank ) { - HDfprintf(stdout, + fprintf(stdout, "%d:%s: mssg.src != world_server_mpi_rank.\n", world_mpi_rank, __func__); } if ( mssg.dest != world_mpi_rank ) { - HDfprintf(stdout, + fprintf(stdout, "%d:%s: mssg.dest != world_mpi_rank.\n", world_mpi_rank, __func__); } if ( mssg.base_addr != entry_ptr->base_addr ) { - HDfprintf(stdout, + fprintf(stdout, "%d:%s: mssg.base_addr != entry_ptr->base_addr.\n", world_mpi_rank, __func__); - HDfprintf(stdout, "%d:%s: mssg.base_addr = %" PRIuHADDR ".\n", + fprintf(stdout, "%d:%s: mssg.base_addr = %" PRIuHADDR ".\n", world_mpi_rank, __func__, mssg.base_addr); - HDfprintf(stdout, + fprintf(stdout, "%d:%s: entry_ptr->base_addr = %" PRIuHADDR ".\n", world_mpi_rank, __func__, entry_ptr->base_addr); @@ -2487,23 +2484,23 @@ datum_notify(H5C_notify_action_t action, void *thing) if ( mssg.len != entry_ptr->len ) { - HDfprintf(stdout, + fprintf(stdout, "%d:%s: mssg.len != entry_ptr->len.\n", world_mpi_rank, __func__); - HDfprintf(stdout, "%d:%s: mssg.len = %" PRIuHADDR ".\n", + fprintf(stdout, "%d:%s: mssg.len = %" PRIuHADDR ".\n", world_mpi_rank, __func__, mssg.len); } if ( mssg.ver < entry_ptr->ver ) { - HDfprintf(stdout, + fprintf(stdout, "%d:%s: mssg.ver < entry_ptr->ver.\n", world_mpi_rank, __func__); } if ( mssg.magic != MSSG_MAGIC ) { - HDfprintf(stdout, "%d:%s: mssg.magic != MSSG_MAGIC.\n", + fprintf(stdout, "%d:%s: mssg.magic != MSSG_MAGIC.\n", world_mpi_rank, __func__); } #endif /* JRM */ @@ -2520,24 +2517,24 @@ datum_notify(H5C_notify_action_t action, void *thing) case H5C_NOTIFY_ACTION_AFTER_FLUSH: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = flush, idx = %d, addr = %ld.\n", world_mpi_rank, idx, - (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = flush, idx = %d, addr = %ld.\n", world_mpi_rank, idx, + (long)entry_ptr->header.addr); fflush(stdout); } - HDassert(entry_ptr->aux_ptr); - HDassert(entry_ptr->aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); + assert(entry_ptr->aux_ptr); + assert(entry_ptr->aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC); aux_ptr = entry_ptr->aux_ptr; entry_ptr->aux_ptr = NULL; - HDassert(entry_ptr->header.is_dirty); /* JRM */ + assert(entry_ptr->header.is_dirty); /* JRM */ if ((file_mpi_rank != 0) && (entry_ptr->dirty) && (aux_ptr->metadata_write_strategy == H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY)) { ret_value = FAIL; - HDfprintf(stdout, "%d:%s: Flushed dirty entry from non-zero file process.", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: Flushed dirty entry from non-zero file process.", world_mpi_rank, + __func__); } if (ret_value == SUCCEED) { @@ -2564,7 +2561,7 @@ datum_notify(H5C_notify_action_t action, void *thing) nerrors++; ret_value = FAIL; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); } } else { @@ -2583,7 +2580,7 @@ datum_notify(H5C_notify_action_t action, void *thing) nerrors++; ret_value = FAIL; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } else if ((mssg.req != WRITE_REQ_ACK_CODE) || (mssg.src != world_server_mpi_rank) || @@ -2594,7 +2591,7 @@ datum_notify(H5C_notify_action_t action, void *thing) nerrors++; ret_value = FAIL; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in write req ack.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad data in write req ack.\n", world_mpi_rank, __func__); } } } @@ -2606,15 +2603,15 @@ datum_notify(H5C_notify_action_t action, void *thing) if (entry_ptr->header.is_pinned) { datum_pinned_flushes++; - HDassert(entry_ptr->global_pinned || entry_ptr->local_pinned); + assert(entry_ptr->global_pinned || entry_ptr->local_pinned); } break; case H5AC_NOTIFY_ACTION_BEFORE_EVICT: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = evict, idx = %d, addr = %ld.\n", world_mpi_rank, idx, - (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = evict, idx = %d, addr = %ld.\n", world_mpi_rank, idx, + (long)entry_ptr->header.addr); fflush(stdout); } @@ -2624,8 +2621,8 @@ datum_notify(H5C_notify_action_t action, void *thing) case H5AC_NOTIFY_ACTION_ENTRY_DIRTIED: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = entry dirty, idx = %d, addr = %ld.\n", - world_mpi_rank, idx, (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = entry dirty, idx = %d, addr = %ld.\n", world_mpi_rank, + idx, (long)entry_ptr->header.addr); fflush(stdout); } @@ -2635,8 +2632,8 @@ datum_notify(H5C_notify_action_t action, void *thing) case H5AC_NOTIFY_ACTION_ENTRY_CLEANED: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = entry clean, idx = %d, addr = %ld.\n", - world_mpi_rank, idx, (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = entry clean, idx = %d, addr = %ld.\n", world_mpi_rank, + idx, (long)entry_ptr->header.addr); fflush(stdout); } @@ -2647,7 +2644,7 @@ datum_notify(H5C_notify_action_t action, void *thing) if (entry_ptr->header.is_pinned) { datum_pinned_clears++; - HDassert(entry_ptr->global_pinned || entry_ptr->local_pinned); + assert(entry_ptr->global_pinned || entry_ptr->local_pinned); } /* end if */ break; @@ -2655,8 +2652,8 @@ datum_notify(H5C_notify_action_t action, void *thing) case H5AC_NOTIFY_ACTION_CHILD_DIRTIED: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = child entry dirty, idx = %d, addr = %ld.\n", - world_mpi_rank, idx, (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = child entry dirty, idx = %d, addr = %ld.\n", + world_mpi_rank, idx, (long)entry_ptr->header.addr); fflush(stdout); } @@ -2666,8 +2663,8 @@ datum_notify(H5C_notify_action_t action, void *thing) case H5AC_NOTIFY_ACTION_CHILD_CLEANED: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = child entry clean, idx = %d, addr = %ld.\n", - world_mpi_rank, idx, (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = child entry clean, idx = %d, addr = %ld.\n", + world_mpi_rank, idx, (long)entry_ptr->header.addr); fflush(stdout); } @@ -2677,8 +2674,8 @@ datum_notify(H5C_notify_action_t action, void *thing) case H5AC_NOTIFY_ACTION_CHILD_UNSERIALIZED: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = child entry unserialized, idx = %d, addr = %ld.\n", - world_mpi_rank, idx, (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = child entry unserialized, idx = %d, addr = %ld.\n", + world_mpi_rank, idx, (long)entry_ptr->header.addr); fflush(stdout); } @@ -2688,8 +2685,8 @@ datum_notify(H5C_notify_action_t action, void *thing) case H5AC_NOTIFY_ACTION_CHILD_SERIALIZED: if (callbacks_verbose) { - HDfprintf(stdout, "%d: notify() action = child entry serialized, idx = %d, addr = %ld.\n", - world_mpi_rank, idx, (long)entry_ptr->header.addr); + fprintf(stdout, "%d: notify() action = child entry serialized, idx = %d, addr = %ld.\n", + world_mpi_rank, idx, (long)entry_ptr->header.addr); fflush(stdout); } @@ -2700,7 +2697,7 @@ datum_notify(H5C_notify_action_t action, void *thing) nerrors++; ret_value = FAIL; if (verbose) { - HDfprintf(stdout, "%d:%s: Unknown notify action.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Unknown notify action.\n", world_mpi_rank, __func__); } break; } @@ -2731,31 +2728,31 @@ datum_free_icr(void *thing) int idx; struct datum *entry_ptr; - HDassert(thing); + assert(thing); entry_ptr = (struct datum *)thing; idx = addr_to_datum_index(entry_ptr->base_addr); - HDassert(idx >= 0); - HDassert(idx < NUM_DATA_ENTRIES); - HDassert(idx < virt_num_data_entries); - HDassert(&(data[idx]) == entry_ptr); + assert(idx >= 0); + assert(idx < NUM_DATA_ENTRIES); + assert(idx < virt_num_data_entries); + assert(&(data[idx]) == entry_ptr); if (callbacks_verbose) { - HDfprintf(stdout, "%d: free_icr() idx = %d, dirty = %d.\n", world_mpi_rank, idx, - (int)(entry_ptr->dirty)); + fprintf(stdout, "%d: free_icr() idx = %d, dirty = %d.\n", world_mpi_rank, idx, + (int)(entry_ptr->dirty)); fflush(stdout); } - HDassert(entry_ptr->header.addr == entry_ptr->base_addr); - HDassert((entry_ptr->header.size == entry_ptr->len) || (entry_ptr->header.size == entry_ptr->local_len)); + assert(entry_ptr->header.addr == entry_ptr->base_addr); + assert((entry_ptr->header.size == entry_ptr->len) || (entry_ptr->header.size == entry_ptr->local_len)); - HDassert(!(entry_ptr->header.is_dirty)); - HDassert(!(entry_ptr->global_pinned)); - HDassert(!(entry_ptr->local_pinned)); - HDassert(!(entry_ptr->header.is_pinned)); + assert(!(entry_ptr->header.is_dirty)); + assert(!(entry_ptr->global_pinned)); + assert(!(entry_ptr->local_pinned)); + assert(!(entry_ptr->header.is_pinned)); datum_destroys++; @@ -2787,15 +2784,15 @@ expunge_entry(H5F_t *file_ptr, int32_t idx) herr_t result; struct datum *entry_ptr; - HDassert(file_ptr); - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert(file_ptr); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(!(entry_ptr->locked)); - HDassert(!(entry_ptr->global_pinned)); - HDassert(!(entry_ptr->local_pinned)); + assert(!(entry_ptr->locked)); + assert(!(entry_ptr->global_pinned)); + assert(!(entry_ptr->local_pinned)); entry_ptr->dirty = FALSE; @@ -2807,12 +2804,12 @@ expunge_entry(H5F_t *file_ptr, int32_t idx) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Error in H5AC_expunge_entry().\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Error in H5AC_expunge_entry().\n", world_mpi_rank, __func__); } } - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); - HDassert(!((entry_ptr->header).is_dirty)); + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(!((entry_ptr->header).is_dirty)); result = H5C_get_entry_status(file_ptr, entry_ptr->base_addr, NULL, &in_cache, NULL, NULL, NULL, NULL, NULL, NULL, NULL); @@ -2821,14 +2818,14 @@ expunge_entry(H5F_t *file_ptr, int32_t idx) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Error in H5C_get_entry_status().\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Error in H5C_get_entry_status().\n", world_mpi_rank, __func__); } } else if (in_cache) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Expunged entry still in cache?!?\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Expunged entry still in cache?!?\n", world_mpi_rank, __func__); } } } @@ -2858,14 +2855,14 @@ insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags) herr_t result; struct datum *entry_ptr; - HDassert(cache_ptr); - HDassert(file_ptr); - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert(cache_ptr); + assert(file_ptr); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(!(entry_ptr->locked)); + assert(!(entry_ptr->locked)); insert_pinned = ((flags & H5C__PIN_ENTRY_FLAG) != 0); @@ -2882,7 +2879,7 @@ insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Error in H5AC_insert_entry().\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Error in H5AC_insert_entry().\n", world_mpi_rank, __func__); } } @@ -2903,26 +2900,26 @@ insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", world_mpi_rank, __func__, - idx, (int)(data[idx].header.is_dirty)); + fprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", world_mpi_rank, __func__, idx, + (int)(data[idx].header.is_dirty)); } } } if (insert_pinned) { - HDassert(entry_ptr->header.is_pinned); + assert(entry_ptr->header.is_pinned); entry_ptr->global_pinned = TRUE; global_pins++; } else { - HDassert(!(entry_ptr->header.is_pinned)); + assert(!(entry_ptr->header.is_pinned)); entry_ptr->global_pinned = FALSE; } - /* HDassert( entry_ptr->header.is_dirty ); */ - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + /* assert( entry_ptr->header.is_dirty ); */ + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); } return; @@ -2954,18 +2951,18 @@ local_pin_and_unpin_random_entries(H5F_t *file_ptr, int min_idx, int max_idx, in int i; int idx; - HDassert(file_ptr); - HDassert(0 <= min_idx); - HDassert(min_idx < max_idx); - HDassert(max_idx < NUM_DATA_ENTRIES); - HDassert(max_idx < virt_num_data_entries); - HDassert(0 <= min_count); - HDassert(min_count < max_count); + assert(file_ptr); + assert(0 <= min_idx); + assert(min_idx < max_idx); + assert(max_idx < NUM_DATA_ENTRIES); + assert(max_idx < virt_num_data_entries); + assert(0 <= min_count); + assert(min_count < max_count); count = (HDrand() % (max_count - min_count)) + min_count; - HDassert(min_count <= count); - HDassert(count <= max_count); + assert(min_count <= count); + assert(count <= max_count); for (i = 0; i < count; i++) { local_pin_random_entry(file_ptr, min_idx, max_idx); @@ -2973,8 +2970,8 @@ local_pin_and_unpin_random_entries(H5F_t *file_ptr, int min_idx, int max_idx, in count = (HDrand() % (max_count - min_count)) + min_count; - HDassert(min_count <= count); - HDassert(count <= max_count); + assert(min_count <= count); + assert(count <= max_count); i = 0; idx = 0; @@ -3013,16 +3010,16 @@ local_pin_random_entry(H5F_t *file_ptr, int min_idx, int max_idx) if (nerrors == 0) { - HDassert(file_ptr); - HDassert(0 <= min_idx); - HDassert(min_idx < max_idx); - HDassert(max_idx < NUM_DATA_ENTRIES); - HDassert(max_idx < virt_num_data_entries); + assert(file_ptr); + assert(0 <= min_idx); + assert(min_idx < max_idx); + assert(max_idx < NUM_DATA_ENTRIES); + assert(max_idx < virt_num_data_entries); do { idx = (HDrand() % (max_idx - min_idx)) + min_idx; - HDassert(min_idx <= idx); - HDassert(idx <= max_idx); + assert(min_idx <= idx); + assert(idx <= max_idx); } while (data[idx].global_pinned || data[idx].local_pinned); pin_entry(file_ptr, idx, FALSE, FALSE); @@ -3053,7 +3050,7 @@ local_unpin_all_entries(H5F_t *file_ptr, hbool_t via_unprotect) int idx; - HDassert(file_ptr); + assert(file_ptr); idx = 0; @@ -3090,10 +3087,10 @@ local_unpin_next_pinned_entry(H5F_t *file_ptr, int start_idx, hbool_t via_unprot if (nerrors == 0) { - HDassert(file_ptr); - HDassert(0 <= start_idx); - HDassert(start_idx < NUM_DATA_ENTRIES); - HDassert(start_idx < virt_num_data_entries); + assert(file_ptr); + assert(0 <= start_idx); + assert(start_idx < NUM_DATA_ENTRIES); + assert(start_idx < virt_num_data_entries); idx = start_idx; @@ -3142,14 +3139,14 @@ lock_and_unlock_random_entries(H5F_t *file_ptr, int min_idx, int max_idx, int mi if (nerrors == 0) { - HDassert(file_ptr); - HDassert(0 <= min_count); - HDassert(min_count < max_count); + assert(file_ptr); + assert(0 <= min_count); + assert(min_count < max_count); count = (HDrand() % (max_count - min_count)) + min_count; - HDassert(min_count <= count); - HDassert(count <= max_count); + assert(min_count <= count); + assert(count <= max_count); for (i = 0; i < count; i++) { lock_and_unlock_random_entry(file_ptr, min_idx, max_idx); @@ -3181,16 +3178,16 @@ lock_and_unlock_random_entry(H5F_t *file_ptr, int min_idx, int max_idx) if (nerrors == 0) { - HDassert(file_ptr); - HDassert(0 <= min_idx); - HDassert(min_idx < max_idx); - HDassert(max_idx < NUM_DATA_ENTRIES); - HDassert(max_idx < virt_num_data_entries); + assert(file_ptr); + assert(0 <= min_idx); + assert(min_idx < max_idx); + assert(max_idx < NUM_DATA_ENTRIES); + assert(max_idx < virt_num_data_entries); idx = (HDrand() % (max_idx - min_idx)) + min_idx; - HDassert(min_idx <= idx); - HDassert(idx <= max_idx); + assert(min_idx <= idx); + assert(idx <= max_idx); lock_entry(file_ptr, idx); unlock_entry(file_ptr, idx, H5AC__NO_FLAGS_SET); @@ -3221,12 +3218,12 @@ lock_entry(H5F_t *file_ptr, int32_t idx) if (nerrors == 0) { - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(!(entry_ptr->locked)); + assert(!(entry_ptr->locked)); cache_entry_ptr = (H5C_cache_entry_t *)H5AC_protect(file_ptr, &(types[0]), entry_ptr->base_addr, &entry_ptr->base_addr, H5AC__NO_FLAGS_SET); @@ -3238,7 +3235,7 @@ lock_entry(H5F_t *file_ptr, int32_t idx) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: error in H5AC_protect().\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: error in H5AC_protect().\n", world_mpi_rank, __func__); } } else { @@ -3246,7 +3243,7 @@ lock_entry(H5F_t *file_ptr, int32_t idx) entry_ptr->locked = TRUE; } - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); } return; @@ -3274,13 +3271,13 @@ mark_entry_dirty(int32_t idx) if (nerrors == 0) { - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(entry_ptr->locked || entry_ptr->global_pinned); - HDassert(!(entry_ptr->local_pinned)); + assert(entry_ptr->locked || entry_ptr->global_pinned); + assert(!(entry_ptr->local_pinned)); (entry_ptr->ver)++; entry_ptr->dirty = TRUE; @@ -3291,7 +3288,7 @@ mark_entry_dirty(int32_t idx) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: error in H5AC_mark_entry_dirty().\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: error in H5AC_mark_entry_dirty().\n", world_mpi_rank, __func__); } } else if (!(entry_ptr->locked)) { @@ -3324,15 +3321,15 @@ pin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty) if (nerrors == 0) { - HDassert(file_ptr); - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert(file_ptr); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(!(entry_ptr->global_pinned)); - HDassert(!(entry_ptr->local_pinned)); - HDassert(!(dirty && (!global))); + assert(!(entry_ptr->global_pinned)); + assert(!(entry_ptr->local_pinned)); + assert(!(dirty && (!global))); lock_entry(file_ptr, idx); @@ -3343,8 +3340,8 @@ pin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty) unlock_entry(file_ptr, idx, flags); - HDassert((entry_ptr->header).is_pinned); - HDassert((!dirty) || ((entry_ptr->header).is_dirty)); + assert((entry_ptr->header).is_pinned); + assert((!dirty) || ((entry_ptr->header).is_dirty)); if (global) { @@ -3384,12 +3381,12 @@ pin_protected_entry(int32_t idx, hbool_t global) herr_t result; struct datum *entry_ptr; - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(entry_ptr->locked); + assert(entry_ptr->locked); if (nerrors == 0) { @@ -3402,7 +3399,7 @@ pin_protected_entry(int32_t idx, hbool_t global) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Error in H5AC_pin_protected entry().\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Error in H5AC_pin_protected entry().\n", world_mpi_rank, __func__); } } @@ -3419,7 +3416,7 @@ pin_protected_entry(int32_t idx, hbool_t global) local_pins++; } - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); } return; @@ -3455,19 +3452,19 @@ move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx) if ((nerrors == 0) && (old_idx != new_idx)) { - HDassert(file_ptr); - HDassert((0 <= old_idx) && (old_idx < NUM_DATA_ENTRIES)); - HDassert(old_idx < virt_num_data_entries); - HDassert((0 <= new_idx) && (new_idx < NUM_DATA_ENTRIES)); - HDassert(new_idx < virt_num_data_entries); + assert(file_ptr); + assert((0 <= old_idx) && (old_idx < NUM_DATA_ENTRIES)); + assert(old_idx < virt_num_data_entries); + assert((0 <= new_idx) && (new_idx < NUM_DATA_ENTRIES)); + assert(new_idx < virt_num_data_entries); old_entry_ptr = &(data[old_idx]); new_entry_ptr = &(data[new_idx]); - HDassert(((old_entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); - HDassert(!(old_entry_ptr->header.is_protected)); - HDassert(!(old_entry_ptr->locked)); - HDassert(old_entry_ptr->len == new_entry_ptr->len); + assert(((old_entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(!(old_entry_ptr->header.is_protected)); + assert(!(old_entry_ptr->locked)); + assert(old_entry_ptr->len == new_entry_ptr->len); old_addr = old_entry_ptr->base_addr; new_addr = new_entry_ptr->base_addr; @@ -3506,12 +3503,12 @@ move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5AC_move_entry() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5AC_move_entry() failed.\n", world_mpi_rank, __func__); } } else { - HDassert(((old_entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(((old_entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); if (!(old_entry_ptr->header.is_dirty)) { @@ -3530,14 +3527,14 @@ move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", world_mpi_rank, __func__, - new_idx, (int)(data[new_idx].header.is_dirty)); + fprintf(stdout, "%d:%s: data[%d].header.is_dirty = %d.\n", world_mpi_rank, __func__, + new_idx, (int)(data[new_idx].header.is_dirty)); } } } else { - HDassert(old_entry_ptr->header.is_dirty); + assert(old_entry_ptr->header.is_dirty); } } } @@ -3582,7 +3579,7 @@ reset_server_counts(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -3594,7 +3591,7 @@ reset_server_counts(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } else if ((mssg.req != REQ_RW_COUNT_RESET_RPLY_CODE) || (mssg.src != world_server_mpi_rank) || @@ -3604,8 +3601,8 @@ reset_server_counts(void) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in req r/w counter reset reply.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: Bad data in req r/w counter reset reply.\n", world_mpi_rank, + __func__); } } } @@ -3637,18 +3634,18 @@ resize_entry(int32_t idx, size_t new_size) if (nerrors == 0) { - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); - HDassert(!(entry_ptr->locked)); - HDassert((entry_ptr->global_pinned) && (!entry_ptr->local_pinned)); - HDassert((entry_ptr->header.size == entry_ptr->len) || - (entry_ptr->header.size == entry_ptr->local_len)); - HDassert(new_size > 0); - HDassert(new_size <= entry_ptr->len); + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(!(entry_ptr->locked)); + assert((entry_ptr->global_pinned) && (!entry_ptr->local_pinned)); + assert((entry_ptr->header.size == entry_ptr->len) || + (entry_ptr->header.size == entry_ptr->local_len)); + assert(new_size > 0); + assert(new_size <= entry_ptr->len); result = H5AC_resize_entry((void *)entry_ptr, new_size); @@ -3656,14 +3653,14 @@ resize_entry(int32_t idx, size_t new_size) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5AC_resize_entry() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5AC_resize_entry() failed.\n", world_mpi_rank, __func__); } } else { - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); - HDassert(entry_ptr->header.is_dirty); - HDassert(entry_ptr->header.size == new_size); + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(entry_ptr->header.is_dirty); + assert(entry_ptr->header.size == new_size); entry_ptr->dirty = TRUE; entry_ptr->local_len = new_size; @@ -3709,9 +3706,9 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr H5C_t *cache_ptr = NULL; haddr_t actual_base_addr; - HDassert(fid_ptr != NULL); - HDassert(file_ptr_ptr != NULL); - HDassert(cache_ptr_ptr != NULL); + assert(fid_ptr != NULL); + assert(file_ptr_ptr != NULL); + assert(cache_ptr_ptr != NULL); fid = H5Fcreate(filenames[0], H5F_ACC_TRUNC, H5P_DEFAULT, fapl); @@ -3721,13 +3718,13 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr if (fid < 0) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5Fcreate() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Fcreate() failed.\n", world_mpi_rank, __func__); } } else if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); } } else { @@ -3737,7 +3734,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr if (file_ptr == NULL) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Can't get file_ptr.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Can't get file_ptr.\n", world_mpi_rank, __func__); } } else { @@ -3747,13 +3744,13 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr if (cache_ptr == NULL) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Can't get cache_ptr.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Can't get cache_ptr.\n", world_mpi_rank, __func__); } } else if (cache_ptr->magic != H5C__H5C_T_MAGIC) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad cache_ptr magic.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad cache_ptr magic.\n", world_mpi_rank, __func__); } } else { @@ -3771,8 +3768,8 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr if (H5AC_get_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) { - HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config(1) failed.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config(1) failed.\n", world_mpi_rank, + __func__); } else { @@ -3781,12 +3778,12 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr if (H5AC_set_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) { - HDfprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank, + __func__); } else if (enable_rpt_fcn) { - HDfprintf(stdout, "%d:%s: rpt_fcn enabled.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: rpt_fcn enabled.\n", world_mpi_rank, __func__); } } } @@ -3802,23 +3799,23 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: cache_ptr->aux_ptr == NULL.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: cache_ptr->aux_ptr == NULL.\n", world_mpi_rank, __func__); } } else if (((H5AC_aux_t *)(cache_ptr->aux_ptr))->magic != H5AC__H5AC_AUX_T_MAGIC) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: cache_ptr->aux_ptr->magic != H5AC__H5AC_AUX_T_MAGIC.\n", - world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: cache_ptr->aux_ptr->magic != H5AC__H5AC_AUX_T_MAGIC.\n", + world_mpi_rank, __func__); } } else if (((H5AC_aux_t *)(cache_ptr->aux_ptr))->metadata_write_strategy != metadata_write_strategy) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: bad cache_ptr->aux_ptr->metadata_write_strategy\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: bad cache_ptr->aux_ptr->metadata_write_strategy\n", world_mpi_rank, + __func__); } } } @@ -3833,8 +3830,8 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr if (H5AC_get_cache_auto_resize_config(cache_ptr, &test_config) != SUCCEED) { - HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config(2) failed.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config(2) failed.\n", world_mpi_rank, + __func__); } else if (test_config.metadata_write_strategy != metadata_write_strategy) { @@ -3842,7 +3839,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr if (verbose) { - HDfprintf(stdout, "%d:%s: unexpected metadata_write_strategy.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: unexpected metadata_write_strategy.\n", world_mpi_rank, __func__); } } } @@ -3862,7 +3859,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5MF_alloc() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5MF_alloc() failed.\n", world_mpi_rank, __func__); } } else if (actual_base_addr > BASE_ADDR) { @@ -3875,7 +3872,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: actual_base_addr > BASE_ADDR.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: actual_base_addr > BASE_ADDR.\n", world_mpi_rank, __func__); } } } @@ -3886,7 +3883,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: second H5Fflush() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: second H5Fflush() failed.\n", world_mpi_rank, __func__); } } } @@ -3899,7 +3896,7 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5C_set_write_done_callback failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5C_set_write_done_callback failed.\n", world_mpi_rank, __func__); } } } @@ -3912,8 +3909,8 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5AC__set_sync_point_done_callback failed.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5AC__set_sync_point_done_callback failed.\n", world_mpi_rank, + __func__); } } } @@ -3956,8 +3953,8 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl) hbool_t proceed = TRUE; unsigned u = 0; - HDassert(world_mpi_rank != world_server_mpi_rank); - HDassert((num_writes == 0) || (written_entries_tbl != NULL)); + assert(world_mpi_rank != world_server_mpi_rank); + assert((num_writes == 0) || (written_entries_tbl != NULL)); /* barrier to ensure that all other processes are ready to leave * the sync point as well. @@ -3969,7 +3966,7 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl) proceed = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: barrier 1 failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: barrier 1 failed.\n", world_mpi_rank, __func__); } } } @@ -3992,7 +3989,7 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl) proceed = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: barrier 2 failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: barrier 2 failed.\n", world_mpi_rank, __func__); } } } @@ -4007,11 +4004,11 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl) if (proceed) { - HDfprintf(stdout, "%d:%s: verified %u writes.\n", world_mpi_rank, __func__, num_writes); + fprintf(stdout, "%d:%s: verified %u writes.\n", world_mpi_rank, __func__, num_writes); } else { - HDfprintf(stdout, "%d:%s: FAILED to verify %u writes.\n", world_mpi_rank, __func__, num_writes); + fprintf(stdout, "%d:%s: FAILED to verify %u writes.\n", world_mpi_rank, __func__, num_writes); } } @@ -4028,7 +4025,7 @@ verify_writes(unsigned num_writes, haddr_t *written_entries_tbl) proceed = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: barrier 3 failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: barrier 3 failed.\n", world_mpi_rank, __func__); } } } @@ -4062,11 +4059,11 @@ setup_rand(void) if ((use_predefined_seeds) && (world_mpi_size == num_predefined_seeds)) { - HDassert(world_mpi_rank >= 0); - HDassert(world_mpi_rank < world_mpi_size); + assert(world_mpi_rank >= 0); + assert(world_mpi_rank < world_mpi_size); seed = predefined_seeds[world_mpi_rank]; - HDfprintf(stdout, "%d:%s: predefined_seed = %d.\n", world_mpi_rank, __func__, seed); + fprintf(stdout, "%d:%s: predefined_seed = %d.\n", world_mpi_rank, __func__, seed); fflush(stdout); HDsrand(seed); } @@ -4076,13 +4073,13 @@ setup_rand(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: gettimeofday() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: gettimeofday() failed.\n", world_mpi_rank, __func__); } } else { seed = (unsigned)tv.tv_usec; if (verbose) { - HDfprintf(stdout, "%d:%s: seed = %d.\n", world_mpi_rank, __func__, seed); + fprintf(stdout, "%d:%s: seed = %d.\n", world_mpi_rank, __func__, seed); fflush(stdout); } HDsrand(seed); @@ -4122,7 +4119,7 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); } } @@ -4138,8 +4135,8 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5AC__set_sync_point_done_callback failed.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5AC__set_sync_point_done_callback failed.\n", world_mpi_rank, + __func__); } } } @@ -4150,7 +4147,7 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5Fclose() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Fclose() failed.\n", world_mpi_rank, __func__); } } @@ -4166,7 +4163,7 @@ take_down_cache(hid_t fid, H5C_t *cache_ptr) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: HDremove() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: HDremove() failed.\n", world_mpi_rank, __func__); } } } @@ -4228,7 +4225,7 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -4240,7 +4237,7 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -4254,7 +4251,7 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in req entry reads reply.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad data in req entry reads reply.\n", world_mpi_rank, __func__); } } else { @@ -4270,8 +4267,8 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: rep/exp entry 0x%" PRIxHADDR " reads mismatch (%d/%d).\n", - world_mpi_rank, __func__, addr, reported_entry_reads, expected_entry_reads); + fprintf(stdout, "%d:%s: rep/exp entry 0x%" PRIxHADDR " reads mismatch (%d/%d).\n", + world_mpi_rank, __func__, addr, reported_entry_reads, expected_entry_reads); } } } @@ -4325,7 +4322,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -4337,7 +4334,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -4351,7 +4348,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in req entry writes reply.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad data in req entry writes reply.\n", world_mpi_rank, __func__); } } else { @@ -4367,8 +4364,8 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: rep/exp entry 0x%llx writes mismatch (%d/%d).\n", world_mpi_rank, - __func__, (long long)addr, reported_entry_writes, expected_entry_writes); + fprintf(stdout, "%d:%s: rep/exp entry 0x%llx writes mismatch (%d/%d).\n", world_mpi_rank, + __func__, (long long)addr, reported_entry_writes, expected_entry_writes); } } } @@ -4421,7 +4418,7 @@ verify_total_reads(int expected_total_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -4433,7 +4430,7 @@ verify_total_reads(int expected_total_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } else if ((mssg.req != REQ_TTL_READS_RPLY_CODE) || (mssg.src != world_server_mpi_rank) || @@ -4443,7 +4440,7 @@ verify_total_reads(int expected_total_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in req total reads reply.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad data in req total reads reply.\n", world_mpi_rank, __func__); } } else { @@ -4459,8 +4456,8 @@ verify_total_reads(int expected_total_reads) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: reported/expected total reads mismatch (%ld/%d).\n", world_mpi_rank, - __func__, reported_total_reads, expected_total_reads); + fprintf(stdout, "%d:%s: reported/expected total reads mismatch (%ld/%d).\n", world_mpi_rank, + __func__, reported_total_reads, expected_total_reads); } } } @@ -4513,7 +4510,7 @@ verify_total_writes(unsigned expected_total_writes) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -4525,7 +4522,7 @@ verify_total_writes(unsigned expected_total_writes) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } else if ((mssg.req != REQ_TTL_WRITES_RPLY_CODE) || (mssg.src != world_server_mpi_rank) || @@ -4535,7 +4532,7 @@ verify_total_writes(unsigned expected_total_writes) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in req total reads reply.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad data in req total reads reply.\n", world_mpi_rank, __func__); } } else { @@ -4551,8 +4548,8 @@ verify_total_writes(unsigned expected_total_writes) nerrors++; success = FALSE; if (verbose) { - HDfprintf(stdout, "%d:%s: reported/expected total writes mismatch (%u/%u).\n", world_mpi_rank, - __func__, reported_total_writes, expected_total_writes); + fprintf(stdout, "%d:%s: reported/expected total writes mismatch (%u/%u).\n", world_mpi_rank, + __func__, reported_total_writes, expected_total_writes); } } } @@ -4583,13 +4580,13 @@ unlock_entry(H5F_t *file_ptr, int32_t idx, unsigned int flags) if (nerrors == 0) { - HDassert(file_ptr); - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert(file_ptr); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert(entry_ptr->locked); + assert(entry_ptr->locked); dirtied = ((flags & H5AC__DIRTIED_FLAG) == H5AC__DIRTIED_FLAG); @@ -4609,7 +4606,7 @@ unlock_entry(H5F_t *file_ptr, int32_t idx, unsigned int flags) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: error in H5AC_unprotect().\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: error in H5AC_unprotect().\n", world_mpi_rank, __func__); } } else { @@ -4617,13 +4614,13 @@ unlock_entry(H5F_t *file_ptr, int32_t idx, unsigned int flags) entry_ptr->locked = FALSE; } - HDassert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); + assert(((entry_ptr->header).type)->id == DATUM_ENTRY_TYPE); if (((flags & H5AC__DIRTIED_FLAG) != 0) && ((flags & H5C__DELETED_FLAG) == 0) && (!(((world_mpi_rank == 0) && (entry_ptr->flushed)) || ((world_mpi_rank != 0) && (entry_ptr->cleared))))) { - HDassert(entry_ptr->header.is_dirty); - HDassert(entry_ptr->dirty); + assert(entry_ptr->header.is_dirty); + assert(entry_ptr->dirty); } } @@ -4653,16 +4650,16 @@ unpin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty, hbool_t if (nerrors == 0) { - HDassert(file_ptr); - HDassert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); - HDassert(idx < virt_num_data_entries); + assert(file_ptr); + assert((0 <= idx) && (idx < NUM_DATA_ENTRIES)); + assert(idx < virt_num_data_entries); entry_ptr = &(data[idx]); - HDassert((entry_ptr->header).is_pinned); - HDassert(!(entry_ptr->global_pinned && entry_ptr->local_pinned)); - HDassert((global && entry_ptr->global_pinned) || (!global && entry_ptr->local_pinned)); - HDassert(!(dirty && (!global))); + assert((entry_ptr->header).is_pinned); + assert(!(entry_ptr->global_pinned && entry_ptr->local_pinned)); + assert((global && entry_ptr->global_pinned) || (!global && entry_ptr->local_pinned)); + assert(!(dirty && (!global))); if (via_unprotect) { @@ -4688,12 +4685,12 @@ unpin_entry(H5F_t *file_ptr, int32_t idx, hbool_t global, hbool_t dirty, hbool_t nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: error in H5AC_unpin_entry().\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: error in H5AC_unpin_entry().\n", world_mpi_rank, __func__); } } } - HDassert(!((entry_ptr->header).is_pinned)); + assert(!((entry_ptr->header).is_pinned)); if (global) { @@ -4749,7 +4746,7 @@ server_smoke_check(void) /* some error occurred in the server -- report failure */ nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); } } } @@ -4770,7 +4767,7 @@ server_smoke_check(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on write.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on write.\n", world_mpi_rank, __func__); } } @@ -4785,7 +4782,7 @@ server_smoke_check(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -4801,7 +4798,7 @@ server_smoke_check(void) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in write req ack.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad data in write req ack.\n", world_mpi_rank, __func__); } } } @@ -4816,7 +4813,7 @@ server_smoke_check(void) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: barrier 1 failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: barrier 1 failed.\n", world_mpi_rank, __func__); } } @@ -4848,7 +4845,7 @@ server_smoke_check(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: barrier 2 failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: barrier 2 failed.\n", world_mpi_rank, __func__); } } @@ -4871,7 +4868,7 @@ server_smoke_check(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on write.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on write.\n", world_mpi_rank, __func__); } } } @@ -4885,7 +4882,7 @@ server_smoke_check(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: recv_mssg() failed.\n", world_mpi_rank, __func__); } } } @@ -4901,7 +4898,7 @@ server_smoke_check(void) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Bad data in read req reply.\n", world_mpi_rank, __func__); } } } @@ -4912,7 +4909,7 @@ server_smoke_check(void) success = FALSE; nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: barrier 3 failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: barrier 3 failed.\n", world_mpi_rank, __func__); } } @@ -4943,7 +4940,7 @@ server_smoke_check(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: barrier 4 failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: barrier 4 failed.\n", world_mpi_rank, __func__); } } @@ -4959,7 +4956,7 @@ server_smoke_check(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: barrier 5 failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: barrier 5 failed.\n", world_mpi_rank, __func__); } } @@ -4990,7 +4987,7 @@ server_smoke_check(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: barrier 6 failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: barrier 6 failed.\n", world_mpi_rank, __func__); } } @@ -5013,7 +5010,7 @@ server_smoke_check(void) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); } } } @@ -5096,7 +5093,7 @@ smoke_check_1(int metadata_write_strategy) /* some error occurred in the server -- report failure */ nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); } } } @@ -5108,7 +5105,7 @@ smoke_check_1(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if (verbose) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); } } @@ -5141,7 +5138,7 @@ smoke_check_1(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); } } } @@ -5151,8 +5148,8 @@ smoke_check_1(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -5174,7 +5171,7 @@ smoke_check_1(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); } } } @@ -5260,7 +5257,7 @@ smoke_check_2(int metadata_write_strategy) /* some error occurred in the server -- report failure */ nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); } } } @@ -5272,7 +5269,7 @@ smoke_check_2(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if (verbose) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); } } @@ -5339,7 +5336,7 @@ smoke_check_2(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); } } } @@ -5349,8 +5346,8 @@ smoke_check_2(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -5372,7 +5369,7 @@ smoke_check_2(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); } } } @@ -5465,7 +5462,7 @@ smoke_check_3(int metadata_write_strategy) /* some error occurred in the server -- report failure */ nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); } } } @@ -5477,7 +5474,7 @@ smoke_check_3(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if (verbose) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); } } @@ -5510,10 +5507,10 @@ smoke_check_3(int metadata_write_strategy) pin_entry(file_ptr, i, TRUE, dirty); - HDassert(!dirty || data[i].header.is_dirty); - HDassert(data[i].header.is_pinned); - HDassert(data[i].global_pinned); - HDassert(!data[i].local_pinned); + assert(!dirty || data[i].header.is_dirty); + assert(data[i].header.is_pinned); + assert(data[i].global_pinned); + assert(!data[i].local_pinned); } if (i > 100) { @@ -5531,7 +5528,7 @@ smoke_check_3(int metadata_write_strategy) if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); } } @@ -5548,8 +5545,8 @@ smoke_check_3(int metadata_write_strategy) hbool_t via_unprotect = ((((unsigned)i) & 0x02) == 0); hbool_t dirty = ((((unsigned)i) & 0x04) == 0); - HDassert(data[i].global_pinned); - HDassert(!data[i].local_pinned); + assert(data[i].global_pinned); + assert(!data[i].local_pinned); unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect); } @@ -5624,7 +5621,7 @@ smoke_check_3(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); } } } @@ -5634,8 +5631,8 @@ smoke_check_3(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -5657,7 +5654,7 @@ smoke_check_3(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); } } } @@ -5750,7 +5747,7 @@ smoke_check_4(int metadata_write_strategy) /* some error occurred in the server -- report failure */ nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); } } } @@ -5762,7 +5759,7 @@ smoke_check_4(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if (verbose) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); } } @@ -5807,10 +5804,10 @@ smoke_check_4(int metadata_write_strategy) pin_entry(file_ptr, i, TRUE, dirty); - HDassert(!dirty || data[i].header.is_dirty); - HDassert(data[i].header.is_pinned); - HDassert(data[i].global_pinned); - HDassert(!data[i].local_pinned); + assert(!dirty || data[i].header.is_dirty); + assert(data[i].header.is_pinned); + assert(data[i].global_pinned); + assert(!data[i].local_pinned); } if (i > 100) { @@ -5828,7 +5825,7 @@ smoke_check_4(int metadata_write_strategy) if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); } } @@ -5841,8 +5838,8 @@ smoke_check_4(int metadata_write_strategy) hbool_t via_unprotect = ((((unsigned)i) & 0x02) == 0); hbool_t dirty = ((((unsigned)i) & 0x04) == 0); - HDassert(data[i].global_pinned); - HDassert(!data[i].local_pinned); + assert(data[i].global_pinned); + assert(!data[i].local_pinned); unpin_entry(file_ptr, i, TRUE, dirty, via_unprotect); } @@ -5908,7 +5905,7 @@ smoke_check_4(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); } } } @@ -5918,8 +5915,8 @@ smoke_check_4(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -5941,7 +5938,7 @@ smoke_check_4(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); } } } @@ -6025,7 +6022,7 @@ smoke_check_5(int metadata_write_strategy) /* some error occurred in the server -- report failure */ nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); } } } @@ -6038,7 +6035,7 @@ smoke_check_5(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if (verbose) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); } } @@ -6050,7 +6047,7 @@ smoke_check_5(int metadata_write_strategy) if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); } } @@ -6100,7 +6097,7 @@ smoke_check_5(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); } } } @@ -6110,8 +6107,8 @@ smoke_check_5(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -6133,7 +6130,7 @@ smoke_check_5(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); } } } @@ -6310,7 +6307,7 @@ trace_file_check(int metadata_write_strategy) /* some error occurred in the server -- report failure */ nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); } } else { @@ -6322,7 +6319,7 @@ trace_file_check(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if (verbose) - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); } if (nerrors == 0) { @@ -6331,8 +6328,8 @@ trace_file_check(int metadata_write_strategy) if (H5AC_get_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) { nerrors++; - HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config() failed.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config() failed.\n", world_mpi_rank, + __func__); } else { config.open_trace_file = TRUE; @@ -6340,8 +6337,8 @@ trace_file_check(int metadata_write_strategy) if (H5AC_set_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) { nerrors++; - HDfprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank, + __func__); } } } /* end if */ @@ -6376,7 +6373,7 @@ trace_file_check(int metadata_write_strategy) if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) { nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); } if (nerrors == 0) { @@ -6384,8 +6381,8 @@ trace_file_check(int metadata_write_strategy) if (H5AC_get_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) { nerrors++; - HDfprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config() failed.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5AC_get_cache_auto_resize_config() failed.\n", world_mpi_rank, + __func__); } else { config.open_trace_file = FALSE; @@ -6394,8 +6391,8 @@ trace_file_check(int metadata_write_strategy) if (H5AC_set_cache_auto_resize_config(cache_ptr, &config) != SUCCEED) { nerrors++; - HDfprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5AC_set_cache_auto_resize_config() failed.\n", world_mpi_rank, + __func__); } } } /* end if */ @@ -6405,7 +6402,7 @@ trace_file_check(int metadata_write_strategy) nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); } } /* end if */ @@ -6414,8 +6411,8 @@ trace_file_check(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -6435,18 +6432,18 @@ trace_file_check(int metadata_write_strategy) if (!success) { nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); } } /* end if */ if (nerrors == 0) { HDsnprintf(trace_file_name, sizeof(trace_file_name), "t_cache_trace.txt.%d", (int)file_mpi_rank); - if ((trace_file_ptr = HDfopen(trace_file_name, "r")) == NULL) { + if ((trace_file_ptr = fopen(trace_file_name, "r")) == NULL) { nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: HDfopen failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: fopen failed.\n", world_mpi_rank, __func__); } } /* end if */ @@ -6474,22 +6471,22 @@ trace_file_check(int metadata_write_strategy) /* One ran out before the other - BADNESS */ nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank, - __func__, i); + fprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank, + __func__, i); if (expected_line_len == 0) { - HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__, - "<EMPTY>", expected_line_len); - HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__, - buffer, actual_line_len); + fprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__, + "<EMPTY>", expected_line_len); + fprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__, + buffer, actual_line_len); } if (actual_line_len == 0) { - HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__, - (*expected_output)[i], expected_line_len); - HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__, - "<EMPTY>", actual_line_len); + fprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__, + (*expected_output)[i], expected_line_len); + fprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__, + "<EMPTY>", actual_line_len); } } - HDfprintf(stdout, "BADNESS BADNESS BADNESS\n"); + fprintf(stdout, "BADNESS BADNESS BADNESS\n"); } } /* We directly compare the header line (line 0) */ @@ -6499,12 +6496,12 @@ trace_file_check(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank, - __func__, i); - HDfprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__, - (*expected_output)[i], expected_line_len); - HDfprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__, buffer, - actual_line_len); + fprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank, + __func__, i); + fprintf(stdout, "%d:%s: expected = \"%s\" %zu\n", world_mpi_rank, __func__, + (*expected_output)[i], expected_line_len); + fprintf(stdout, "%d:%s: actual = \"%s\" %zu\n", world_mpi_rank, __func__, buffer, + actual_line_len); } } } @@ -6520,11 +6517,11 @@ trace_file_check(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank, - __func__, i); - HDfprintf(stdout, "%d:%s: expected = \"%s\"\n", world_mpi_rank, __func__, - (*expected_output)[i]); - HDfprintf(stdout, "%d:%s: actual = \"%s\"\n", world_mpi_rank, __func__, tok); + fprintf(stdout, "%d:%s: Unexpected data in trace file line %d.\n", world_mpi_rank, + __func__, i); + fprintf(stdout, "%d:%s: expected = \"%s\"\n", world_mpi_rank, __func__, + (*expected_output)[i]); + fprintf(stdout, "%d:%s: actual = \"%s\"\n", world_mpi_rank, __func__, tok); } } } /* end else */ @@ -6617,7 +6614,7 @@ smoke_check_6(int metadata_write_strategy) /* some error occurred in the server -- report failure */ nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: server_main() failed.\n", world_mpi_rank, __func__); } } } @@ -6631,7 +6628,7 @@ smoke_check_6(int metadata_write_strategy) fid = -1; cache_ptr = NULL; if (verbose) { - HDfprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: setup_cache_for_test() failed.\n", world_mpi_rank, __func__); } } @@ -6651,14 +6648,14 @@ smoke_check_6(int metadata_write_strategy) if (TRUE != entry_ptr->header.coll_access) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Entry inserted not marked as collective.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: Entry inserted not marked as collective.\n", world_mpi_rank, + __func__); } } /* Make sure coll entries do not cross the 80% threshold */ H5_CHECK_OVERFLOW(cache_ptr->max_cache_size, size_t, double); - HDassert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); + assert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); } /* Restore collective metadata reads state */ H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag); @@ -6676,13 +6673,13 @@ smoke_check_6(int metadata_write_strategy) if (FALSE != entry_ptr->header.coll_access) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Entry inserted independently marked as collective.\n", - world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Entry inserted independently marked as collective.\n", + world_mpi_rank, __func__); } } /* Make sure coll entries do not cross the 80% threshold */ - HDassert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); + assert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); } /* Restore collective metadata reads state */ H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag); @@ -6691,7 +6688,7 @@ smoke_check_6(int metadata_write_strategy) if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Fflush() failed.\n", world_mpi_rank, __func__); } } @@ -6708,13 +6705,13 @@ smoke_check_6(int metadata_write_strategy) if (TRUE != entry_ptr->header.coll_access) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Entry protected not marked as collective.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: Entry protected not marked as collective.\n", world_mpi_rank, + __func__); } } /* Make sure coll entries do not cross the 80% threshold */ - HDassert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); + assert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); } /* Restore collective metadata reads state */ H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag); @@ -6732,13 +6729,13 @@ smoke_check_6(int metadata_write_strategy) if (FALSE != entry_ptr->header.coll_access) { nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: Entry inserted independently marked as collective.\n", - world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: Entry inserted independently marked as collective.\n", + world_mpi_rank, __func__); } } /* Make sure coll entries do not cross the 80% threshold */ - HDassert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); + assert((double)cache_ptr->max_cache_size * 0.8 > cache_ptr->coll_list_size); } /* Restore collective metadata reads state */ H5F_set_coll_metadata_reads(file_ptr, &md_reads_file_flag, &md_reads_context_flag); @@ -6753,7 +6750,7 @@ smoke_check_6(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: take_down_cache() failed.\n", world_mpi_rank, __func__); } } } @@ -6763,8 +6760,8 @@ smoke_check_6(int metadata_write_strategy) */ for (i = 0; i < NUM_DATA_ENTRIES; i++) { - HDassert(data_index[i] == i); - HDassert(!(data[i].dirty)); + assert(data_index[i] == i); + assert(!(data[i].dirty)); } /* compose the done message */ @@ -6786,7 +6783,7 @@ smoke_check_6(int metadata_write_strategy) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: send_mssg() failed on done.\n", world_mpi_rank, __func__); } } } @@ -6851,7 +6848,7 @@ main(int argc, char **argv) * calls. By then, MPI calls may not work. */ if (H5dont_atexit() < 0) - 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(); @@ -6862,32 +6859,32 @@ main(int argc, char **argv) virt_num_data_entries = STD_VIRT_NUM_DATA_ENTRIES; if (MAINPROCESS) { - HDprintf("===================================\n"); - HDprintf("Parallel metadata cache tests\n"); - HDprintf(" mpi_size = %d\n", mpi_size); - HDprintf(" express_test = %d\n", express_test); - HDprintf("===================================\n"); + printf("===================================\n"); + printf("Parallel metadata cache tests\n"); + printf(" mpi_size = %d\n", mpi_size); + printf(" express_test = %d\n", express_test); + printf("===================================\n"); } if (mpi_size < 3) { if (MAINPROCESS) - HDprintf(" Need at least 3 processes. Exiting.\n"); + printf(" Need at least 3 processes. Exiting.\n"); goto finish; } - if (NULL == (data = HDmalloc(NUM_DATA_ENTRIES * sizeof(*data)))) { - HDprintf(" Couldn't allocate data array. Exiting.\n"); + if (NULL == (data = malloc(NUM_DATA_ENTRIES * sizeof(*data)))) { + printf(" Couldn't allocate data array. Exiting.\n"); MPI_Abort(MPI_COMM_WORLD, -1); } - if (NULL == (data_index = HDmalloc(NUM_DATA_ENTRIES * sizeof(*data_index)))) { - HDprintf(" Couldn't allocate data index array. Exiting.\n"); + if (NULL == (data_index = malloc(NUM_DATA_ENTRIES * sizeof(*data_index)))) { + printf(" Couldn't allocate data index array. Exiting.\n"); MPI_Abort(MPI_COMM_WORLD, -1); } - HDmemset(filenames, 0, sizeof(filenames)); + 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); } } @@ -6907,13 +6904,13 @@ main(int argc, char **argv) if (FAIL == (fapl = H5Pcreate(H5P_FILE_ACCESS))) { nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: H5Pcreate() failed 1.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Pcreate() failed 1.\n", world_mpi_rank, __func__); } if (H5Pset_fapl_mpio(fapl, world_mpi_comm, MPI_INFO_NULL) < 0) { nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 1.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 1.\n", world_mpi_rank, __func__); } /* fix the file names */ @@ -6921,7 +6918,7 @@ main(int argc, char **argv) if (h5_fixname(FILENAME[u], fapl, filenames[u], PATH_MAX) == NULL) { nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: h5_fixname() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: h5_fixname() failed.\n", world_mpi_rank, __func__); break; } } @@ -6930,7 +6927,7 @@ main(int argc, char **argv) if (H5Pclose(fapl) < 0) { nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: H5Pclose() failed.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Pclose() failed.\n", world_mpi_rank, __func__); } /* now create the fapl again, excluding the server process. */ @@ -6940,13 +6937,13 @@ main(int argc, char **argv) if (FAIL == (fapl = H5Pcreate(H5P_FILE_ACCESS))) { nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: H5Pcreate() failed 2.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Pcreate() failed 2.\n", world_mpi_rank, __func__); } if (H5Pset_fapl_mpio(fapl, file_mpi_comm, MPI_INFO_NULL) < 0) { nerrors++; if (verbose) - HDfprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 2.\n", world_mpi_rank, __func__); + fprintf(stdout, "%d:%s: H5Pset_fapl_mpio() failed 2.\n", world_mpi_rank, __func__); } } @@ -6957,7 +6954,7 @@ main(int argc, char **argv) /* errors in setup -- no point in continuing */ if (world_mpi_rank == 0) - HDfprintf(stdout, "Errors in test initialization. Exiting.\n"); + fprintf(stdout, "Errors in test initialization. Exiting.\n"); goto finish; } @@ -6991,8 +6988,8 @@ main(int argc, char **argv) nerrors++; if (verbose) { - HDfprintf(stdout, "%d:%s: H5Pset_all_coll_metadata_ops() failed 1.\n", world_mpi_rank, - __func__); + fprintf(stdout, "%d:%s: H5Pset_all_coll_metadata_ops() failed 1.\n", world_mpi_rank, + __func__); } } } @@ -7008,9 +7005,9 @@ main(int argc, char **argv) finish: if (data_index) - HDfree(data_index); + free(data_index); if (data) - HDfree(data); + free(data); /* make sure all processes are finished before final report, cleanup * and exit. @@ -7021,14 +7018,14 @@ finish: MPI_Barrier(MPI_COMM_WORLD); if (MAINPROCESS) { /* only process 0 reports */ - HDprintf("===================================\n"); + printf("===================================\n"); if (nerrors || failures) { - HDprintf("***metadata cache tests detected %d failures***\n", nerrors + failures); + printf("***metadata cache tests detected %d failures***\n", nerrors + failures); } else { - HDprintf("metadata cache tests finished with no failures\n"); + printf("metadata cache tests finished with no failures\n"); } - HDprintf("===================================\n"); + printf("===================================\n"); } takedown_derived_types(); diff --git a/testpar/t_cache_image.c b/testpar/t_cache_image.c index 1e556d9..d8acd92 100644 --- a/testpar/t_cache_image.c +++ b/testpar/t_cache_image.c @@ -146,12 +146,12 @@ construct_test_file(int test_file_index) pass = TRUE; if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the file name */ if (pass) { - HDassert(FILENAMES[test_file_index]); + assert(FILENAMES[test_file_index]); if (h5_fixname(FILENAMES[test_file_index], H5P_DEFAULT, filename, sizeof(filename)) == NULL) { @@ -161,7 +161,7 @@ construct_test_file(int test_file_index) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 1) Create a HDF5 file with the cache image FAPL entry. * @@ -192,7 +192,7 @@ construct_test_file(int test_file_index) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 2) Create a data set in the file. */ @@ -213,7 +213,7 @@ construct_test_file(int test_file_index) #endif /* H5C_COLLECT_CACHE_STATS */ if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 3) Close the file. */ @@ -227,7 +227,7 @@ construct_test_file(int test_file_index) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); while ((pass) && (max_dset < MAX_NUM_DSETS)) { @@ -259,7 +259,7 @@ construct_test_file(int test_file_index) } if (show_progress) - HDfprintf(stdout, "%s:L1 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp, max_dset, pass); + fprintf(stdout, "%s:L1 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp, max_dset, pass); /* 5) Create a data set in the file. */ @@ -280,7 +280,7 @@ construct_test_file(int test_file_index) #endif /* H5C_COLLECT_CACHE_STATS */ if (show_progress) - HDfprintf(stdout, "%s:L2 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 1, max_dset, pass); + fprintf(stdout, "%s:L2 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 1, max_dset, pass); /* 6) Close the file. */ @@ -294,7 +294,7 @@ construct_test_file(int test_file_index) } if (show_progress) - HDfprintf(stdout, "%s:L3 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 2, max_dset, pass); + fprintf(stdout, "%s:L3 cp = %d, max_dset = %d, pass = %d.\n", fcn_name, cp + 2, max_dset, pass); } /* end while */ cp += 3; @@ -326,7 +326,7 @@ construct_test_file(int test_file_index) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 8) Open and close all data sets. * @@ -350,7 +350,7 @@ construct_test_file(int test_file_index) #endif /* H5C_COLLECT_CACHE_STATS */ if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 9) Close the file. */ @@ -412,11 +412,11 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) hsize_t chunk_size[2]; if (show_progress) - HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); + fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); - HDassert(0 <= min_dset); - HDassert(min_dset <= max_dset); - HDassert(max_dset < MAX_NUM_DSETS); + assert(0 <= min_dset); + assert(min_dset <= max_dset); + assert(max_dset < MAX_NUM_DSETS); /* create the datasets */ @@ -493,7 +493,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); + fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); /* create the mem space to be used to read and write chunks */ if (pass) { @@ -510,7 +510,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); + fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); /* select in memory hyperslab */ if (pass) { @@ -529,7 +529,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); + fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); /* initialize all datasets on a round robin basis */ i = 0; @@ -576,7 +576,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); + fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); /* read data from data sets and validate it */ i = 0; @@ -625,11 +625,11 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) if (verbose) { - HDfprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l, - data_chunk[k][l], - ((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l)); - HDfprintf(stdout, "m = %d, i = %d, j = %d, k = %d, l = %d\n", m, i, j, k, - l); + fprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l, + data_chunk[k][l], + ((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l)); + fprintf(stdout, "m = %d, i = %d, j = %d, k = %d, l = %d\n", m, i, j, k, + l); } } } @@ -642,7 +642,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) if (verbose) { - HDfprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, m); + fprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, m); } } } @@ -654,7 +654,7 @@ create_data_sets(hid_t file_id, int min_dset, int max_dset) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); + fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); /* close the file spaces */ i = min_dset; @@ -729,18 +729,18 @@ delete_data_sets(hid_t file_id, int min_dset, int max_dset) int cp = 0; int i; - if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); + if ( show_progress ) fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); - HDassert(0 <= min_dset); - HDassert(min_dset <= max_dset); - HDassert(max_dset < MAX_NUM_DSETS); + assert(0 <= min_dset); + assert(min_dset <= max_dset); + assert(max_dset < MAX_NUM_DSETS); - if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); + if ( show_progress ) fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); /* first, verify the contents of the target dataset(s) */ verify_data_sets(file_id, min_dset, max_dset); - if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); + if ( show_progress ) fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); /* now delete the target datasets */ if ( pass ) { @@ -761,7 +761,7 @@ delete_data_sets(hid_t file_id, int min_dset, int max_dset) } } - if ( show_progress ) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); + if ( show_progress ) fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); return; @@ -832,7 +832,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons H5AC_cache_image_config_t cache_image_config = {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, TRUE, FALSE, H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE}; - HDassert(!create_file || config_fsm); + assert(!create_file || config_fsm); if (pass) { /* opening the file both read only and with a cache image @@ -852,12 +852,12 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons } else if (verbose) { - HDfprintf(stdout, "%s: HDF file name = \"%s\".\n", fcn_name, hdf_file_name); + fprintf(stdout, "%s: HDF file name = \"%s\".\n", fcn_name, hdf_file_name); } } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* create a file access property list. */ if (pass) { @@ -872,7 +872,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* call H5Pset_libver_bounds() on the fapl_id */ if (pass) { @@ -885,7 +885,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* get metadata cache image config -- verify that it is the default */ if (pass) { @@ -909,7 +909,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* set metadata cache image fapl entry if indicated */ if ((pass) && (set_mdci_fapl)) { @@ -929,7 +929,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the persistent free space manager if indicated */ if ((pass) && (config_fsm)) { @@ -961,7 +961,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the page buffer if indicated */ if ((pass) && (enable_page_buffer)) { @@ -974,7 +974,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ((pass) && (l_facc_type == FACC_MPIO)) { @@ -987,7 +987,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ((pass) && (l_facc_type == FACC_MPIO)) { @@ -999,7 +999,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ((pass) && (l_facc_type == FACC_MPIO)) { @@ -1011,7 +1011,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ((pass) && (l_facc_type == FACC_MPIO)) { @@ -1036,7 +1036,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* open the file */ if (pass) { @@ -1076,14 +1076,14 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons failure_mssg = "Can't get file_ptr."; if (verbose) { - HDfprintf(stdout, "%s: Can't get file_ptr.\n", fcn_name); + fprintf(stdout, "%s: Can't get file_ptr.\n", fcn_name); } } } } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* get a pointer to the files internal data structure and then * to the cache structure @@ -1102,7 +1102,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* verify expected page buffer status. At present, page buffering * must be disabled in parallel -- hopefully this will change in the @@ -1124,7 +1124,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* verify expected metadata cache status */ @@ -1143,7 +1143,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if (pass) { @@ -1186,7 +1186,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if ((pass) && (set_mdci_fapl)) { @@ -1200,7 +1200,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if (pass) { @@ -1240,7 +1240,7 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if (pass) { @@ -1250,10 +1250,10 @@ open_hdf5_file(const hbool_t create_file, const hbool_t mdci_sbem_expected, cons } if (show_progress) { - HDfprintf(stdout, "%s: cp = %d, pass = %d -- exiting.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d -- exiting.\n", fcn_name, cp++, pass); if (!pass) - HDfprintf(stdout, "%s: failure_mssg = %s\n", fcn_name, failure_mssg); + fprintf(stdout, "%s: failure_mssg = %s\n", fcn_name, failure_mssg); } return; @@ -1308,8 +1308,8 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", dset_num); if (show_progress) { - HDfprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name); - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); } if (pass) { @@ -1328,7 +1328,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* set the dataset creation plist to specify that the raw data is * to be partitioned into 1X10X10 element chunks. @@ -1346,7 +1346,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if (pass) { @@ -1362,7 +1362,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* create the dataset */ if (pass) { @@ -1378,7 +1378,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* get the file space ID */ if (pass) { @@ -1393,7 +1393,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* create the mem space to be used to read and write chunks */ if (pass) { @@ -1411,7 +1411,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* select in memory hyperslab */ if (pass) { @@ -1432,7 +1432,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the DXPL for collective I/O */ if (pass) { @@ -1447,7 +1447,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if (pass) { @@ -1459,7 +1459,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* initialize the dataset with collective writes */ i = 0; @@ -1468,7 +1468,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) while ((pass) && (j < DSET_SIZE)) { if (show_progress) - HDfprintf(stdout, "%s: cp = %d.0, pass = %d.\n", fcn_name, cp, pass); + fprintf(stdout, "%s: cp = %d.0, pass = %d.\n", fcn_name, cp, pass); /* initialize the slab */ for (k = 0; k < CHUNK_SIZE; k++) { @@ -1479,7 +1479,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d.1, pass = %d.\n", fcn_name, cp, pass); + fprintf(stdout, "%s: cp = %d.1, pass = %d.\n", fcn_name, cp, pass); /* select on disk hyperslab */ offset[0] = (hsize_t)mpi_rank; /* offset of hyperslab in file */ @@ -1497,7 +1497,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d.2, pass = %d.\n", fcn_name, cp, pass); + fprintf(stdout, "%s: cp = %d.2, pass = %d.\n", fcn_name, cp, pass); /* write the chunk to file */ status = H5Dwrite(dset_id, H5T_NATIVE_INT, memspace_id, filespace_id, dxpl_id, data_chunk); @@ -1509,7 +1509,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d.3, pass = %d.\n", fcn_name, cp, pass); + fprintf(stdout, "%s: cp = %d.3, pass = %d.\n", fcn_name, cp, pass); j += CHUNK_SIZE; } @@ -1519,7 +1519,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) cp++; if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* read data from data sets and validate it */ i = 0; @@ -1567,12 +1567,12 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) if (verbose) { - HDfprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l, - data_chunk[0][k][l], - ((DSET_SIZE * DSET_SIZE * mpi_rank) + (DSET_SIZE * (i + k)) + j + - l + dset_num)); - HDfprintf(stdout, "dset_num = %d, i = %d, j = %d, k = %d, l = %d\n", dset_num, - i, j, k, l); + fprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l, + data_chunk[0][k][l], + ((DSET_SIZE * DSET_SIZE * mpi_rank) + (DSET_SIZE * (i + k)) + j + l + + dset_num)); + fprintf(stdout, "dset_num = %d, i = %d, j = %d, k = %d, l = %d\n", dset_num, + i, j, k, l); } } } @@ -1585,7 +1585,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) if (verbose) { - HDfprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, dset_num); + fprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, dset_num); } } } @@ -1595,7 +1595,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* close the data space */ if ((pass) && (H5Sclose(dataspace_id) < 0)) { @@ -1640,7 +1640,7 @@ par_create_dataset(int dset_num, hid_t file_id, int mpi_rank, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); return; @@ -1677,8 +1677,8 @@ par_delete_dataset(int dset_num, hid_t file_id, int mpi_rank) HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", dset_num); if (show_progress) { - HDfprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name); - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); } /* verify the target dataset */ @@ -1688,7 +1688,7 @@ par_delete_dataset(int dset_num, hid_t file_id, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* delete the target dataset */ if (pass) { @@ -1701,7 +1701,7 @@ par_delete_dataset(int dset_num, hid_t file_id, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); return; @@ -1739,9 +1739,9 @@ par_insert_cache_image(int file_name_idx, int mpi_rank, int mpi_size) if (mpi_rank == 0) { /* insert cache image in supplied test file */ if (!serial_insert_cache_image(file_name_idx, mpi_size)) { - HDfprintf(stderr, "\n\nCache image insertion failed.\n"); - HDfprintf(stderr, " failure mssg = \"%s\"\n", failure_mssg); - HDexit(EXIT_FAILURE); + fprintf(stderr, "\n\nCache image insertion failed.\n"); + fprintf(stderr, " failure mssg = \"%s\"\n", failure_mssg); + exit(EXIT_FAILURE); } } } @@ -1802,8 +1802,8 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank) HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", dset_num); if (show_progress) { - HDfprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name); - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); } if (pass) { @@ -1832,7 +1832,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* create the mem space to be used to read */ if (pass) { @@ -1850,7 +1850,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* select in memory hyperslab */ if (pass) { @@ -1871,7 +1871,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the DXPL for collective I/O */ if (pass) { @@ -1886,7 +1886,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if (pass) { @@ -1898,7 +1898,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* read data from data sets and validate it */ i = 0; @@ -1946,12 +1946,12 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank) if (verbose) { - HDfprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l, - data_chunk[0][k][l], - ((DSET_SIZE * DSET_SIZE * mpi_rank) + (DSET_SIZE * (i + k)) + j + - l + dset_num)); - HDfprintf(stdout, "dset_num = %d, i = %d, j = %d, k = %d, l = %d\n", dset_num, - i, j, k, l); + fprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l, + data_chunk[0][k][l], + ((DSET_SIZE * DSET_SIZE * mpi_rank) + (DSET_SIZE * (i + k)) + j + l + + dset_num)); + fprintf(stdout, "dset_num = %d, i = %d, j = %d, k = %d, l = %d\n", dset_num, + i, j, k, l); } } } @@ -1964,7 +1964,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank) if (verbose) { - HDfprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, dset_num); + fprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, dset_num); } } } @@ -1974,7 +1974,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* close the file space */ if ((pass) && (H5Sclose(filespace_id) < 0)) { @@ -2005,7 +2005,7 @@ par_verify_dataset(int dset_num, hid_t file_id, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); return; @@ -2048,22 +2048,22 @@ serial_insert_cache_image(int file_name_idx, int mpi_size) pass = TRUE; if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 1) setup the file name */ if (pass) { - HDassert(FILENAMES[file_name_idx]); + assert(FILENAMES[file_name_idx]); if (h5_fixname(FILENAMES[file_name_idx], H5P_DEFAULT, filename, sizeof(filename)) == NULL) { pass = FALSE; - HDfprintf(stdout, "h5_fixname() failed.\n"); + fprintf(stdout, "h5_fixname() failed.\n"); } } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 2) Open the PHDF5 file with the cache image FAPL entry. */ @@ -2090,7 +2090,7 @@ serial_insert_cache_image(int file_name_idx, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 3) Validate contents of the file */ @@ -2102,7 +2102,7 @@ serial_insert_cache_image(int file_name_idx, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 4) Close the file */ @@ -2116,7 +2116,7 @@ serial_insert_cache_image(int file_name_idx, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); return pass; @@ -2162,8 +2162,8 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size) HDsnprintf(dset_name, sizeof(dset_name), "/dset%03d", dset_num); if (show_progress) { - HDfprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name); - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: dset name = \"%s\".\n", fcn_name, dset_name); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); } if (pass) { @@ -2192,7 +2192,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* create the mem space to be used to read */ if (pass) { @@ -2210,7 +2210,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* select in memory hyperslab */ if (pass) { @@ -2231,7 +2231,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* read data from data sets and validate it */ i = 0; @@ -2283,13 +2283,12 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size) if (verbose) { - HDfprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", j, k, - data_chunk[0][j][k], - ((DSET_SIZE * DSET_SIZE * i) + (DSET_SIZE * (j + l)) + k + m + - dset_num)); - HDfprintf(stdout, - "dset_num = %d, i = %d, j = %d, k = %d, l = %d, m = %d\n", - dset_num, i, j, k, l, m); + fprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", j, k, + data_chunk[0][j][k], + ((DSET_SIZE * DSET_SIZE * i) + (DSET_SIZE * (j + l)) + k + m + + dset_num)); + fprintf(stdout, "dset_num = %d, i = %d, j = %d, k = %d, l = %d, m = %d\n", + dset_num, i, j, k, l, m); } } } @@ -2302,7 +2301,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size) if (verbose) { - HDfprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", j, k, dset_num); + fprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", j, k, dset_num); } } } @@ -2314,7 +2313,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* close the file space */ if ((pass) && (H5Sclose(filespace_id) < 0)) { @@ -2338,7 +2337,7 @@ serial_verify_dataset(int dset_num, hid_t file_id, int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); return; @@ -2388,11 +2387,11 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) hsize_t offset[2]; if (show_progress) - HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); + fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); - HDassert(0 <= min_dset); - HDassert(min_dset <= max_dset); - HDassert(max_dset < MAX_NUM_DSETS); + assert(0 <= min_dset); + assert(min_dset <= max_dset); + assert(max_dset < MAX_NUM_DSETS); /* open the datasets */ @@ -2431,7 +2430,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); + fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); /* create the mem space to be used to read and write chunks */ if (pass) { @@ -2448,7 +2447,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); + fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); /* select in memory hyperslab */ if (pass) { @@ -2467,7 +2466,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); + fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); /* read data from data sets and validate it */ i = 0; @@ -2516,11 +2515,11 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) if (verbose) { - HDfprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l, - data_chunk[k][l], - ((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l)); - HDfprintf(stdout, "m = %d, i = %d, j = %d, k = %d, l = %d\n", m, i, j, k, - l); + fprintf(stdout, "data_chunk[%0d][%0d] = %0d, expect %0d.\n", k, l, + data_chunk[k][l], + ((DSET_SIZE * DSET_SIZE * m) + (DSET_SIZE * (i + k)) + j + l)); + fprintf(stdout, "m = %d, i = %d, j = %d, k = %d, l = %d\n", m, i, j, k, + l); } } } @@ -2533,7 +2532,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) if (verbose) { - HDfprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, m); + fprintf(stdout, "Chunk (%0d, %0d) in /dset%03d is invalid.\n", i, j, m); } } } @@ -2545,7 +2544,7 @@ verify_data_sets(hid_t file_id, int min_dset, int max_dset) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); + fprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); /* close the file spaces */ i = min_dset; @@ -2660,7 +2659,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) show_progress = ((show_progress) && (mpi_rank == 0)); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the file name */ if (pass) { @@ -2673,7 +2672,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 1) Open the test file created at the beginning of this test. * @@ -2702,7 +2701,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 2) Verify that the file contains the expected data. * @@ -2731,7 +2730,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) #endif /* H5C_COLLECT_CACHE_STATS */ if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* Verify that all other processes receive the cache image block * from process 0. @@ -2752,7 +2751,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) #endif /* H5C_COLLECT_CACHE_STATS */ if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 3) Close the file. */ @@ -2766,7 +2765,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 4) Open the file, and verify that it doesn't contain a cache image. */ @@ -2792,7 +2791,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5) Verify that the file contains the expected data. */ @@ -2824,7 +2823,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* report results */ if (mpi_rank == 0) { @@ -2838,7 +2837,7 @@ verify_cache_image_RO(int file_name_id, int md_write_strat, int mpi_rank) H5_FAILED(); if (show_progress) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } } } @@ -2923,7 +2922,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) show_progress = ((show_progress) && (mpi_rank == 0)); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the file name */ if (pass) { @@ -2936,7 +2935,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 1) Open the test file created at the beginning of this test. * @@ -2970,7 +2969,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 2) Verify that the file contains the expected data. * @@ -2998,7 +2997,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) #endif /* H5C_COLLECT_CACHE_STATS */ if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* Verify that all other processes receive the cache image block * from process 0. @@ -3019,7 +3018,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) #endif /* H5C_COLLECT_CACHE_STATS */ if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 3) Close the file. */ @@ -3033,7 +3032,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 4) Open the file, and verify that it doesn't contain a cache image. */ @@ -3059,7 +3058,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5) Verify that the file contains the expected data. */ @@ -3091,7 +3090,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 7) Delete the file. */ @@ -3119,7 +3118,7 @@ verify_cache_image_RW(int file_name_id, int md_write_strat, int mpi_rank) H5_FAILED(); if (show_progress) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } } } @@ -3175,12 +3174,12 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) } if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the file name */ if (pass) { - HDassert(FILENAMES[test_file_index]); + assert(FILENAMES[test_file_index]); if (h5_fixname(FILENAMES[test_file_index], H5P_DEFAULT, filename, sizeof(filename)) == NULL) { @@ -3190,7 +3189,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) } if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 1) Create a PHDF5 file without the cache image FAPL entry. * @@ -3219,7 +3218,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) } if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 2) Create datasets in the file */ @@ -3231,7 +3230,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) } if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 3) Verify the datasets in the file */ @@ -3254,7 +3253,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) } if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5 Insert a cache image into the file */ @@ -3264,7 +3263,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) } if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 6) Open the file R/O */ @@ -3290,7 +3289,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) } if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 7) Verify the datasets in the file backwards * @@ -3308,7 +3307,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) } if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* Verify that only process 0 reads the cache image. */ #if H5C_COLLECT_CACHE_STATS @@ -3324,7 +3323,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) #endif /* H5C_COLLECT_CACHE_STATS */ if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* Verify that all other processes receive the cache image block * from process 0. @@ -3345,7 +3344,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) #endif /* H5C_COLLECT_CACHE_STATS */ if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 8) Close the file */ @@ -3359,7 +3358,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) } if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 9) Open the file */ @@ -3385,7 +3384,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) } if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 10) Verify the datasets in the file * @@ -3403,7 +3402,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) } if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* Verify that only process 0 reads the cache image. */ #if H5C_COLLECT_CACHE_STATS @@ -3419,7 +3418,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) #endif /* H5C_COLLECT_CACHE_STATS */ if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* Verify that all other processes receive the cache image block * from process 0. @@ -3440,7 +3439,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) #endif /* H5C_COLLECT_CACHE_STATS */ if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 11) Delete the datasets in the file */ @@ -3452,7 +3451,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) } if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 12) Close the file */ @@ -3466,7 +3465,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) } if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 13) Get the size of the file. Verify that it is less * than 20 KB. Without deletions and persistent free @@ -3492,7 +3491,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) } if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 14) Delete the file */ @@ -3509,7 +3508,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) } if ((mpi_rank == 0) && (show_progress)) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* report results */ if (mpi_rank == 0) { @@ -3522,7 +3521,7 @@ smoke_check_1(MPI_Comm mpi_comm, MPI_Info mpi_info, int mpi_rank, int mpi_size) H5_FAILED(); - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } } @@ -3573,46 +3572,46 @@ main(int argc, char **argv) * calls. By then, MPI calls may not work. */ if (H5dont_atexit() < 0) - 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(); if (mpi_rank == 0) { - HDprintf("===================================\n"); - HDprintf("Parallel metadata cache image tests\n"); - HDprintf(" mpi_size = %d\n", mpi_size); - HDprintf("===================================\n"); + printf("===================================\n"); + printf("Parallel metadata cache image tests\n"); + printf(" mpi_size = %d\n", mpi_size); + printf("===================================\n"); } if (mpi_size < 2) { if (mpi_rank == 0) - HDprintf(" Need at least 2 processes. Exiting.\n"); + printf(" Need at least 2 processes. Exiting.\n"); goto finish; } if (mpi_rank == 0) { /* create test files */ int i; - HDfprintf(stdout, "Constructing test files: \n"); - HDfflush(stdout); + fprintf(stdout, "Constructing test files: \n"); + fflush(stdout); i = 0; while ((FILENAMES[i] != NULL) && (i < TEST_FILES_TO_CONSTRUCT)) { - HDfprintf(stdout, " writing %s ... ", FILENAMES[i]); - HDfflush(stdout); + fprintf(stdout, " writing %s ... ", FILENAMES[i]); + fflush(stdout); construct_test_file(i); if (pass) { - HDprintf("done.\n"); - HDfflush(stdout); + printf("done.\n"); + fflush(stdout); } else { - HDprintf("failed.\n"); - HDexit(EXIT_FAILURE); + printf("failed.\n"); + exit(EXIT_FAILURE); } i++; } - HDfprintf(stdout, "Test file construction complete.\n"); + fprintf(stdout, "Test file construction complete.\n"); } /* can't start test until test files exist */ @@ -3632,12 +3631,12 @@ finish: MPI_Barrier(MPI_COMM_WORLD); if (mpi_rank == 0) { /* only process 0 reports */ - HDprintf("===================================\n"); + printf("===================================\n"); if (nerrs > 0) - HDprintf("***metadata cache image tests detected %d failures***\n", nerrs); + printf("***metadata cache image tests detected %d failures***\n", nerrs); else - HDprintf("metadata cache image tests finished with no failures\n"); - HDprintf("===================================\n"); + printf("metadata cache image tests finished with no failures\n"); + printf("===================================\n"); } /* close HDF5 library */ diff --git a/testpar/t_chunk_alloc.c b/testpar/t_chunk_alloc.c index ac5b90b..a6be482 100644 --- a/testpar/t_chunk_alloc.c +++ b/testpar/t_chunk_alloc.c @@ -112,7 +112,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; @@ -229,7 +229,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]; @@ -263,7 +263,7 @@ parallel_access_dataset(const char *filename, int chunk_factor, access_type acti case open_only: break; default: - HDassert(0); + assert(0); } /* Close up */ @@ -361,7 +361,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]; @@ -387,7 +387,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 */ @@ -455,7 +455,7 @@ test_chunk_alloc(void) filename = (const char *)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/t_coll_chunk.c b/testpar/t_coll_chunk.c index da8d69e..b44d7ef 100644 --- a/testpar/t_coll_chunk.c +++ b/testpar/t_coll_chunk.c @@ -600,7 +600,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap dims[1] = SPACE_DIM2; /* allocate memory for data buffer */ - data_array1 = (int *)HDmalloc(dims[0] * dims[1] * sizeof(int)); + data_array1 = (int *)malloc(dims[0] * dims[1] * sizeof(int)); VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* set up dimensions of the slab this process accesses */ @@ -608,7 +608,7 @@ coll_chunktest(const char *filename, int chunk_factor, int select_factor, int ap /* set up the coords array selection */ num_points = block[0] * block[1] * count[0] * count[1]; - coords = (hsize_t *)HDmalloc(num_points * RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc(num_points * RANK * sizeof(hsize_t)); VRFY((coords != NULL), "coords malloc succeeded"); point_set(start, count, stride, block, num_points, coords, mode); @@ -875,16 +875,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); @@ -1009,11 +1009,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 */ @@ -1110,12 +1110,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])); } } @@ -1168,20 +1168,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"); } } @@ -1198,14 +1198,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); } @@ -1228,8 +1228,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)); } } } @@ -1237,8 +1237,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/t_coll_md.c b/testpar/t_coll_md.c index cc32d01..1220111 100644 --- a/testpar/t_coll_md.c +++ b/testpar/t_coll_md.c @@ -99,7 +99,7 @@ test_partial_no_selection_coll_md_read(void) file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id); VRFY((file_id >= 0), "H5Fcreate succeeded"); - dataset_dims = HDmalloc(PARTIAL_NO_SELECTION_DATASET_NDIMS * sizeof(*dataset_dims)); + dataset_dims = malloc(PARTIAL_NO_SELECTION_DATASET_NDIMS * sizeof(*dataset_dims)); VRFY((dataset_dims != NULL), "malloc succeeded"); dataset_dims[0] = (hsize_t)PARTIAL_NO_SELECTION_Y_DIM_SCALE * (hsize_t)mpi_size; @@ -145,8 +145,8 @@ test_partial_no_selection_coll_md_read(void) mspace_id = H5Screate_simple(1, sel_dims, NULL); VRFY((mspace_id >= 0), "H5Screate_simple succeeded"); - data = HDcalloc(1, count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) * - sizeof(int)); + data = calloc(1, count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) * + sizeof(int)); VRFY((data != NULL), "calloc succeeded"); dxpl_id = H5Pcreate(H5P_DATASET_XFER); @@ -169,8 +169,8 @@ test_partial_no_selection_coll_md_read(void) VRFY((H5Pset_dxpl_mpio_chunk_opt(dxpl_id, H5FD_MPIO_CHUNK_ONE_IO) >= 0), "H5Pset_dxpl_mpio_chunk_opt succeeded"); - read_buf = HDmalloc(count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) * - sizeof(int)); + read_buf = malloc(count[1] * (PARTIAL_NO_SELECTION_Y_DIM_SCALE * PARTIAL_NO_SELECTION_X_DIM_SCALE) * + sizeof(int)); VRFY((read_buf != NULL), "malloc succeeded"); /* @@ -191,24 +191,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; } @@ -319,13 +319,13 @@ test_multi_chunk_io_addrmap_issue(void) VRFY((H5Fflush(file_id, H5F_SCOPE_GLOBAL) >= 0), "H5Fflush succeeded"); - read_buf = HDmalloc(50 * sizeof(int)); + read_buf = malloc(50 * sizeof(int)); VRFY((read_buf != NULL), "malloc succeeded"); VRFY((H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "H5Dread succeeded"); if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } @@ -439,7 +439,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); @@ -462,7 +462,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), @@ -482,12 +482,12 @@ test_link_chunk_io_sort_chunk_issue(void) "H5Dread succeeded"); if (data) { - HDfree(data); + free(data); data = NULL; } if (read_buf) { - HDfree(read_buf); + free(read_buf); read_buf = NULL; } diff --git a/testpar/t_dset.c b/testpar/t_dset.c index d144235..80ef5b3 100644 --- a/testpar/t_dset.c +++ b/testpar/t_dset.c @@ -56,7 +56,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. */ @@ -69,7 +69,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 */ @@ -82,7 +82,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 */ @@ -95,11 +95,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]; @@ -109,16 +109,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])); } } @@ -155,15 +155,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; } } @@ -198,19 +198,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"); } } @@ -226,14 +226,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); } @@ -242,9 +242,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++; @@ -252,9 +252,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); } @@ -295,15 +295,15 @@ dataset_writeInd(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Independent write test on file %s\n", filename); + printf("Independent write test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* ---------------------------------------- * CREATE AN HDF5 FILE WITH PARALLEL ACCESS @@ -370,7 +370,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"); @@ -405,7 +405,7 @@ dataset_writeInd(void) /* release data buffers */ if (data_array1) - HDfree(data_array1); + free(data_array1); } /* Example of using the parallel HDF5 library to read a dataset */ @@ -433,17 +433,17 @@ dataset_readInd(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Independent read test on file %s\n", filename); + printf("Independent read test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); - data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded"); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); + data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded"); /* setup file access template */ acc_tpl = create_faccess_plist(comm, info, facc_type); @@ -513,9 +513,9 @@ dataset_readInd(void) /* release data buffers */ if (data_array1) - HDfree(data_array1); + free(data_array1); if (data_origin1) - HDfree(data_origin1); + free(data_origin1); } /* @@ -563,7 +563,7 @@ dataset_writeAll(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Collective write test on file %s\n", filename); + printf("Collective write test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -571,12 +571,12 @@ dataset_writeAll(void) /* set up the coords array selection */ num_points = (size_t)dim1; - coords = (hsize_t *)HDmalloc((size_t)dim1 * (size_t)RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc((size_t)dim1 * (size_t)RANK * sizeof(hsize_t)); VRFY((coords != NULL), "coords malloc succeeded"); /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* ------------------- * START AN HDF5 FILE @@ -682,7 +682,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"); @@ -747,7 +747,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"); @@ -887,7 +887,7 @@ dataset_writeAll(void) if (data_array1) free(data_array1); - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); block[0] = 1; @@ -1036,9 +1036,9 @@ dataset_writeAll(void) /* release data buffers */ if (coords) - HDfree(coords); + free(coords); if (data_array1) - HDfree(data_array1); + free(data_array1); } /* @@ -1079,7 +1079,7 @@ dataset_readAll(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Collective read test on file %s\n", filename); + printf("Collective read test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -1087,14 +1087,14 @@ dataset_readAll(void) /* set up the coords array selection */ num_points = (size_t)dim1; - coords = (hsize_t *)HDmalloc((size_t)dim0 * (size_t)dim1 * RANK * sizeof(hsize_t)); + coords = (hsize_t *)malloc((size_t)dim0 * (size_t)dim1 * RANK * sizeof(hsize_t)); VRFY((coords != NULL), "coords malloc succeeded"); /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); - data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded"); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); + data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded"); /* ------------------- * OPEN AN HDF5 FILE @@ -1176,7 +1176,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"); @@ -1243,7 +1243,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"); @@ -1270,9 +1270,9 @@ dataset_readAll(void) free(data_array1); if (data_origin1) free(data_origin1); - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); - data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded"); block[0] = 1; @@ -1331,7 +1331,7 @@ dataset_readAll(void) if (data_array1) free(data_array1); - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* Dataset6: point selection in File - Point selection in Memory*/ @@ -1377,7 +1377,7 @@ dataset_readAll(void) if (data_array1) free(data_array1); - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* Dataset7: point selection in memory - All selection in file*/ @@ -1445,11 +1445,11 @@ dataset_readAll(void) /* release data buffers */ if (coords) - HDfree(coords); + free(coords); if (data_array1) - HDfree(data_array1); + free(data_array1); if (data_origin1) - HDfree(data_origin1); + free(data_origin1); } /* @@ -1493,7 +1493,7 @@ extend_writeInd(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Extend independent write test on file %s\n", filename); + printf("Extend independent write test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -1504,8 +1504,8 @@ extend_writeInd(void) chunk_dims[1] = (hsize_t)chunkdim1; /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* ------------------- * START AN HDF5 FILE @@ -1545,7 +1545,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); @@ -1676,7 +1676,7 @@ extend_writeInd(void) /* release data buffers */ if (data_array1) - HDfree(data_array1); + free(data_array1); } /* @@ -1708,7 +1708,7 @@ extend_writeInd2(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Extend independent write test #2 on file %s\n", filename); + printf("Extend independent write test #2 on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -1765,8 +1765,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"); @@ -1778,15 +1778,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"); } /* ------------------------- @@ -1809,8 +1809,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"); @@ -1824,15 +1824,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 */ @@ -1871,19 +1871,19 @@ extend_readInd(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Extend independent read test on file %s\n", filename); + printf("Extend independent read test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); - data_array2 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array2 != NULL), "data_array2 HDmalloc succeeded"); - data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded"); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); + data_array2 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array2 != NULL), "data_array2 malloc succeeded"); + data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded"); /* ------------------- * OPEN AN HDF5 FILE @@ -2003,11 +2003,11 @@ extend_readInd(void) /* release data buffers */ if (data_array1) - HDfree(data_array1); + free(data_array1); if (data_array2) - HDfree(data_array2); + free(data_array2); if (data_origin1) - HDfree(data_origin1); + free(data_origin1); } /* @@ -2052,7 +2052,7 @@ extend_writeAll(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Extend independent write test on file %s\n", filename); + printf("Extend independent write test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -2063,8 +2063,8 @@ extend_writeAll(void) chunk_dims[1] = (hsize_t)chunkdim1; /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); /* ------------------- * START AN HDF5 FILE @@ -2104,7 +2104,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); @@ -2258,7 +2258,7 @@ extend_writeAll(void) /* release data buffers */ if (data_array1) - HDfree(data_array1); + free(data_array1); } /* Example of using the parallel HDF5 library to read an extendible dataset */ @@ -2289,19 +2289,19 @@ extend_readAll(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Extend independent read test on file %s\n", filename); + printf("Extend independent read test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* allocate memory for data buffer */ - data_array1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array1 != NULL), "data_array1 HDmalloc succeeded"); - data_array2 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_array2 != NULL), "data_array2 HDmalloc succeeded"); - data_origin1 = (DATATYPE *)HDmalloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); - VRFY((data_origin1 != NULL), "data_origin1 HDmalloc succeeded"); + data_array1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array1 != NULL), "data_array1 malloc succeeded"); + data_array2 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_array2 != NULL), "data_array2 malloc succeeded"); + data_origin1 = (DATATYPE *)malloc((size_t)dim0 * (size_t)dim1 * sizeof(DATATYPE)); + VRFY((data_origin1 != NULL), "data_origin1 malloc succeeded"); /* ------------------- * OPEN AN HDF5 FILE @@ -2443,11 +2443,11 @@ extend_readAll(void) /* release data buffers */ if (data_array1) - HDfree(data_array1); + free(data_array1); if (data_array2) - HDfree(data_array2); + free(data_array2); if (data_origin1) - HDfree(data_origin1); + free(data_origin1); } /* @@ -2479,17 +2479,17 @@ compress_readAll(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Collective chunked dataset read test on file %s\n", filename); + printf("Collective chunked dataset read test on file %s\n", filename); /* Retrieve MPI parameters */ MPI_Comm_size(comm, &mpi_size); MPI_Comm_rank(comm, &mpi_rank); /* Allocate data buffer */ - data_orig = (DATATYPE *)HDmalloc((size_t)dim * sizeof(DATATYPE)); - VRFY((data_orig != NULL), "data_origin1 HDmalloc succeeded"); - data_read = (DATATYPE *)HDmalloc((size_t)dim * sizeof(DATATYPE)); - VRFY((data_read != NULL), "data_array1 HDmalloc succeeded"); + data_orig = (DATATYPE *)malloc((size_t)dim * sizeof(DATATYPE)); + VRFY((data_orig != NULL), "data_origin1 malloc succeeded"); + data_read = (DATATYPE *)malloc((size_t)dim * sizeof(DATATYPE)); + VRFY((data_read != NULL), "data_array1 malloc succeeded"); /* Initialize data buffers */ for (u = 0; u < dim; u++) @@ -2599,8 +2599,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++; } @@ -2622,9 +2622,9 @@ compress_readAll(void) /* release data buffers */ if (data_read) - HDfree(data_read); + free(data_read); if (data_orig) - HDfree(data_orig); + free(data_orig); } #endif /* H5_HAVE_FILTER_DEFLATE */ @@ -2671,7 +2671,7 @@ none_selection_chunk(void) filename = GetTestParameters(); if (VERBOSE_MED) - HDprintf("Extend independent write test on file %s\n", filename); + printf("Extend independent write test on file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -2702,7 +2702,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); @@ -2735,11 +2735,11 @@ none_selection_chunk(void) /* allocate memory for data buffer. Only allocate enough buffer for * each processor's data. */ if (mpi_rank) { - data_origin = (DATATYPE *)HDmalloc(block[0] * block[1] * sizeof(DATATYPE)); - VRFY((data_origin != NULL), "data_origin HDmalloc succeeded"); + data_origin = (DATATYPE *)malloc(block[0] * block[1] * sizeof(DATATYPE)); + VRFY((data_origin != NULL), "data_origin malloc succeeded"); - data_array = (DATATYPE *)HDmalloc(block[0] * block[1] * sizeof(DATATYPE)); - VRFY((data_array != NULL), "data_array HDmalloc succeeded"); + data_array = (DATATYPE *)malloc(block[0] * block[1] * sizeof(DATATYPE)); + VRFY((data_array != NULL), "data_array malloc succeeded"); /* put some trivial data in the data_array */ mstart[0] = mstart[1] = 0; @@ -2834,9 +2834,9 @@ none_selection_chunk(void) /* release data buffers */ if (data_origin) - HDfree(data_origin); + free(data_origin); if (data_array) - HDfree(data_array); + free(data_array); } /* Function: test_actual_io_mode @@ -2966,13 +2966,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 *)GetTestParameters(); - HDassert(filename != NULL); + assert(filename != NULL); /* Setup the file access template */ fapl = create_faccess_plist(mpi_comm, mpi_info, facc_type); @@ -3183,8 +3183,8 @@ test_actual_io_mode(int selection_mode) length = dim0 * dim1; /* Allocate and initialize the buffer */ - buffer = (int *)HDmalloc(sizeof(int) * (size_t)length); - VRFY((buffer != NULL), "HDmalloc of buffer succeeded"); + buffer = (int *)malloc(sizeof(int) * (size_t)length); + VRFY((buffer != NULL), "malloc of buffer succeeded"); for (i = 0; i < length; i++) buffer[i] = i; @@ -3268,8 +3268,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 @@ -3334,7 +3334,7 @@ test_actual_io_mode(int selection_mode) VRFY((ret >= 0), "H5Sclose succeeded"); ret = H5Fclose(fid); VRFY((ret >= 0), "H5Fclose succeeded"); - HDfree(buffer); + free(buffer); return; } @@ -3381,7 +3381,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); @@ -3490,7 +3490,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; @@ -3532,7 +3532,7 @@ test_no_collective_cause_mode(int selection_mode) } filename = (const char *)GetTestParameters(); - HDassert(filename != NULL); + assert(filename != NULL); /* Setup the file access template */ fapl = create_faccess_plist(mpi_comm, mpi_info, l_facc_type); @@ -3647,8 +3647,8 @@ test_no_collective_cause_mode(int selection_mode) H5_CHECKED_ASSIGN(length, int, dims[0] * dims[1], uint64_t); /* Allocate and initialize the buffer */ - buffer = (int *)HDmalloc(sizeof(int) * (size_t)length); - VRFY((buffer != NULL), "HDmalloc of buffer succeeded"); + buffer = (int *)malloc(sizeof(int) * (size_t)length); + VRFY((buffer != NULL), "malloc of buffer succeeded"); for (i = 0; i < length; i++) buffer[i] = i; @@ -3739,11 +3739,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); @@ -3767,7 +3767,7 @@ test_no_collective_cause_mode(int selection_mode) H5Sclose(file_space); if (fid) H5Fclose(fid); - HDfree(buffer); + free(buffer); /* clean up external file */ if (selection_mode & TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_EXTERNAL) @@ -3849,11 +3849,11 @@ dataset_atomicity(void) dim1 = 32; filename = GetTestParameters(); if (facc_type != FACC_MPIO) { - HDprintf("Atomicity tests will not work without the MPIO VFD\n"); + printf("Atomicity tests will not work without the MPIO VFD\n"); return; } if (VERBOSE_MED) - HDprintf("atomic writes to file %s\n", filename); + printf("atomic writes to file %s\n", filename); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); @@ -3861,11 +3861,11 @@ dataset_atomicity(void) buf_size = dim0 * dim1; /* allocate memory for data buffer */ - write_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int)); - VRFY((write_buf != NULL), "write_buf HDcalloc succeeded"); + write_buf = (int *)calloc((size_t)buf_size, sizeof(int)); + VRFY((write_buf != NULL), "write_buf calloc succeeded"); /* allocate memory for data buffer */ - read_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int)); - VRFY((read_buf != NULL), "read_buf HDcalloc succeeded"); + read_buf = (int *)calloc((size_t)buf_size, sizeof(int)); + VRFY((read_buf != NULL), "read_buf calloc succeeded"); /* setup file access template */ acc_tpl = create_faccess_plist(comm, info, facc_type); @@ -3985,9 +3985,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++]); } } @@ -4001,8 +4001,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++; } } @@ -4013,20 +4013,20 @@ dataset_atomicity(void) /* release data buffers */ if (write_buf) - HDfree(write_buf); + free(write_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); /* open dataset2 (non-contiguous case) */ dataset2 = H5Dopen2(fid, DATASETNAME6, H5P_DEFAULT); VRFY((dataset2 >= 0), "H5Dopen2 succeeded"); /* allocate memory for data buffer */ - write_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int)); - VRFY((write_buf != NULL), "write_buf HDcalloc succeeded"); + write_buf = (int *)calloc((size_t)buf_size, sizeof(int)); + VRFY((write_buf != NULL), "write_buf calloc succeeded"); /* allocate memory for data buffer */ - read_buf = (int *)HDcalloc((size_t)buf_size, sizeof(int)); - VRFY((read_buf != NULL), "read_buf HDcalloc succeeded"); + read_buf = (int *)calloc((size_t)buf_size, sizeof(int)); + VRFY((read_buf != NULL), "read_buf calloc succeeded"); for (i = 0; i < buf_size; i++) { write_buf[i] = 5; @@ -4085,11 +4085,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"); } } @@ -4123,8 +4123,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++; @@ -4141,9 +4141,9 @@ dataset_atomicity(void) /* release data buffers */ if (write_buf) - HDfree(write_buf); + free(write_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); ret = H5Fclose(fid); VRFY((ret >= 0), "H5Fclose succeeded"); @@ -4169,7 +4169,7 @@ test_dense_attr(void) /* get filename */ filename = (const char *)GetTestParameters(); - HDassert(filename != NULL); + assert(filename != NULL); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); diff --git a/testpar/t_file.c b/testpar/t_file.c index 90ae22d..7568ba0 100644 --- a/testpar/t_file.c +++ b/testpar/t_file.c @@ -66,7 +66,7 @@ test_split_comm_access(void) filename = (const char *)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); @@ -137,7 +137,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"); @@ -178,7 +178,7 @@ test_page_buffer_access(void) ret = H5Pset_file_space_page_size(fcpl, sizeof(int) * 100); VRFY((ret == 0), ""); - data = (int *)HDmalloc(sizeof(int) * (size_t)num_elements); + data = (int *)malloc(sizeof(int) * (size_t)num_elements); /* initialize all the elements to have a value of -1 */ for (i = 0; i < num_elements; i++) @@ -427,7 +427,7 @@ test_page_buffer_access(void) api_ctx_pushed = FALSE; } - HDfree(data); + free(data); data = NULL; MPI_Barrier(MPI_COMM_WORLD); } @@ -501,8 +501,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; @@ -543,7 +543,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), ""); @@ -584,7 +584,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 */ @@ -660,8 +660,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); @@ -713,8 +713,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); @@ -747,7 +747,7 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t api_ctx_pushed = FALSE; } - HDfree(data_array); + free(data_array); return nerrors; } diff --git a/testpar/t_file_image.c b/testpar/t_file_image.c index 676978c..471494c 100644 --- a/testpar/t_file_image.c +++ b/testpar/t_file_image.c @@ -112,7 +112,7 @@ file_image_daisy_chain_test(void) * to -1 everywhere else. */ - vector_ptr = (int *)HDmalloc((size_t)(mpi_size) * sizeof(int)); + vector_ptr = (int *)malloc((size_t)(mpi_size) * sizeof(int)); VRFY((vector_ptr != NULL), "allocated in memory representation of vector"); vector_ptr[0] = 0; @@ -122,7 +122,7 @@ file_image_daisy_chain_test(void) err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr); VRFY((err >= 0), "wrote initial data to vector."); - HDfree(vector_ptr); + free(vector_ptr); vector_ptr = NULL; /* 3) Flush the core file, and get an image of it. Close @@ -134,7 +134,7 @@ file_image_daisy_chain_test(void) image_len = H5Fget_file_image(file_id, NULL, (size_t)0); VRFY((image_len > 0), "got image file size"); - image_ptr = (void *)HDmalloc((size_t)image_len); + image_ptr = (void *)malloc((size_t)image_len); VRFY(image_ptr != NULL, "allocated file image buffer."); bytes_read = H5Fget_file_image(file_id, image_ptr, (size_t)image_len); @@ -160,7 +160,7 @@ file_image_daisy_chain_test(void) mpi_result = MPI_Ssend((void *)image_ptr, (int)image_len, MPI_BYTE, 1, 0, MPI_COMM_WORLD); VRFY((mpi_result == MPI_SUCCESS), "sent image to process 1"); - HDfree(image_ptr); + free(image_ptr); image_ptr = NULL; image_len = 0; @@ -170,7 +170,7 @@ file_image_daisy_chain_test(void) MPI_COMM_WORLD, &rcvstat); VRFY((mpi_result == MPI_SUCCESS), "received image len from process n-1"); - image_ptr = (void *)HDmalloc((size_t)image_len); + image_ptr = (void *)malloc((size_t)image_len); VRFY(image_ptr != NULL, "allocated file image receive buffer."); mpi_result = @@ -212,7 +212,7 @@ file_image_daisy_chain_test(void) VRFY((space_ndims == 1), "verified data space num dims(2)"); VRFY((dims[0] == (hsize_t)mpi_size), "verified data space dims"); - vector_ptr = (int *)HDmalloc((size_t)(mpi_size) * sizeof(int)); + vector_ptr = (int *)malloc((size_t)(mpi_size) * sizeof(int)); VRFY((vector_ptr != NULL), "allocated in memory rep of vector"); err = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr); @@ -224,7 +224,7 @@ file_image_daisy_chain_test(void) vector_ok = FALSE; VRFY((vector_ok), "verified received vector."); - HDfree(vector_ptr); + free(vector_ptr); vector_ptr = NULL; /* 7) closes the core file and exit. */ @@ -241,7 +241,7 @@ file_image_daisy_chain_test(void) err = H5Pclose(fapl_id); VRFY((err >= 0), "closed fapl(1)."); - HDfree(image_ptr); + free(image_ptr); image_ptr = NULL; image_len = 0; } @@ -252,7 +252,7 @@ file_image_daisy_chain_test(void) MPI_COMM_WORLD, &rcvstat); VRFY((mpi_result == MPI_SUCCESS), "received image size from process mpi_rank-1"); - image_ptr = (void *)HDmalloc((size_t)image_len); + image_ptr = (void *)malloc((size_t)image_len); VRFY(image_ptr != NULL, "allocated file image receive buffer."); mpi_result = @@ -295,7 +295,7 @@ file_image_daisy_chain_test(void) VRFY((space_ndims == 1), "verified data space num dims(2)"); VRFY((dims[0] == (hsize_t)mpi_size), "verified data space dims"); - vector_ptr = (int *)HDmalloc((size_t)(mpi_size) * sizeof(int)); + vector_ptr = (int *)malloc((size_t)(mpi_size) * sizeof(int)); VRFY((vector_ptr != NULL), "allocated in memory rep of vector"); err = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr); @@ -321,7 +321,7 @@ file_image_daisy_chain_test(void) err = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)vector_ptr); VRFY((err >= 0), "wrote modified data to vector."); - HDfree(vector_ptr); + free(vector_ptr); vector_ptr = NULL; /* 4) Flush the core file and send it to process (mpi_rank + 1) % n. */ @@ -332,7 +332,7 @@ file_image_daisy_chain_test(void) image_len = H5Fget_file_image(file_id, NULL, (size_t)0); VRFY((image_len > 0), "got (possibly modified) image file len"); - image_ptr = (void *)HDrealloc((void *)image_ptr, (size_t)image_len); + image_ptr = (void *)realloc((void *)image_ptr, (size_t)image_len); VRFY(image_ptr != NULL, "re-allocated file image buffer."); bytes_read = H5Fget_file_image(file_id, image_ptr, (size_t)image_len); @@ -346,7 +346,7 @@ file_image_daisy_chain_test(void) MPI_COMM_WORLD); VRFY((mpi_result == MPI_SUCCESS), "sent image to process (mpi_rank + 1) % mpi_size"); - HDfree(image_ptr); + free(image_ptr); image_ptr = NULL; image_len = 0; diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c index 8895c15..aa0fcb1 100644 --- a/testpar/t_filter_read.c +++ b/testpar/t_filter_read.c @@ -80,11 +80,11 @@ filter_read_internal(const char *filename, hid_t dcpl, hsize_t *dset_size) VRFY(sid >= 0, "H5Screate_simple"); /* Create buffers */ - points = (int *)HDmalloc(size[0] * size[1] * sizeof(int)); - VRFY(points != NULL, "HDmalloc"); + points = (int *)malloc(size[0] * size[1] * sizeof(int)); + VRFY(points != NULL, "malloc"); - check = (int *)HDmalloc(hs_size[0] * hs_size[1] * sizeof(int)); - VRFY(check != NULL, "HDmalloc"); + check = (int *)malloc(hs_size[0] * hs_size[1] * sizeof(int)); + VRFY(check != NULL, "malloc"); /* Initialize writing buffer with random data */ for (i = 0; i < size[0]; i++) @@ -146,12 +146,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, ""); } } @@ -177,8 +176,8 @@ filter_read_internal(const char *filename, hid_t dcpl, hsize_t *dset_size) hrc = H5Fclose(file); VRFY(hrc >= 0, "H5Fclose"); - HDfree(points); - HDfree(check); + free(points); + free(check); MPI_Barrier(MPI_COMM_WORLD); } @@ -228,7 +227,7 @@ test_filter_read(void) filename = 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); /*---------------------------------------------------------- * STEP 0: Test without filters. diff --git a/testpar/t_filters_parallel.c b/testpar/t_filters_parallel.c index 1593d15..e5f59d5 100644 --- a/testpar/t_filters_parallel.c +++ b/testpar/t_filters_parallel.c @@ -472,11 +472,11 @@ test_write_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t fil start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -491,11 +491,11 @@ test_write_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t fil (hsize_t)WRITE_ONE_CHUNK_FILTERED_DATASET_NCOLS * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -513,13 +513,13 @@ test_write_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t fil verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_ONE_CHUNK_FILTERED_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -527,12 +527,12 @@ test_write_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t fil VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -628,11 +628,11 @@ test_write_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fi start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -646,11 +646,11 @@ test_write_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fi data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -666,13 +666,13 @@ test_write_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fi verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -680,12 +680,12 @@ test_write_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fi VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -775,11 +775,11 @@ test_write_filtered_dataset_no_overlap_partial(const char *parent_group, H5Z_fil start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -793,11 +793,11 @@ test_write_filtered_dataset_no_overlap_partial(const char *parent_group, H5Z_fil data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -822,13 +822,13 @@ test_write_filtered_dataset_no_overlap_partial(const char *parent_group, H5Z_fil verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_PARTIAL_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -836,12 +836,12 @@ test_write_filtered_dataset_no_overlap_partial(const char *parent_group, H5Z_fil VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -936,11 +936,11 @@ test_write_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filte start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -954,11 +954,11 @@ test_write_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filte data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -976,13 +976,13 @@ test_write_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filte verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_SHARED_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -990,12 +990,12 @@ test_write_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filte VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1078,11 +1078,11 @@ test_write_filtered_dataset_single_unlim_dim_no_overlap(const char *parent_group /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - read_buf = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != read_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -1106,12 +1106,12 @@ test_write_filtered_dataset_single_unlim_dim_no_overlap(const char *parent_group start[1] = i * count[1] * block[1]; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], - block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], + block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -1128,13 +1128,13 @@ test_write_filtered_dataset_single_unlim_dim_no_overlap(const char *parent_group dset_id = H5Dopen2(group_id, WRITE_UNSHARED_ONE_UNLIM_DIM_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); - HDmemset(read_buf, 255, data_size); + memset(read_buf, 255, data_size); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); /* Verify the correct data was written */ - VRFY((0 == HDmemcmp(read_buf, data, data_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded"); if (i < (size_t)WRITE_UNSHARED_ONE_UNLIM_DIM_NLOOPS - 1) { /* Extend the dataset by count[1] chunks in the extensible dimension */ @@ -1149,9 +1149,9 @@ test_write_filtered_dataset_single_unlim_dim_no_overlap(const char *parent_group } if (data) - HDfree(data); + free(data); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1232,11 +1232,11 @@ test_write_filtered_dataset_single_unlim_dim_overlap(const char *parent_group, H /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - read_buf = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != read_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -1259,12 +1259,12 @@ test_write_filtered_dataset_single_unlim_dim_overlap(const char *parent_group, H start[1] = i * count[1] * block[1]; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], - block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], + block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -1281,13 +1281,13 @@ test_write_filtered_dataset_single_unlim_dim_overlap(const char *parent_group, H dset_id = H5Dopen2(group_id, WRITE_SHARED_ONE_UNLIM_DIM_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); - HDmemset(read_buf, 255, data_size); + memset(read_buf, 255, data_size); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); /* Verify correct data was written */ - VRFY((0 == HDmemcmp(read_buf, data, data_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded"); if (i < (size_t)WRITE_SHARED_ONE_UNLIM_DIM_NLOOPS - 1) { /* Extend the dataset by count[1] chunks in the extensible dimension */ @@ -1302,9 +1302,9 @@ test_write_filtered_dataset_single_unlim_dim_overlap(const char *parent_group, H } if (data) - HDfree(data); + free(data); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1395,12 +1395,12 @@ test_write_filtered_dataset_multi_unlim_dim_no_overlap(const char *parent_group, /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); - tmp_realloc = (C_DATATYPE *)HDrealloc(data, data_size); - VRFY((NULL != tmp_realloc), "HDrealloc succeeded"); + tmp_realloc = (C_DATATYPE *)realloc(data, data_size); + VRFY((NULL != tmp_realloc), "realloc succeeded"); data = tmp_realloc; - tmp_realloc = (C_DATATYPE *)HDrealloc(read_buf, data_size); - VRFY((NULL != tmp_realloc), "HDrealloc succeeded"); + tmp_realloc = (C_DATATYPE *)realloc(read_buf, data_size); + VRFY((NULL != tmp_realloc), "realloc succeeded"); read_buf = tmp_realloc; for (j = 0; j < data_size / sizeof(*data); j++) @@ -1423,12 +1423,12 @@ test_write_filtered_dataset_multi_unlim_dim_no_overlap(const char *parent_group, start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], - block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], + block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -1445,13 +1445,13 @@ test_write_filtered_dataset_multi_unlim_dim_no_overlap(const char *parent_group, dset_id = H5Dopen2(group_id, WRITE_UNSHARED_TWO_UNLIM_DIM_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); - HDmemset(read_buf, 255, data_size); + memset(read_buf, 255, data_size); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); /* Verify the correct data was written */ - VRFY((0 == HDmemcmp(read_buf, data, data_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded"); if (i < (size_t)WRITE_UNSHARED_TWO_UNLIM_DIM_NLOOPS - 1) { /* @@ -1471,9 +1471,9 @@ test_write_filtered_dataset_multi_unlim_dim_no_overlap(const char *parent_group, } if (data) - HDfree(data); + free(data); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1562,12 +1562,12 @@ test_write_filtered_dataset_multi_unlim_dim_overlap(const char *parent_group, H5 /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); - tmp_realloc = (C_DATATYPE *)HDrealloc(data, data_size); - VRFY((NULL != tmp_realloc), "HDrealloc succeeded"); + tmp_realloc = (C_DATATYPE *)realloc(data, data_size); + VRFY((NULL != tmp_realloc), "realloc succeeded"); data = tmp_realloc; - tmp_realloc = (C_DATATYPE *)HDrealloc(read_buf, data_size); - VRFY((NULL != tmp_realloc), "HDrealloc succeeded"); + tmp_realloc = (C_DATATYPE *)realloc(read_buf, data_size); + VRFY((NULL != tmp_realloc), "realloc succeeded"); read_buf = tmp_realloc; for (j = 0; j < data_size / sizeof(*data); j++) @@ -1590,12 +1590,12 @@ test_write_filtered_dataset_multi_unlim_dim_overlap(const char *parent_group, H5 start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], - block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], + block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -1612,13 +1612,13 @@ test_write_filtered_dataset_multi_unlim_dim_overlap(const char *parent_group, H5 dset_id = H5Dopen2(group_id, WRITE_SHARED_TWO_UNLIM_DIM_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); - HDmemset(read_buf, 255, data_size); + memset(read_buf, 255, data_size); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); /* Verify correct data was written */ - VRFY((0 == HDmemcmp(read_buf, data, data_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded"); if (i < (size_t)WRITE_SHARED_TWO_UNLIM_DIM_NLOOPS - 1) { /* Extend the dataset by the size of a chunk in each extensible dimension */ @@ -1634,9 +1634,9 @@ test_write_filtered_dataset_multi_unlim_dim_overlap(const char *parent_group, H5 } if (data) - HDfree(data); + free(data); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1737,11 +1737,11 @@ test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fi start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -1759,15 +1759,15 @@ test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fi correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); if (mpi_rank != WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC) { - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); } - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) + @@ -1775,9 +1775,8 @@ test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fi /* Compute the correct offset into the buffer for the process having no selection and clear it */ segment_length = dataset_dims[0] * dataset_dims[1] / (hsize_t)mpi_size; - HDmemset(correct_buf + - ((size_t)WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC * segment_length), - 0, segment_length * sizeof(*data)); + memset(correct_buf + ((size_t)WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC * segment_length), + 0, segment_length * sizeof(*data)); VRFY((H5Dwrite(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, data) >= 0), "Dataset write succeeded"); @@ -1786,13 +1785,13 @@ test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fi verify_space_alloc_status(dset_id, plist_id, (mpi_size > 1 ? SOME_CHUNKS_WRITTEN : NO_CHUNKS_WRITTEN)); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_SINGLE_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -1800,12 +1799,12 @@ test_write_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fi VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1895,11 +1894,11 @@ test_write_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filte data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -1911,13 +1910,13 @@ test_write_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filte verify_space_alloc_status(dset_id, plist_id, NO_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_ALL_NO_SELECTION_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -1925,12 +1924,12 @@ test_write_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filte VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -2014,8 +2013,8 @@ test_write_filtered_dataset_point_selection(const char *parent_group, H5Z_filter num_points = (hsize_t)WRITE_POINT_SELECTION_FILTERED_CHUNKS_NROWS * (hsize_t)WRITE_POINT_SELECTION_FILTERED_CHUNKS_NCOLS / (hsize_t)mpi_size; - coords = (hsize_t *)HDcalloc(1, 2 * num_points * sizeof(*coords)); - VRFY((NULL != coords), "Coords HDcalloc succeeded"); + coords = (hsize_t *)calloc(1, 2 * num_points * sizeof(*coords)); + VRFY((NULL != coords), "Coords calloc succeeded"); for (i = 0; i < num_points; i++) for (j = 0; j < WRITE_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS; j++) @@ -2031,11 +2030,11 @@ test_write_filtered_dataset_point_selection(const char *parent_group, H5Z_filter data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -2053,13 +2052,13 @@ test_write_filtered_dataset_point_selection(const char *parent_group, H5Z_filter verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_POINT_SELECTION_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -2067,14 +2066,14 @@ test_write_filtered_dataset_point_selection(const char *parent_group, H5Z_filter VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (coords) - HDfree(coords); + free(coords); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -2173,11 +2172,11 @@ test_write_filtered_dataset_interleaved_write(const char *parent_group, H5Z_filt start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -2191,11 +2190,11 @@ test_write_filtered_dataset_interleaved_write(const char *parent_group, H5Z_filt data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -2221,13 +2220,13 @@ test_write_filtered_dataset_interleaved_write(const char *parent_group, H5Z_filt verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, INTERLEAVED_WRITE_FILTERED_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -2235,12 +2234,12 @@ test_write_filtered_dataset_interleaved_write(const char *parent_group, H5Z_filt VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -2344,11 +2343,11 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -2362,11 +2361,11 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -2386,13 +2385,13 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z "Dataset write succeeded"); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -2400,7 +2399,7 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, plist_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); @@ -2410,9 +2409,9 @@ test_write_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -2515,13 +2514,13 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_grou start[2] = (hsize_t)mpi_rank; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE - " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE - ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE - " ]\n", - mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1], - start[2], block[0], block[1], block[2]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE + ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ]\n", + mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1], + start[2], block[0], block[1], block[2]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -2535,11 +2534,11 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_grou data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -2554,13 +2553,13 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_grou verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_3D_SEP_PAGE_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -2568,12 +2567,12 @@ test_write_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_grou VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -2677,13 +2676,13 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H start[2] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE - " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE - ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE - " ]\n", - mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1], - start[2], block[0], block[1], block[2]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE + ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ]\n", + mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1], + start[2], block[0], block[1], block[2]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -2697,11 +2696,11 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -2717,13 +2716,13 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_CHUNKS_3D_SAME_PAGE_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -2731,12 +2730,12 @@ test_write_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -2838,13 +2837,13 @@ test_write_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fi start[2] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE - " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE - ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE - " ]\n", - mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1], - start[2], block[0], block[1], block[2]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE + ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ]\n", + mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], start[0], start[1], + start[2], block[0], block[1], block[2]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -2858,11 +2857,11 @@ test_write_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fi data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(*data); correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -2892,13 +2891,13 @@ test_write_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fi verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_SHARED_FILTERED_CHUNKS_3D_DATASET_NAME, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); @@ -2906,12 +2905,12 @@ test_write_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fi VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -3028,11 +3027,11 @@ test_write_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group start[1] = ((hsize_t)mpi_rank * WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NCOLS); if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -3042,14 +3041,14 @@ test_write_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), "Hyperslab selection succeeded"); - data = (COMPOUND_C_DATATYPE *)HDcalloc( + data = (COMPOUND_C_DATATYPE *)calloc( 1, (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_ENTRIES_PER_PROC * sizeof(*data)); - VRFY((NULL != data), "HDcalloc succeeded"); + VRFY((NULL != data), "calloc succeeded"); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE); - correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); /* Fill data buffer */ for (i = 0; i < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_ENTRIES_PER_PROC; i++) { @@ -3072,13 +3071,13 @@ test_write_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_DATASET_NAME, H5P_DEFAULT); @@ -3086,12 +3085,12 @@ test_write_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group VRFY((H5Dread(dset_id, memtype, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -3209,11 +3208,11 @@ test_write_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -3223,14 +3222,14 @@ test_write_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), "Hyperslab selection succeeded"); - data = (COMPOUND_C_DATATYPE *)HDcalloc( + data = (COMPOUND_C_DATATYPE *)calloc( 1, (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_ENTRIES_PER_PROC * sizeof(*data)); - VRFY((NULL != data), "HDcalloc succeeded"); + VRFY((NULL != data), "calloc succeeded"); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE); - correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); /* Fill data buffer */ for (i = 0; i < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_ENTRIES_PER_PROC; i++) { @@ -3259,13 +3258,13 @@ test_write_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); /* Verify the correct data was written */ - read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_SHARED_DATASET_NAME, H5P_DEFAULT); @@ -3273,12 +3272,12 @@ test_write_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, VRFY((H5Dread(dset_id, memtype, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -3416,11 +3415,11 @@ test_write_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_gro start[1] = ((hsize_t)mpi_rank * WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NCOLS); if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -3430,14 +3429,14 @@ test_write_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_gro VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), "Hyperslab selection succeeded"); - data = (COMPOUND_C_DATATYPE *)HDcalloc( + data = (COMPOUND_C_DATATYPE *)calloc( 1, (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_ENTRIES_PER_PROC * sizeof(*data)); - VRFY((NULL != data), "HDcalloc succeeded"); + VRFY((NULL != data), "calloc succeeded"); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE); - correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); /* Fill data buffer */ for (i = 0; i < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_ENTRIES_PER_PROC; i++) { @@ -3457,13 +3456,13 @@ test_write_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_gro verify_space_alloc_status(dset_id, plist_id, NO_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); /* Verify that no data was written */ VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); - read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_DATASET_NAME, H5P_DEFAULT); @@ -3471,12 +3470,12 @@ test_write_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_gro VRFY((H5Dread(dset_id, memtype, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -3615,11 +3614,11 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -3629,14 +3628,14 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), "Hyperslab selection succeeded"); - data = (COMPOUND_C_DATATYPE *)HDcalloc( + data = (COMPOUND_C_DATATYPE *)calloc( 1, (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_ENTRIES_PER_PROC * sizeof(*data)); - VRFY((NULL != data), "HDcalloc succeeded"); + VRFY((NULL != data), "calloc succeeded"); correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(COMPOUND_C_DATATYPE); - correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); /* Fill data buffer */ for (i = 0; i < (hsize_t)WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_ENTRIES_PER_PROC; i++) { @@ -3656,13 +3655,13 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group verify_space_alloc_status(dset_id, plist_id, NO_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); /* Verify that no data was written */ VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); - read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); dset_id = H5Dopen2(group_id, WRITE_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_SHARED_DATASET_NAME, H5P_DEFAULT); @@ -3670,12 +3669,12 @@ test_write_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group VRFY((H5Dread(dset_id, memtype, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -3733,8 +3732,8 @@ test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filt /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = ((C_DATATYPE)i % (READ_ONE_CHUNK_FILTERED_DATASET_CH_NROWS / mpi_size * @@ -3831,11 +3830,11 @@ test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filt start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -3843,24 +3842,24 @@ test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filt read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* Collect each piece of data from all ranks into a global buffer on all ranks */ - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) recvcounts[i] = (int)flat_dims[0]; - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) displs[i] = (int)(i * flat_dims[0]); @@ -3869,18 +3868,18 @@ test_read_one_chunk_filtered_dataset(const char *parent_group, H5Z_filter_t filt displs, C_DATATYPE_MPI, comm)), "MPI_Allgatherv succeeded"); - VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -3935,8 +3934,8 @@ test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fil correct_buf_size = (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_NROWS * (hsize_t)READ_UNSHARED_FILTERED_CHUNKS_NCOLS * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) + @@ -4031,11 +4030,11 @@ test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fil start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -4043,24 +4042,24 @@ test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fil read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* Collect each piece of data from all ranks into a global buffer on all ranks */ - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) recvcounts[i] = (int)flat_dims[0]; - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) displs[i] = (int)(i * flat_dims[0]); @@ -4069,18 +4068,18 @@ test_read_filtered_dataset_no_overlap(const char *parent_group, H5Z_filter_t fil displs, C_DATATYPE_MPI, comm)), "MPI_Allgatherv succeeded"); - VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -4135,8 +4134,8 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = @@ -4233,11 +4232,11 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -4245,14 +4244,14 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* * Since these chunks are shared, run multiple rounds of MPI_Allgatherv @@ -4264,11 +4263,11 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter size_t loop_count = count[0]; size_t total_recvcounts = 0; - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) { recvcounts[i] = (int)dataset_dims[1]; @@ -4287,18 +4286,18 @@ test_read_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t filter } } - VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -4354,8 +4353,8 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) + @@ -4363,8 +4362,8 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil /* Compute the correct offset into the buffer for the process having no selection and clear it */ segment_length = dataset_dims[0] * dataset_dims[1] / (hsize_t)mpi_size; - HDmemset(correct_buf + ((size_t)READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC * segment_length), - 0, segment_length * sizeof(*correct_buf)); + memset(correct_buf + ((size_t)READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC * segment_length), + 0, segment_length * sizeof(*correct_buf)); if (MAINPROCESS) { plist_id = H5Pcreate(H5P_FILE_ACCESS); @@ -4460,11 +4459,11 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } if (mpi_rank == READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC) @@ -4475,8 +4474,8 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); if (mpi_rank == READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC) { VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, NULL) >= 0), @@ -4487,20 +4486,20 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil "Dataset read succeeded"); } - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* Collect each piece of data from all ranks into a global buffer on all ranks */ - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) recvcounts[i] = (int)(READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_CH_NROWS * READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NCOLS); recvcounts[READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_NO_SELECT_PROC] = 0; - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) displs[i] = (int)(i * (size_t)(READ_SINGLE_NO_SELECTION_FILTERED_CHUNKS_CH_NROWS * @@ -4515,18 +4514,18 @@ test_read_filtered_dataset_single_no_selection(const char *parent_group, H5Z_fil recvcounts, displs, C_DATATYPE_MPI, comm)), "MPI_Allgatherv succeeded"); - VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -4574,8 +4573,8 @@ test_read_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filter /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); if (MAINPROCESS) { plist_id = H5Pcreate(H5P_FILE_ACCESS); @@ -4652,18 +4651,18 @@ test_read_filtered_dataset_all_no_selection(const char *parent_group, H5Z_filter read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -4716,8 +4715,8 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_ /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = @@ -4802,8 +4801,8 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_ num_points = (hsize_t)READ_POINT_SELECTION_FILTERED_CHUNKS_NROWS * (hsize_t)READ_POINT_SELECTION_FILTERED_CHUNKS_NCOLS / (hsize_t)mpi_size; - coords = (hsize_t *)HDcalloc(1, 2 * num_points * sizeof(*coords)); - VRFY((NULL != coords), "Coords HDcalloc succeeded"); + coords = (hsize_t *)calloc(1, 2 * num_points * sizeof(*coords)); + VRFY((NULL != coords), "Coords calloc succeeded"); for (i = 0; i < num_points; i++) for (j = 0; j < READ_POINT_SELECTION_FILTERED_CHUNKS_DATASET_DIMS; j++) @@ -4817,14 +4816,14 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_ read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* * Since these chunks are shared, run multiple rounds of MPI_Allgatherv @@ -4837,11 +4836,11 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_ size_t cur_loop_count = original_loop_count; size_t total_recvcounts = 0; - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) { recvcounts[i] = (int)dataset_dims[1]; @@ -4861,20 +4860,20 @@ test_read_filtered_dataset_point_selection(const char *parent_group, H5Z_filter_ } } - VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); - HDfree(coords); + free(coords); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -4932,8 +4931,8 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) /* Add Column Index */ @@ -5040,11 +5039,11 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -5052,14 +5051,14 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* * Since these chunks are shared, run multiple rounds of MPI_Allgatherv @@ -5071,11 +5070,11 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter size_t loop_count = count[0]; size_t total_recvcounts = 0; - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) { recvcounts[i] = (int)dataset_dims[1]; @@ -5094,18 +5093,18 @@ test_read_filtered_dataset_interleaved_read(const char *parent_group, H5Z_filter } } - VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -5161,8 +5160,8 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = (C_DATATYPE)((i % (hsize_t)mpi_size) + (i / (hsize_t)mpi_size)); @@ -5266,11 +5265,11 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group start[2] = (hsize_t)mpi_rank; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -5278,14 +5277,14 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* * Due to the nature of 3-dimensional reading, create an MPI vector type that allows each @@ -5307,17 +5306,17 @@ test_read_3d_filtered_dataset_no_overlap_separate_pages(const char *parent_group resized_vector_type, comm)), "MPI_Allgather succeeded"); - VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); VRFY((MPI_SUCCESS == MPI_Type_free(&vector_type)), "MPI_Type_free succeeded"); VRFY((MPI_SUCCESS == MPI_Type_free(&resized_vector_type)), "MPI_Type_free succeeded"); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -5380,8 +5379,8 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_ correct_buf_size = (hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_NROWS * (hsize_t)READ_UNSHARED_TRANSFORMED_FILTERED_CHUNKS_NCOLS * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] / (hsize_t)mpi_size * dataset_dims[1])) + @@ -5491,11 +5490,11 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_ start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -5510,24 +5509,24 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_ read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, plist_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* Collect each piece of data from all ranks into a global buffer on all ranks */ - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) recvcounts[i] = (int)flat_dims[0]; - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) displs[i] = (int)(i * flat_dims[0]); @@ -5536,18 +5535,18 @@ test_read_transformed_filtered_dataset_no_overlap(const char *parent_group, H5Z_ displs, C_DATATYPE_MPI, comm)), "MPI_Allgatherv succeeded"); - VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -5605,8 +5604,8 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5 /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] * dataset_dims[1])) + @@ -5710,11 +5709,11 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5 start[2] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -5722,24 +5721,24 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5 read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* Collect each piece of data from all ranks into a global buffer on all ranks */ - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) recvcounts[i] = (int)flat_dims[0]; - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) displs[i] = (int)(i * flat_dims[0]); @@ -5748,18 +5747,18 @@ test_read_3d_filtered_dataset_no_overlap_same_pages(const char *parent_group, H5 displs, C_DATATYPE_MPI, comm)), "MPI_Allgatherv succeeded"); - VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -5816,8 +5815,8 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) /* Add the Column Index */ @@ -5932,11 +5931,11 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil start[2] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -5944,14 +5943,14 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); { size_t run_length = @@ -5982,17 +5981,17 @@ test_read_3d_filtered_dataset_overlap(const char *parent_group, H5Z_filter_t fil resized_vector_type, comm)), "MPI_Allgatherv succeeded"); - VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); VRFY((MPI_SUCCESS == MPI_Type_free(&vector_type)), "MPI_Type_free succeeded"); VRFY((MPI_SUCCESS == MPI_Type_free(&resized_vector_type)), "MPI_Type_free succeeded"); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -6056,8 +6055,8 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group, /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) { correct_buf[i].field1 = (short)((i % dataset_dims[1]) + (i / dataset_dims[1])); @@ -6170,11 +6169,11 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group, start[1] = ((hsize_t)mpi_rank * READ_COMPOUND_FILTERED_CHUNKS_NO_CONVERSION_UNSHARED_CH_NCOLS); if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -6182,23 +6181,23 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group, read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (COMPOUND_C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, memtype, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* Collect each piece of data from all ranks into a global buffer on all ranks */ - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) recvcounts[i] = (int)(flat_dims[0] * sizeof(*read_buf)); - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) displs[i] = (int)(i * flat_dims[0] * sizeof(*read_buf)); @@ -6207,18 +6206,18 @@ test_read_cmpd_filtered_dataset_no_conversion_unshared(const char *parent_group, global_buf, recvcounts, displs, MPI_BYTE, comm)), "MPI_Allgatherv succeeded"); - VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -6283,8 +6282,8 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) { correct_buf[i].field1 = @@ -6403,11 +6402,11 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -6415,23 +6414,23 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (COMPOUND_C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, memtype, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* Collect each piece of data from all ranks into a global buffer on all ranks */ - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) recvcounts[i] = (int)(flat_dims[0] * sizeof(*read_buf)); - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) displs[i] = (int)(i * flat_dims[0] * sizeof(*read_buf)); @@ -6440,18 +6439,18 @@ test_read_cmpd_filtered_dataset_no_conversion_shared(const char *parent_group, H global_buf, recvcounts, displs, MPI_BYTE, comm)), "MPI_Allgatherv succeeded"); - VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -6516,8 +6515,8 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) { correct_buf[i].field1 = (short)((i % dataset_dims[1]) + (i / dataset_dims[1])); @@ -6638,11 +6637,11 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou start[1] = ((hsize_t)mpi_rank * READ_COMPOUND_FILTERED_CHUNKS_TYPE_CONVERSION_UNSHARED_CH_NCOLS); if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -6650,23 +6649,23 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (COMPOUND_C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, memtype, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* Collect each piece of data from all ranks into a global buffer on all ranks */ - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) recvcounts[i] = (int)(flat_dims[0] * sizeof(*read_buf)); - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) displs[i] = (int)(i * flat_dims[0] * sizeof(*read_buf)); @@ -6675,18 +6674,18 @@ test_read_cmpd_filtered_dataset_type_conversion_unshared(const char *parent_grou global_buf, recvcounts, displs, MPI_BYTE, comm)), "MPI_Allgatherv succeeded"); - VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -6752,8 +6751,8 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group, /* Setup the buffer for writing and for comparison */ correct_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*correct_buf); - correct_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) { correct_buf[i].field1 = @@ -6880,11 +6879,11 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group, start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is reading with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -6892,23 +6891,23 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group, read_buf_size = flat_dims[0] * sizeof(*read_buf); - read_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (COMPOUND_C_DATATYPE *)calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); VRFY((H5Dread(dset_id, memtype, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - global_buf = (COMPOUND_C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != global_buf), "HDcalloc succeeded"); + global_buf = (COMPOUND_C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != global_buf), "calloc succeeded"); /* Collect each piece of data from all ranks into a global buffer on all ranks */ - recvcounts = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = (int *)calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) recvcounts[i] = (int)(flat_dims[0] * sizeof(*read_buf)); - displs = (int *)HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = (int *)calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) displs[i] = (int)(i * flat_dims[0] * sizeof(*read_buf)); @@ -6917,18 +6916,18 @@ test_read_cmpd_filtered_dataset_type_conversion_shared(const char *parent_group, global_buf, recvcounts, displs, MPI_BYTE, comm)), "MPI_Allgatherv succeeded"); - VRFY((0 == HDmemcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(global_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (global_buf) - HDfree(global_buf); + free(global_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -7017,8 +7016,8 @@ test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id data_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*data); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -7030,7 +7029,7 @@ test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -7040,11 +7039,11 @@ test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = (long)i; @@ -7062,12 +7061,12 @@ test_write_serial_read_parallel(const char *parent_group, H5Z_filter_t filter_id VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Gclose(group_id) >= 0), "Group close succeeded"); @@ -7168,13 +7167,13 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id offset[2] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE - " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], offset[ %" PRIuHSIZE - ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE - " ]\n", - mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], offset[0], - offset[1], offset[2], block[0], block[1], block[2]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ], stride[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE " ], offset[ %" PRIuHSIZE + ", %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE + " ]\n", + mpi_rank, count[0], count[1], count[2], stride[0], stride[1], stride[2], offset[0], offset[1], + offset[2], block[0], block[1], block[2]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -7187,8 +7186,8 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sel_dims[2] * sizeof(*data); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -7200,7 +7199,7 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (data) - HDfree(data); + free(data); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -7229,11 +7228,11 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id correct_buf_size = dataset_dims[0] * dataset_dims[1] * dataset_dims[2] * sizeof(*correct_buf); - correct_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); - read_buf = (C_DATATYPE *)HDcalloc(1, correct_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, correct_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); for (i = 0; i < correct_buf_size / sizeof(*correct_buf); i++) correct_buf[i] = (C_DATATYPE)((i % (dataset_dims[0] * dataset_dims[1])) + @@ -7242,14 +7241,14 @@ test_write_parallel_read_serial(const char *parent_group, H5Z_filter_t filter_id VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, correct_buf_size)), "Data verification succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); VRFY((H5Gclose(group_id) >= 0), "Group close succeeded"); VRFY((H5Fclose(file_id) >= 0), "File close succeeded"); - HDfree(correct_buf); - HDfree(read_buf); + free(correct_buf); + free(read_buf); } return; @@ -7337,11 +7336,11 @@ test_shrinking_growing_chunks(const char *parent_group, H5Z_filter_t filter_id, start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -7353,16 +7352,16 @@ test_shrinking_growing_chunks(const char *parent_group, H5Z_filter_t filter_id, data_size = sel_dims[0] * sel_dims[1] * sizeof(double); - data = (double *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (double *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - read_buf = (double *)HDcalloc(1, data_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (double *)calloc(1, data_size); + VRFY((NULL != read_buf), "calloc succeeded"); for (i = 0; i < SHRINKING_GROWING_CHUNKS_NLOOPS; i++) { /* Continually write random float data, followed by zeroed-out data */ if (i % 2) - HDmemset(data, 0, data_size); + memset(data, 0, data_size); else { size_t j; for (j = 0; j < data_size / sizeof(*data); j++) { @@ -7377,22 +7376,22 @@ test_shrinking_growing_chunks(const char *parent_group, H5Z_filter_t filter_id, verify_space_alloc_status(dset_id, plist_id, ALL_CHUNKS_WRITTEN); if (i % 2) { - HDmemset(read_buf, 255, data_size); + memset(read_buf, 255, data_size); } else { - HDmemset(read_buf, 0, data_size); + memset(read_buf, 0, data_size); } VRFY((H5Dread(dset_id, H5T_NATIVE_DOUBLE, memspace, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, data, data_size)), "data verification succeeded"); + VRFY((0 == memcmp(read_buf, data, data_size)), "data verification succeeded"); } if (read_buf) - HDfree(read_buf); + free(read_buf); if (data) - HDfree(data); + free(data); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -7485,11 +7484,11 @@ test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hi (hsize_t)(WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_NCOLS - WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_CH_NCOLS); if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -7502,11 +7501,11 @@ test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hi /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - read_buf = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != read_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -7526,7 +7525,7 @@ test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hi VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, data, data_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -7559,11 +7558,11 @@ test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hi (hsize_t)(WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_NCOLS - WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_CH_NCOLS); if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -7585,17 +7584,17 @@ test_edge_chunks_no_overlap(const char *parent_group, H5Z_filter_t filter_id, hi dset_id = H5Dopen2(group_id, WRITE_UNSHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME2, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); - HDmemset(read_buf, 255, data_size); + memset(read_buf, 255, data_size); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, data, data_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded"); if (data) - HDfree(data); + free(data); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -7688,11 +7687,11 @@ test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t (hsize_t)(WRITE_SHARED_FILTERED_EDGE_CHUNKS_NCOLS - WRITE_SHARED_FILTERED_EDGE_CHUNKS_CH_NCOLS); if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -7705,11 +7704,11 @@ test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); - read_buf = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != read_buf), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -7729,7 +7728,7 @@ test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, data, data_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -7763,11 +7762,11 @@ test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t (hsize_t)(WRITE_SHARED_FILTERED_EDGE_CHUNKS_NCOLS - WRITE_SHARED_FILTERED_EDGE_CHUNKS_CH_NCOLS); if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -7789,17 +7788,17 @@ test_edge_chunks_overlap(const char *parent_group, H5Z_filter_t filter_id, hid_t dset_id = H5Dopen2(group_id, WRITE_SHARED_FILTERED_EDGE_CHUNKS_DATASET_NAME2, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); - HDmemset(read_buf, 255, data_size); + memset(read_buf, 255, data_size); VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_BLOCK, filespace, dxpl_id, read_buf) >= 0), "Dataset read succeeded"); - VRFY((0 == HDmemcmp(read_buf, data, data_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, data, data_size)), "Data verification succeeded"); if (data) - HDfree(data); + free(data); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Sclose(filespace) >= 0), "File dataspace close succeeded"); @@ -7901,11 +7900,11 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id /* Allocate buffer for reading entire dataset */ read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*read_buf); - read_buf = HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); - correct_buf = HDcalloc(1, read_buf_size); - VRFY((NULL != correct_buf), "HDcalloc succeeded"); + correct_buf = calloc(1, read_buf_size); + VRFY((NULL != correct_buf), "calloc succeeded"); /* Read entire dataset and verify that the fill value is returned */ VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), @@ -7914,7 +7913,7 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id for (i = 0; i < read_buf_size / sizeof(*read_buf); i++) correct_buf[i] = FILL_VALUES_TEST_FILL_VAL; - VRFY((0 == HDmemcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded"); /* * Write to part of the first chunk in the dataset with @@ -7933,11 +7932,11 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -7950,8 +7949,8 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -7975,11 +7974,11 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id * Each MPI rank communicates their written piece of data * into each other rank's correctness-checking buffer */ - recvcounts = HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); - displs = HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) { recvcounts[i] = (int)(count[1] * block[1]); @@ -7990,7 +7989,7 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id displs, C_DATATYPE_MPI, comm)), "MPI_Allgatherv succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded"); /* * Write to whole dataset and ensure fill value isn't returned @@ -8010,11 +8009,11 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -8062,7 +8061,7 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id for (i = 0; i < read_buf_size / sizeof(*read_buf); i++) correct_buf[i] = FILL_VALUES_TEST_FILL_VAL; - VRFY((0 == HDmemcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded"); /* * Write to part of the first chunk in the dataset with @@ -8081,11 +8080,11 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -8126,7 +8125,7 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id displs, C_DATATYPE_MPI, comm)), "MPI_Allgatherv succeeded"); - VRFY((0 == HDmemcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded"); + VRFY((0 == memcmp(read_buf, correct_buf, read_buf_size)), "Data verification succeeded"); /* * Write to whole dataset and ensure fill value isn't returned @@ -8146,11 +8145,11 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -8175,15 +8174,15 @@ test_fill_values(const char *parent_group, H5Z_filter_t filter_id, hid_t fapl_id VRFY((read_buf[i] != FILL_VALUES_TEST_FILL_VAL), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (data) - HDfree(data); + free(data); if (read_buf) - HDfree(read_buf); + free(read_buf); if (correct_buf) - HDfree(correct_buf); + free(correct_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -8264,8 +8263,8 @@ test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_ /* Allocate buffer for reading entire dataset */ read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*read_buf); - read_buf = HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); /* * Read entire dataset - nothing to verify since there's no fill value. @@ -8300,11 +8299,11 @@ test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_ start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -8317,8 +8316,8 @@ test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_ /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -8355,11 +8354,11 @@ test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_ start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -8381,9 +8380,9 @@ test_fill_value_undefined(const char *parent_group, H5Z_filter_t filter_id, hid_ "Dataset read succeeded"); if (data) - HDfree(data); + free(data); if (read_buf) - HDfree(read_buf); + free(read_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -8487,11 +8486,11 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap /* Allocate buffer for reading entire dataset */ read_buf_size = dataset_dims[0] * dataset_dims[1] * sizeof(*read_buf); - read_buf = HDcalloc(1, read_buf_size); - VRFY((NULL != read_buf), "HDcalloc succeeded"); + read_buf = calloc(1, read_buf_size); + VRFY((NULL != read_buf), "calloc succeeded"); - fill_buf = HDcalloc(1, read_buf_size); - VRFY((NULL != fill_buf), "HDcalloc succeeded"); + fill_buf = calloc(1, read_buf_size); + VRFY((NULL != fill_buf), "calloc succeeded"); /* Read entire dataset and verify that the fill value isn't returned */ VRFY((H5Dread(dset_id, HDF5_DATATYPE_NAME, H5S_ALL, H5S_ALL, dxpl_id, read_buf) >= 0), @@ -8505,7 +8504,7 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap * values to all be the fill value, so this should be * a safe comparison in theory. */ - VRFY((0 != HDmemcmp(read_buf, fill_buf, read_buf_size)), "Data verification succeeded"); + VRFY((0 != memcmp(read_buf, fill_buf, read_buf_size)), "Data verification succeeded"); /* * Write to part of the first chunk in the dataset with @@ -8524,11 +8523,11 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } /* Select hyperslab in the file */ @@ -8541,8 +8540,8 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap /* Fill data buffer */ data_size = sel_dims[0] * sel_dims[1] * sizeof(*data); - data = (C_DATATYPE *)HDcalloc(1, data_size); - VRFY((NULL != data), "HDcalloc succeeded"); + data = (C_DATATYPE *)calloc(1, data_size); + VRFY((NULL != data), "calloc succeeded"); for (i = 0; i < data_size / sizeof(*data); i++) data[i] = (C_DATATYPE)GEN_DATA(i); @@ -8566,11 +8565,11 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap * Each MPI rank communicates their written piece of data * into each other rank's correctness-checking buffer */ - recvcounts = HDcalloc(1, (size_t)mpi_size * sizeof(*recvcounts)); - VRFY((NULL != recvcounts), "HDcalloc succeeded"); + recvcounts = calloc(1, (size_t)mpi_size * sizeof(*recvcounts)); + VRFY((NULL != recvcounts), "calloc succeeded"); - displs = HDcalloc(1, (size_t)mpi_size * sizeof(*displs)); - VRFY((NULL != displs), "HDcalloc succeeded"); + displs = calloc(1, (size_t)mpi_size * sizeof(*displs)); + VRFY((NULL != displs), "calloc succeeded"); for (i = 0; i < (size_t)mpi_size; i++) { recvcounts[i] = (int)(count[1] * block[1]); @@ -8586,7 +8585,7 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap * values to all be the fill value, so this should be * a safe comparison in theory. */ - VRFY((0 != HDmemcmp(read_buf, fill_buf, read_buf_size)), "Data verification succeeded"); + VRFY((0 != memcmp(read_buf, fill_buf, read_buf_size)), "Data verification succeeded"); /* * Write to whole dataset and ensure fill value isn't returned @@ -8606,11 +8605,11 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap start[1] = 0; if (VERBOSE_MED) { - HDprintf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE - ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE - ", %" PRIuHSIZE " ]\n", - mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); - HDfflush(stdout); + printf("Process %d is writing with count[ %" PRIuHSIZE ", %" PRIuHSIZE " ], stride[ %" PRIuHSIZE + ", %" PRIuHSIZE " ], start[ %" PRIuHSIZE ", %" PRIuHSIZE " ], block size[ %" PRIuHSIZE + ", %" PRIuHSIZE " ]\n", + mpi_rank, count[0], count[1], stride[0], stride[1], start[0], start[1], block[0], block[1]); + fflush(stdout); } VRFY((H5Sselect_hyperslab(filespace, H5S_SELECT_SET, start, stride, count, block) >= 0), @@ -8635,15 +8634,15 @@ test_fill_time_never(const char *parent_group, H5Z_filter_t filter_id, hid_t fap VRFY((read_buf[i] != FILL_TIME_NEVER_TEST_FILL_VAL), "Data verification succeeded"); if (displs) - HDfree(displs); + free(displs); if (recvcounts) - HDfree(recvcounts); + free(recvcounts); if (data) - HDfree(data); + free(data); if (read_buf) - HDfree(read_buf); + free(read_buf); if (fill_buf) - HDfree(fill_buf); + free(fill_buf); VRFY((H5Pclose(plist_id) >= 0), "DCPL close succeeded"); VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -8675,8 +8674,8 @@ main(int argc, char **argv) if (mpi_size <= 0) { if (MAINPROCESS) { - HDprintf("The Parallel Filters tests require at least 1 rank.\n"); - HDprintf("Quitting...\n"); + printf("The Parallel Filters tests require at least 1 rank.\n"); + printf("Quitting...\n"); } MPI_Abort(MPI_COMM_WORLD, 1); @@ -8684,16 +8683,16 @@ main(int argc, char **argv) if (H5dont_atexit() < 0) { if (MAINPROCESS) { - HDprintf("Failed to turn off atexit processing. Continue.\n"); + printf("Failed to turn off atexit processing. Continue.\n"); } } H5open(); if (MAINPROCESS) { - HDprintf("==========================\n"); - HDprintf(" Parallel Filters tests\n"); - HDprintf("==========================\n\n"); + printf("==========================\n"); + printf(" Parallel Filters tests\n"); + printf("==========================\n\n"); } if (VERBOSE_MED) @@ -8779,10 +8778,10 @@ main(int argc, char **argv) } if (MAINPROCESS) - HDprintf("== Running tests with filter '%s' using '%s' and '%s' allocation time ==\n\n", - filterNames[cur_filter_idx], - H5FD_MPIO_CHUNK_ONE_IO == chunk_opt ? "Linked-Chunk I/O" : "Multi-Chunk I/O", - alloc_time); + printf("== Running tests with filter '%s' using '%s' and '%s' allocation time ==\n\n", + filterNames[cur_filter_idx], + H5FD_MPIO_CHUNK_ONE_IO == chunk_opt ? "Linked-Chunk I/O" : "Multi-Chunk I/O", + alloc_time); /* Make sure current filter is available before testing with it */ filter_avail = H5Zfilter_avail(cur_filter); @@ -8790,8 +8789,8 @@ main(int argc, char **argv) if (!filter_avail) { if (MAINPROCESS) - HDprintf(" ** SKIPPED tests with filter '%s' - filter unavailable **\n\n", - filterNames[cur_filter_idx]); + printf(" ** SKIPPED tests with filter '%s' - filter unavailable **\n\n", + filterNames[cur_filter_idx]); continue; } @@ -8801,8 +8800,8 @@ main(int argc, char **argv) /* Determine if filter is encode-enabled */ if (0 == (filter_config & H5Z_FILTER_CONFIG_ENCODE_ENABLED)) { if (MAINPROCESS) - HDprintf(" ** SKIPPED tests with filter '%s' - filter not encode-enabled **\n\n", - filterNames[cur_filter_idx]); + printf(" ** SKIPPED tests with filter '%s' - filter not encode-enabled **\n\n", + filterNames[cur_filter_idx]); continue; } @@ -8867,7 +8866,7 @@ main(int argc, char **argv) exit: if (nerrors) if (MAINPROCESS) - HDprintf("*** %d TEST ERROR%s OCCURRED ***\n", nerrors, nerrors > 1 ? "S" : ""); + printf("*** %d TEST ERROR%s OCCURRED ***\n", nerrors, nerrors > 1 ? "S" : ""); TestAlarmOff(); diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c index 7cdfecf..bc6305e 100644 --- a/testpar/t_mdset.c +++ b/testpar/t_mdset.c @@ -156,8 +156,8 @@ multiple_dset_write(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); - outme = HDmalloc((size_t)size * (size_t)size * sizeof(double)); - VRFY((outme != NULL), "HDmalloc succeeded for outme"); + outme = malloc((size_t)size * (size_t)size * sizeof(double)); + VRFY((outme != NULL), "malloc succeeded for outme"); plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); VRFY((plist >= 0), "create_faccess_plist succeeded"); @@ -196,7 +196,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 */ @@ -207,7 +207,7 @@ multiple_dset_write(void) H5Pclose(dcpl); H5Fclose(iof); - HDfree(outme); + free(outme); } /* Example of using PHDF5 to create, write, and read compact dataset. @@ -235,11 +235,11 @@ compact_dataset(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); - outme = HDmalloc((size_t)((size_t)size * (size_t)size * sizeof(double))); - VRFY((outme != NULL), "HDmalloc succeeded for outme"); + outme = malloc((size_t)((size_t)size * (size_t)size * sizeof(double))); + VRFY((outme != NULL), "malloc succeeded for outme"); - inme = HDmalloc((size_t)size * (size_t)size * sizeof(double)); - VRFY((outme != NULL), "HDmalloc succeeded for inme"); + inme = malloc((size_t)size * (size_t)size * sizeof(double)); + VRFY((outme != NULL), "malloc succeeded for inme"); filename = GetTestParameters(); VRFY((mpi_size <= size), "mpi_size <= size"); @@ -326,15 +326,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); } /* @@ -602,10 +602,10 @@ dataset_fillvalue(void) dset_size = dset_dims[0] * dset_dims[1] * dset_dims[2] * dset_dims[3]; /* Allocate space for the buffers */ - rdata = HDmalloc((size_t)(dset_size * sizeof(int))); - VRFY((rdata != NULL), "HDcalloc succeeded for read buffer"); - wdata = HDmalloc((size_t)(dset_size * sizeof(int))); - VRFY((wdata != NULL), "HDmalloc succeeded for write buffer"); + rdata = malloc((size_t)(dset_size * sizeof(int))); + VRFY((rdata != NULL), "calloc succeeded for read buffer"); + wdata = malloc((size_t)(dset_size * sizeof(int))); + VRFY((wdata != NULL), "malloc succeeded for write buffer"); fapl = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); VRFY((fapl >= 0), "create_faccess_plist succeeded"); @@ -649,7 +649,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); @@ -674,13 +674,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++; } } @@ -739,7 +739,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); @@ -766,19 +766,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++; } } @@ -804,8 +804,8 @@ dataset_fillvalue(void) VRFY((ret >= 0), "H5Pclose succeeded"); /* free the buffers */ - HDfree(rdata); - HDfree(wdata); + free(rdata); + free(wdata); } /* combined cngrpw and ingrpr tests because ingrpr reads file created by cngrpw. */ @@ -847,8 +847,8 @@ collective_group_write(void) chunk_size[0] = (hsize_t)(size / 2); chunk_size[1] = (hsize_t)(size / 2); - outme = HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); - VRFY((outme != NULL), "HDmalloc succeeded for outme"); + outme = malloc((size_t)size * (size_t)size * sizeof(DATATYPE)); + VRFY((outme != NULL), "malloc succeeded for outme"); plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type); fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, plist); @@ -900,7 +900,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 */ @@ -913,7 +913,7 @@ collective_group_write(void) ret1 = H5Fclose(fid); VRFY((ret1 == 0), "H5Fclose"); - HDfree(outme); + free(outme); } /* Let two sets of processes open and read different groups and chunked @@ -971,11 +971,11 @@ group_dataset_read(hid_t fid, int mpi_rank, int m) size = get_size(); - indata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); - VRFY((indata != NULL), "HDmalloc succeeded for indata"); + indata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE)); + VRFY((indata != NULL), "malloc succeeded for indata"); - outdata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); - VRFY((outdata != NULL), "HDmalloc succeeded for outdata"); + outdata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE)); + VRFY((outdata != NULL), "malloc succeeded for outdata"); /* open every group under root group. */ HDsnprintf(gname, sizeof(gname), "group%d", m); @@ -1003,8 +1003,8 @@ group_dataset_read(hid_t fid, int mpi_rank, int m) ret = H5Gclose(gid); VRFY((ret == 0), "H5Gclose"); - HDfree(indata); - HDfree(outdata); + free(indata); + free(outdata); } /* @@ -1093,7 +1093,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 */ @@ -1131,8 +1131,8 @@ write_dataset(hid_t memspace, hid_t filespace, hid_t gid) size = get_size(); - outme = HDmalloc((size_t)size * (size_t)size * sizeof(double)); - VRFY((outme != NULL), "HDmalloc succeeded for outme"); + outme = malloc((size_t)size * (size_t)size * sizeof(double)); + VRFY((outme != NULL), "malloc succeeded for outme"); for (n = 0; n < NDATASET; n++) { HDsnprintf(dname, sizeof(dname), "dataset%d", n); @@ -1150,7 +1150,7 @@ write_dataset(hid_t memspace, hid_t filespace, hid_t gid) H5Dclose(did); } - HDfree(outme); + free(outme); } /* @@ -1168,7 +1168,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 */ @@ -1277,11 +1277,11 @@ read_dataset(hid_t memspace, hid_t filespace, hid_t gid) size = get_size(); - indata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); - VRFY((indata != NULL), "HDmalloc succeeded for indata"); + indata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE)); + VRFY((indata != NULL), "malloc succeeded for indata"); - outdata = (DATATYPE *)HDmalloc((size_t)size * (size_t)size * sizeof(DATATYPE)); - VRFY((outdata != NULL), "HDmalloc succeeded for outdata"); + outdata = (DATATYPE *)malloc((size_t)size * (size_t)size * sizeof(DATATYPE)); + VRFY((outdata != NULL), "malloc succeeded for outdata"); for (n = 0; n < NDATASET; n++) { HDsnprintf(dname, sizeof(dname), "dataset%d", n); @@ -1308,8 +1308,8 @@ read_dataset(hid_t memspace, hid_t filespace, hid_t gid) H5Dclose(did); } - HDfree(indata); - HDfree(outdata); + free(indata); + free(outdata); return vrfy_errors; } @@ -1429,14 +1429,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; } @@ -1531,7 +1531,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"); @@ -1544,7 +1544,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"); @@ -1557,7 +1557,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); @@ -1568,7 +1568,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); @@ -1578,33 +1578,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"); @@ -1612,32 +1612,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"); @@ -1647,12 +1647,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"); /* @@ -1660,7 +1660,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"); @@ -1678,7 +1678,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; @@ -1775,7 +1775,7 @@ rr_obj_hdr_flush_confusion(void) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); - 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); @@ -1795,7 +1795,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; @@ -1864,7 +1864,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"); @@ -1877,7 +1877,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"); @@ -1890,7 +1890,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); @@ -1911,7 +1911,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"); @@ -1924,7 +1924,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); @@ -1953,7 +1953,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]); @@ -1969,7 +1969,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"); @@ -1983,7 +1983,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++) { @@ -2008,7 +2008,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]); @@ -2024,7 +2024,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"); @@ -2038,7 +2038,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); @@ -2072,7 +2072,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"); @@ -2086,7 +2086,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); @@ -2106,7 +2106,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"); @@ -2122,7 +2122,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++) { @@ -2137,7 +2137,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]); @@ -2149,7 +2149,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"); @@ -2159,7 +2159,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"); @@ -2176,7 +2176,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; @@ -2251,7 +2251,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"); @@ -2263,7 +2263,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"); @@ -2277,7 +2277,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; @@ -2295,7 +2295,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"); @@ -2307,7 +2307,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); @@ -2337,10 +2337,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++) @@ -2352,7 +2352,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]); @@ -2372,7 +2372,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); @@ -2388,8 +2388,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 { @@ -2399,10 +2399,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++) { @@ -2425,7 +2425,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); @@ -2439,8 +2439,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 { @@ -2450,10 +2450,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++) { @@ -2487,7 +2487,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) { @@ -2501,7 +2501,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"); @@ -2510,7 +2510,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"); @@ -2519,7 +2519,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() */ @@ -2579,7 +2579,7 @@ chunk_align_bug_1(void) align = (hsize_t)file_size + CHUNK_SIZE + EXTRA_ALIGN; /* 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/t_mpi.c b/testpar/t_mpi.c index d0400ae..48d0cc1 100644 --- a/testpar/t_mpi.c +++ b/testpar/t_mpi.c @@ -54,7 +54,7 @@ test_mpio_overlap_writes(char *filename) MPI_Status mpi_stat; if (VERBOSE_MED) - HDprintf("MPIO independent overlapping writes test on file %s\n", filename); + printf("MPIO independent overlapping writes test on file %s\n", filename); nerrs = 0; /* set up MPI parameters */ @@ -64,15 +64,15 @@ test_mpio_overlap_writes(char *filename) /* Need at least 2 processes */ if (mpi_size < 2) { if (MAINPROCESS) - HDprintf("Need at least 2 processes to run MPIO test.\n"); - HDprintf(" -SKIP- \n"); + printf("Need at least 2 processes to run MPIO test.\n"); + printf(" -SKIP- \n"); return 0; } bufsize = 4093; /* use some prime number for size */ - if (NULL == (buf = HDmalloc((size_t)bufsize))) { + if (NULL == (buf = malloc((size_t)bufsize))) { if (MAINPROCESS) - HDprintf("couldn't allocate buffer\n"); + printf("couldn't allocate buffer\n"); return 1; } @@ -142,12 +142,12 @@ test_mpio_overlap_writes(char *filename) unsigned char expected; expected = (unsigned char)(mpi_off + i); if ((expected != buf[i]) && (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED)) { - HDprintf("proc %d: found data error at [%ld], expect %u, got %u\n", mpi_rank, - (long)(mpi_off + i), expected, buf[i]); + printf("proc %d: found data error at [%ld], expect %u, got %u\n", mpi_rank, + (long)(mpi_off + i), expected, buf[i]); } } if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED) - HDprintf("proc %d: [more errors ...]\n", mpi_rank); + printf("proc %d: [more errors ...]\n", mpi_rank); nerrs += vrfyerrs; } @@ -166,7 +166,7 @@ test_mpio_overlap_writes(char *filename) mrc = MPI_Barrier(MPI_COMM_WORLD); VRFY((mrc == MPI_SUCCESS), "Sync before leaving test"); - HDfree(buf); + free(buf); return (nerrs); } @@ -212,7 +212,7 @@ test_mpio_gb_file(char *filename) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); if (VERBOSE_MED) - HDprintf("MPI_Offset range test\n"); + printf("MPI_Offset range test\n"); /* figure out the signness and sizeof MPI_Offset */ mpi_off = 0; @@ -224,11 +224,11 @@ test_mpio_gb_file(char *filename) * sizes. */ if (MAINPROCESS) { /* only process 0 needs to check it*/ - HDprintf("MPI_Offset is %s %d bytes integral type\n", is_signed ? "signed" : "unsigned", - (int)sizeof(MPI_Offset)); + printf("MPI_Offset is %s %d bytes integral type\n", is_signed ? "signed" : "unsigned", + (int)sizeof(MPI_Offset)); if (sizeof_mpi_offset <= 4 && is_signed) { - HDprintf("Skipped 2GB range test " - "because MPI_Offset cannot support it\n"); + printf("Skipped 2GB range test " + "because MPI_Offset cannot support it\n"); } else { /* verify correctness of assigning 2GB sizes */ @@ -249,8 +249,8 @@ test_mpio_gb_file(char *filename) } if (sizeof_mpi_offset <= 4) { - HDprintf("Skipped 4GB range test " - "because MPI_Offset cannot support it\n"); + printf("Skipped 4GB range test " + "because MPI_Offset cannot support it\n"); } else { /* verify correctness of assigning 4GB sizes */ @@ -275,14 +275,14 @@ test_mpio_gb_file(char *filename) * Verify if we can write to a file of multiple GB sizes. */ if (VERBOSE_MED) - HDprintf("MPIO GB file test %s\n", filename); + printf("MPIO GB file test %s\n", filename); if (sizeof_mpi_offset <= 4) { - HDprintf("Skipped GB file range test " - "because MPI_Offset cannot support it\n"); + printf("Skipped GB file range test " + "because MPI_Offset cannot support it\n"); } else { - buf = (char *)HDmalloc(MB); + buf = (char *)malloc(MB); VRFY((buf != NULL), "malloc succeed"); /* open a new file. Remove it first in case it exists. */ @@ -294,7 +294,7 @@ test_mpio_gb_file(char *filename) mrc = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_CREATE | MPI_MODE_RDWR, info, &fh); VRFY((mrc == MPI_SUCCESS), "MPI_FILE_OPEN"); - HDprintf("MPIO GB file write test %s\n", filename); + printf("MPIO GB file write test %s\n", filename); /* instead of writing every bytes of the file, we will just write * some data around the 2 and 4 GB boundaries. That should cover @@ -306,13 +306,12 @@ test_mpio_gb_file(char *filename) for (i = ntimes - 2; i <= ntimes; i++) { mpi_off = (i * mpi_size + mpi_rank) * (MPI_Offset)MB; if (VERBOSE_MED) - HDfprintf(stdout, "proc %d: write to mpi_off=%016llx, %lld\n", mpi_rank, mpi_off, - mpi_off); + fprintf(stdout, "proc %d: write to mpi_off=%016llx, %lld\n", mpi_rank, mpi_off, mpi_off); /* set data to some trivial pattern for easy verification */ for (j = 0; j < MB; j++) *(buf + j) = (int8_t)(i * mpi_size + mpi_rank); if (VERBOSE_MED) - HDfprintf(stdout, "proc %d: writing %d bytes at offset %lld\n", mpi_rank, MB, mpi_off); + fprintf(stdout, "proc %d: writing %d bytes at offset %lld\n", mpi_rank, MB, mpi_off); mrc = MPI_File_write_at(fh, mpi_off, buf, MB, MPI_BYTE, &mpi_stat); INFO((mrc == MPI_SUCCESS), "GB size file write"); if (mrc != MPI_SUCCESS) @@ -332,9 +331,9 @@ test_mpio_gb_file(char *filename) */ /* open it again to verify the data written */ /* but only if there was no write errors */ - HDprintf("MPIO GB file read test %s\n", filename); + printf("MPIO GB file read test %s\n", filename); if (errors_sum(writerrs) > 0) { - HDprintf("proc %d: Skip read test due to previous write errors\n", mpi_rank); + printf("proc %d: Skip read test due to previous write errors\n", mpi_rank); goto finish; } mrc = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_RDONLY, info, &fh); @@ -346,20 +345,19 @@ test_mpio_gb_file(char *filename) for (i = ntimes - 2; i <= ntimes; i++) { mpi_off = (i * mpi_size + (mpi_size - mpi_rank - 1)) * (MPI_Offset)MB; if (VERBOSE_MED) - HDfprintf(stdout, "proc %d: read from mpi_off=%016llx, %lld\n", mpi_rank, mpi_off, - mpi_off); + fprintf(stdout, "proc %d: read from mpi_off=%016llx, %lld\n", mpi_rank, mpi_off, mpi_off); mrc = MPI_File_read_at(fh, mpi_off, buf, MB, MPI_BYTE, &mpi_stat); INFO((mrc == MPI_SUCCESS), "GB size file read"); expected = (int8_t)(i * mpi_size + (mpi_size - mpi_rank - 1)); vrfyerrs = 0; for (j = 0; j < MB; j++) { if ((*(buf + j) != expected) && (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED)) { - HDprintf("proc %d: found data error at [%ld+%d], expect %d, got %d\n", mpi_rank, - (long)mpi_off, j, expected, *(buf + j)); + printf("proc %d: found data error at [%ld+%d], expect %d, got %d\n", mpi_rank, + (long)mpi_off, j, expected, *(buf + j)); } } if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED) - HDprintf("proc %d: [more errors ...]\n", mpi_rank); + printf("proc %d: [more errors ...]\n", mpi_rank); nerrs += vrfyerrs; } @@ -376,7 +374,7 @@ test_mpio_gb_file(char *filename) mrc = MPI_Barrier(MPI_COMM_WORLD); VRFY((mrc == MPI_SUCCESS), "Sync before leaving test"); - HDprintf("Test if MPI_File_get_size works correctly with %s\n", filename); + printf("Test if MPI_File_get_size works correctly with %s\n", filename); mrc = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_RDONLY, info, &fh); VRFY((mrc == MPI_SUCCESS), ""); @@ -401,7 +399,7 @@ test_mpio_gb_file(char *filename) finish: if (buf) - HDfree(buf); + free(buf); return (nerrs); } @@ -423,7 +421,7 @@ finish: */ #define DIMSIZE 32 /* Dimension size. */ -#define PRINTID HDprintf("Proc %d: ", mpi_rank) +#define PRINTID printf("Proc %d: ", mpi_rank) #define USENONE 0 #define USEATOM 1 /* request atomic I/O */ #define USEFSYNC 2 /* request file_sync */ @@ -449,24 +447,24 @@ test_mpio_1wMr(char *filename, int special_request) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); if (MAINPROCESS && VERBOSE_MED) { - HDprintf("Testing one process writes, all processes read.\n"); - HDprintf("Using %d processes accessing file %s\n", mpi_size, filename); - HDprintf(" (Filename can be specified via program argument)\n"); + printf("Testing one process writes, all processes read.\n"); + printf("Using %d processes accessing file %s\n", mpi_size, filename); + printf(" (Filename can be specified via program argument)\n"); } /* show the hostname so that we can tell where the processes are running */ if (VERBOSE_DEF) { #ifdef H5_HAVE_GETHOSTNAME if (HDgethostname(hostname, sizeof(hostname)) < 0) { - HDprintf("gethostname failed\n"); + printf("gethostname failed\n"); hostname[0] = '\0'; } #else - HDprintf("gethostname unavailable\n"); + printf("gethostname unavailable\n"); hostname[0] = '\0'; #endif PRINTID; - HDprintf("hostname=%s\n", hostname); + printf("hostname=%s\n", hostname); } /* Delete any old file in order to start anew. */ @@ -479,7 +477,7 @@ test_mpio_1wMr(char *filename, int special_request) &fh)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); PRINTID; - HDprintf("MPI_File_open failed (%s)\n", mpi_err_str); + printf("MPI_File_open failed (%s)\n", mpi_err_str); return 1; } @@ -491,29 +489,29 @@ test_mpio_1wMr(char *filename, int special_request) if ((mpi_err = MPI_File_get_atomicity(fh, &atomicity)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); PRINTID; - HDprintf("MPI_File_get_atomicity failed (%s)\n", mpi_err_str); + printf("MPI_File_get_atomicity failed (%s)\n", mpi_err_str); } if (VERBOSE_HI) - HDprintf("Initial atomicity = %d\n", atomicity); + printf("Initial atomicity = %d\n", atomicity); if ((mpi_err = MPI_File_set_atomicity(fh, 1)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); PRINTID; - HDprintf("MPI_File_set_atomicity failed (%s)\n", mpi_err_str); + printf("MPI_File_set_atomicity failed (%s)\n", mpi_err_str); } if ((mpi_err = MPI_File_get_atomicity(fh, &atomicity)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); PRINTID; - HDprintf("MPI_File_get_atomicity failed (%s)\n", mpi_err_str); + printf("MPI_File_get_atomicity failed (%s)\n", mpi_err_str); } if (VERBOSE_HI) - HDprintf("After set_atomicity atomicity = %d\n", atomicity); + printf("After set_atomicity atomicity = %d\n", atomicity); } /* This barrier is not necessary but do it anyway. */ MPI_Barrier(MPI_COMM_WORLD); if (VERBOSE_HI) { PRINTID; - HDprintf("between MPI_Barrier and MPI_File_write_at\n"); + printf("between MPI_Barrier and MPI_File_write_at\n"); } /* ================================================== @@ -529,14 +527,14 @@ test_mpio_1wMr(char *filename, int special_request) if (mpi_rank == irank) { if (VERBOSE_HI) { PRINTID; - HDprintf("wrote %d bytes at %ld\n", DIMSIZE, (long)mpi_off); + printf("wrote %d bytes at %ld\n", DIMSIZE, (long)mpi_off); } if ((mpi_err = MPI_File_write_at(fh, mpi_off, writedata, DIMSIZE, MPI_BYTE, &mpi_stat)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); PRINTID; - HDprintf("MPI_File_write_at offset(%ld), bytes (%d), failed (%s)\n", (long)mpi_off, DIMSIZE, - mpi_err_str); + printf("MPI_File_write_at offset(%ld), bytes (%d), failed (%s)\n", (long)mpi_off, DIMSIZE, + mpi_err_str); return 1; }; }; @@ -546,7 +544,7 @@ test_mpio_1wMr(char *filename, int special_request) MPI_Bcast(&mpi_err, 1, MPI_INT, irank, MPI_COMM_WORLD); if (VERBOSE_HI) { PRINTID; - HDprintf("MPI_Bcast: mpi_err = %d\n", mpi_err); + printf("MPI_Bcast: mpi_err = %d\n", mpi_err); } if (special_request & USEFSYNC) { @@ -555,19 +553,19 @@ test_mpio_1wMr(char *filename, int special_request) * should not need this. * ==================================================*/ if (VERBOSE_HI) - HDprintf("Apply MPI_File_sync\n"); + printf("Apply MPI_File_sync\n"); /* call file_sync to force the write out */ if ((mpi_err = MPI_File_sync(fh)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); PRINTID; - HDprintf("MPI_File_sync failed (%s)\n", mpi_err_str); + printf("MPI_File_sync failed (%s)\n", mpi_err_str); } MPI_Barrier(MPI_COMM_WORLD); /* call file_sync to force the write out */ if ((mpi_err = MPI_File_sync(fh)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); PRINTID; - HDprintf("MPI_File_sync failed (%s)\n", mpi_err_str); + printf("MPI_File_sync failed (%s)\n", mpi_err_str); } } @@ -576,7 +574,7 @@ test_mpio_1wMr(char *filename, int special_request) MPI_Barrier(MPI_COMM_WORLD); if (VERBOSE_HI) { PRINTID; - HDprintf("after MPI_Barrier\n"); + printf("after MPI_Barrier\n"); } /* ================================================== @@ -587,15 +585,15 @@ test_mpio_1wMr(char *filename, int special_request) if ((mpi_err = MPI_File_read_at(fh, mpi_off, readdata, DIMSIZE, MPI_BYTE, &mpi_stat)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); PRINTID; - HDprintf("MPI_File_read_at offset(%ld), bytes (%d), failed (%s)\n", (long)mpi_off, DIMSIZE, - mpi_err_str); + printf("MPI_File_read_at offset(%ld), bytes (%d), failed (%s)\n", (long)mpi_off, DIMSIZE, + mpi_err_str); return 1; }; for (i = 0; i < DIMSIZE; i++) { expect_val = (uint8_t)(irank * DIMSIZE + i); if (readdata[i] != expect_val) { PRINTID; - HDprintf("read data[%d:%d] got %02x, expect %02x\n", irank, i, readdata[i], expect_val); + printf("read data[%d:%d] got %02x, expect %02x\n", irank, i, readdata[i], expect_val); nerrs++; } } @@ -604,7 +602,7 @@ test_mpio_1wMr(char *filename, int special_request) if (VERBOSE_HI) { PRINTID; - HDprintf("%d data errors detected\n", nerrs); + printf("%d data errors detected\n", nerrs); } mpi_err = MPI_Barrier(MPI_COMM_WORLD); @@ -658,7 +656,7 @@ test_mpio_1wMr(char *filename, int special_request) 2. This test will verify whether the complicated derived datatype is working on the current platform. - If this bug has been fixed in the previous not-working package, this test will issue a HDprintf message to + If this bug has been fixed in the previous not-working package, this test will issue a printf message to tell the developer to change the configuration specific file of HDF5 so that we can change our configurationsetting to support collective IO for irregular selections. @@ -699,7 +697,7 @@ test_mpio_derived_dtype(char *filename) if ((mpi_err = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_RDWR | MPI_MODE_CREATE, MPI_INFO_NULL, &fh)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_File_open failed (%s)\n", mpi_err_str); + printf("MPI_File_open failed (%s)\n", mpi_err_str); return 1; } @@ -712,13 +710,13 @@ test_mpio_derived_dtype(char *filename) if ((mpi_err = MPI_Type_create_hindexed(count, blocklens, offsets, MPI_BYTE, &filetype)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_Type_contiguous failed (%s)\n", mpi_err_str); + printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str); return 1; } if ((mpi_err = MPI_Type_commit(&filetype)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_Type_commit failed (%s)\n", mpi_err_str); + printf("MPI_Type_commit failed (%s)\n", mpi_err_str); return 1; } @@ -728,13 +726,13 @@ test_mpio_derived_dtype(char *filename) if ((mpi_err = MPI_Type_create_hindexed(count, blocklens, offsets, MPI_BYTE, &filetypenew)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_Type_contiguous failed (%s)\n", mpi_err_str); + printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str); return 1; } if ((mpi_err = MPI_Type_commit(&filetypenew)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_Type_commit failed (%s)\n", mpi_err_str); + printf("MPI_Type_commit failed (%s)\n", mpi_err_str); return 1; } @@ -749,67 +747,67 @@ test_mpio_derived_dtype(char *filename) if ((mpi_err = MPI_Type_create_struct(outcount, adv_blocklens, adv_disp, bas_filetype, &adv_filetype)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_Type_create_struct failed (%s)\n", mpi_err_str); + printf("MPI_Type_create_struct failed (%s)\n", mpi_err_str); return 1; } if ((mpi_err = MPI_Type_commit(&adv_filetype)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_Type_commit failed (%s)\n", mpi_err_str); + printf("MPI_Type_commit failed (%s)\n", mpi_err_str); return 1; } if ((mpi_err = MPI_File_set_view(fh, disp, etype, adv_filetype, "native", MPI_INFO_NULL)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_File_set_view failed (%s)\n", mpi_err_str); + printf("MPI_File_set_view failed (%s)\n", mpi_err_str); return 1; } if ((mpi_err = MPI_File_write(fh, buf, 3, MPI_BYTE, &Status)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_File_write failed (%s)\n", mpi_err_str); + printf("MPI_File_write failed (%s)\n", mpi_err_str); return 1; } if ((mpi_err = MPI_File_close(&fh)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_File_close failed (%s)\n", mpi_err_str); + printf("MPI_File_close failed (%s)\n", mpi_err_str); return 1; } if ((mpi_err = MPI_Type_free(&filetype)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_Type_free failed (%s)\n", mpi_err_str); + printf("MPI_Type_free failed (%s)\n", mpi_err_str); return 1; } if ((mpi_err = MPI_Type_free(&adv_filetype)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_Type_free failed (%s)\n", mpi_err_str); + printf("MPI_Type_free failed (%s)\n", mpi_err_str); return 1; } if ((mpi_err = MPI_Type_free(&filetypenew)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_Type_free failed (%s)\n", mpi_err_str); + printf("MPI_Type_free failed (%s)\n", mpi_err_str); return 1; } if ((mpi_err = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_RDONLY, MPI_INFO_NULL, &fh)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_File_open failed (%s)\n", mpi_err_str); + printf("MPI_File_open failed (%s)\n", mpi_err_str); return 1; } if ((mpi_err = MPI_File_set_view(fh, 0, MPI_BYTE, MPI_BYTE, "native", MPI_INFO_NULL)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_File_set_view failed (%s)\n", mpi_err_str); + printf("MPI_File_set_view failed (%s)\n", mpi_err_str); return 1; } if ((mpi_err = MPI_File_read(fh, outbuf, 3, MPI_BYTE, &Status)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_File_read failed (%s)\n", mpi_err_str); + printf("MPI_File_read failed (%s)\n", mpi_err_str); return 1; } @@ -818,9 +816,9 @@ test_mpio_derived_dtype(char *filename) } else { /* if(mpi_rank == 0) { - HDprintf("complicated derived datatype is NOT working at this platform\n"); - HDprintf("go back to hdf5/config and find the corresponding\n"); - HDprintf("configure-specific file and change ?????\n"); + printf("complicated derived datatype is NOT working at this platform\n"); + printf("go back to hdf5/config and find the corresponding\n"); + printf("configure-specific file and change ?????\n"); } */ retcode = -1; @@ -828,15 +826,15 @@ test_mpio_derived_dtype(char *filename) if ((mpi_err = MPI_File_close(&fh)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_File_close failed (%s)\n", mpi_err_str); + printf("MPI_File_close failed (%s)\n", mpi_err_str); return 1; } mpi_err = MPI_Barrier(MPI_COMM_WORLD); if (retcode == -1) { if (mpi_rank == 0) { - HDprintf("Complicated derived datatype is NOT working at this platform\n"); - HDprintf(" Please report to help@hdfgroup.org about this problem.\n"); + printf("Complicated derived datatype is NOT working at this platform\n"); + printf(" Please report to help@hdfgroup.org about this problem.\n"); } retcode = 1; } @@ -861,7 +859,7 @@ test_mpio_derived_dtype(char *filename) 2. This test will fail with the MPI-IO package that doesn't support this. For example, mpich 1.2.6. - If this bug has been fixed in the previous not-working package, this test will issue a HDprintf message to + If this bug has been fixed in the previous not-working package, this test will issue a printf message to tell the developer to change the configuration specific file of HDF5 so that we can change our configurationsetting to support special collective IO; currently only special collective IO. @@ -913,25 +911,25 @@ test_mpio_special_collective(char *filename) if (count != 0) { if ((mpi_err = MPI_Type_create_hindexed(2, blocklens, offsets, etype, &filetype)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_Type_contiguous failed (%s)\n", mpi_err_str); + printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str); return 1; } /* end if */ if ((mpi_err = MPI_Type_commit(&filetype)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_Type_commit failed (%s)\n", mpi_err_str); + printf("MPI_Type_commit failed (%s)\n", mpi_err_str); return 1; } /* end if */ if ((mpi_err = MPI_Type_create_hindexed(2, blocklens, offsets, etype, &buftype)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_Type_contiguous failed (%s)\n", mpi_err_str); + printf("MPI_Type_contiguous failed (%s)\n", mpi_err_str); return 1; } /* end if */ if ((mpi_err = MPI_Type_commit(&buftype)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_Type_commit failed (%s)\n", mpi_err_str); + printf("MPI_Type_commit failed (%s)\n", mpi_err_str); return 1; } /* end if */ } /* end if */ @@ -940,7 +938,7 @@ test_mpio_special_collective(char *filename) if ((mpi_err = MPI_File_open(MPI_COMM_WORLD, filename, MPI_MODE_RDWR | MPI_MODE_CREATE, MPI_INFO_NULL, &fh)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_File_open failed (%s)\n", mpi_err_str); + printf("MPI_File_open failed (%s)\n", mpi_err_str); return 1; } /* end if */ @@ -952,13 +950,13 @@ test_mpio_special_collective(char *filename) if ((mpi_err = MPI_File_set_view(fh, mpi_off, MPI_BYTE, filetype, filerep, MPI_INFO_NULL)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_File_set_view failed (%s)\n", mpi_err_str); + printf("MPI_File_set_view failed (%s)\n", mpi_err_str); return 1; } /* end if */ if (filetype != MPI_BYTE && (mpi_err = MPI_Type_free(&filetype)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_Type_free failed (%s)\n", mpi_err_str); + printf("MPI_Type_free failed (%s)\n", mpi_err_str); return 1; } @@ -966,21 +964,21 @@ test_mpio_special_collective(char *filename) if ((mpi_err = MPI_File_write_at_all(fh, mpi_off, writedata, bufcount, buftype, &mpi_stat)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_File_write_at offset(%ld), bytes (%d), failed (%s)\n", (long)mpi_off, bufcount, - mpi_err_str); + printf("MPI_File_write_at offset(%ld), bytes (%d), failed (%s)\n", (long)mpi_off, bufcount, + mpi_err_str); return 1; } /* end if */ if (buftype != MPI_BYTE && (mpi_err = MPI_Type_free(&buftype)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_Type_free failed (%s)\n", mpi_err_str); + printf("MPI_Type_free failed (%s)\n", mpi_err_str); return 1; } /* Close the file */ if ((mpi_err = MPI_File_close(&fh)) != MPI_SUCCESS) { MPI_Error_string(mpi_err, mpi_err_str, &mpi_err_strlen); - HDprintf("MPI_File_close failed. \n"); + printf("MPI_File_close failed. \n"); return 1; } /* end if */ @@ -988,8 +986,8 @@ test_mpio_special_collective(char *filename) mpi_err = MPI_Barrier(MPI_COMM_WORLD); if (retcode != 0) { if (mpi_rank == 0) { - HDprintf("special collective IO is NOT working at this platform\n"); - HDprintf(" Please report to help@hdfgroup.org about this problem.\n"); + printf("special collective IO is NOT working at this platform\n"); + printf(" Please report to help@hdfgroup.org about this problem.\n"); } /* end if */ retcode = 1; } /* end if */ @@ -1047,15 +1045,15 @@ parse_options(int argc, char **argv) for (i = 0; i < n; i++) if (h5_fixname(FILENAME[i], plist, filenames[i], sizeof(filenames[i])) == NULL) { - HDprintf("h5_fixname failed\n"); + printf("h5_fixname failed\n"); nerrors++; return (1); } H5Pclose(plist); if (VERBOSE_MED) { - 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]); } } @@ -1068,10 +1066,10 @@ parse_options(int argc, char **argv) static void usage(void) { - HDprintf("Usage: t_mpi [-v<verbosity>] [-f <prefix>]\n"); - HDprintf("\t-v<verbosity>\tset verbose level (0-9,l,m,h)\n"); - HDprintf("\t-f <prefix>\tfilename prefix\n"); - HDprintf("\n"); + printf("Usage: t_mpi [-v<verbosity>] [-f <prefix>]\n"); + printf("\t-v<verbosity>\tset verbose level (0-9,l,m,h)\n"); + printf("\t-f <prefix>\tfilename prefix\n"); + printf("\n"); } /* @@ -1101,7 +1099,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"); }; H5open(); if (parse_options(argc, argv) != 0) { @@ -1111,9 +1109,9 @@ main(int argc, char **argv) } if (MAINPROCESS) { - HDprintf("===================================\n"); - HDprintf("MPI functionality tests\n"); - HDprintf("===================================\n"); + printf("===================================\n"); + printf("MPI functionality tests\n"); + printf("===================================\n"); } if (VERBOSE_MED) @@ -1132,7 +1130,7 @@ main(int argc, char **argv) ret_code = test_mpio_1wMr(filenames[0], USENONE); ret_code = errors_sum(ret_code); if (mpi_rank == 0 && ret_code > 0) { - HDprintf("***FAILED with %d total errors\n", ret_code); + printf("***FAILED with %d total errors\n", ret_code); nerrors += ret_code; } @@ -1143,7 +1141,7 @@ main(int argc, char **argv) ret_code = test_mpio_1wMr(filenames[0], USEATOM); ret_code = errors_sum(ret_code); if (mpi_rank == 0 && ret_code > 0) { - HDprintf("***FAILED with %d total errors\n", ret_code); + printf("***FAILED with %d total errors\n", ret_code); nerrors += ret_code; } @@ -1151,7 +1149,7 @@ main(int argc, char **argv) ret_code = test_mpio_1wMr(filenames[0], USEFSYNC); ret_code = errors_sum(ret_code); if (mpi_rank == 0 && ret_code > 0) { - HDprintf("***FAILED with %d total errors\n", ret_code); + printf("***FAILED with %d total errors\n", ret_code); nerrors += ret_code; } } @@ -1164,12 +1162,12 @@ main(int argc, char **argv) ret_code = test_mpio_gb_file(filenames[0]); ret_code = errors_sum(ret_code); if (mpi_rank == 0 && ret_code > 0) { - HDprintf("***FAILED with %d total errors\n", ret_code); + printf("***FAILED with %d total errors\n", ret_code); nerrors += ret_code; } #else if (mpi_rank == 0) - HDprintf(" will be skipped on Windows (JIRA HDDFV-8064)\n"); + printf(" will be skipped on Windows (JIRA HDDFV-8064)\n"); #endif /*======================================= @@ -1179,7 +1177,7 @@ main(int argc, char **argv) ret_code = test_mpio_overlap_writes(filenames[0]); ret_code = errors_sum(ret_code); if (mpi_rank == 0 && ret_code > 0) { - HDprintf("***FAILED with %d total errors\n", ret_code); + printf("***FAILED with %d total errors\n", ret_code); nerrors += ret_code; } @@ -1190,7 +1188,7 @@ main(int argc, char **argv) ret_code = test_mpio_derived_dtype(filenames[0]); ret_code = errors_sum(ret_code); if (mpi_rank == 0 && ret_code > 0) { - HDprintf("***FAILED with %d total errors\n", ret_code); + printf("***FAILED with %d total errors\n", ret_code); nerrors += ret_code; } @@ -1200,7 +1198,7 @@ main(int argc, char **argv) if (mpi_size < 4) { MPI_BANNER("MPIO special collective io test SKIPPED."); if (mpi_rank == 0) - HDprintf("This test needs at least four processes to run.\n"); + printf("This test needs at least four processes to run.\n"); ret_code = 0; goto sc_finish; } /* end if */ @@ -1211,7 +1209,7 @@ main(int argc, char **argv) sc_finish: ret_code = errors_sum(ret_code); if (mpi_rank == 0 && ret_code > 0) { - HDprintf("***FAILED with %d total errors\n", ret_code); + printf("***FAILED with %d total errors\n", ret_code); nerrors += ret_code; } @@ -1221,14 +1219,14 @@ finish: */ MPI_Barrier(MPI_COMM_WORLD); if (MAINPROCESS) { /* only process 0 reports */ - HDprintf("===================================\n"); + printf("===================================\n"); if (nerrors) { - HDprintf("***MPI tests detected %d errors***\n", nerrors); + printf("***MPI tests detected %d errors***\n", nerrors); } else { - HDprintf("MPI tests finished with no errors\n"); + printf("MPI tests finished with no errors\n"); } - HDprintf("===================================\n"); + printf("===================================\n"); } /* turn off alarm */ diff --git a/testpar/t_pflush1.c b/testpar/t_pflush1.c index edfbcfe..035a4e8 100644 --- a/testpar/t_pflush1.c +++ b/testpar/t_pflush1.c @@ -142,10 +142,10 @@ main(int argc, char *argv[]) HDputs(" Test not compatible with current Virtual File Driver"); } MPI_Finalize(); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } - if (NULL == (data_g = HDmalloc(100 * 100 * sizeof(*data_g)))) + if (NULL == (data_g = malloc(100 * 100 * sizeof(*data_g)))) goto error; if ((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) @@ -169,8 +169,8 @@ main(int argc, char *argv[]) if (mpi_rank == 0) PASSED(); - HDfflush(stdout); - HDfflush(stderr); + fflush(stdout); + fflush(stderr); /* Some systems like AIX do not like files not being closed when MPI_Finalize * is called. So, we need to get the MPI file handles, close them by hand. @@ -191,11 +191,11 @@ main(int argc, char *argv[]) if (MPI_File_close(mpifh_p) != MPI_SUCCESS) goto error; - HDfflush(stdout); - HDfflush(stderr); + fflush(stdout); + fflush(stderr); if (data_g) { - HDfree(data_g); + free(data_g); data_g = NULL; } @@ -207,17 +207,17 @@ main(int argc, char *argv[]) * always ignore the failure condition than to handle some * platforms returning success and others failure. */ - HD_exit(EXIT_FAILURE); + _exit(EXIT_FAILURE); error: - HDfflush(stdout); - HDfflush(stderr); - HDprintf("*** ERROR ***\n"); - HDprintf("THERE WAS A REAL ERROR IN t_pflush1.\n"); - HDfflush(stdout); + fflush(stdout); + fflush(stderr); + printf("*** ERROR ***\n"); + printf("THERE WAS A REAL ERROR IN t_pflush1.\n"); + fflush(stdout); if (data_g) - HDfree(data_g); + free(data_g); - HD_exit(EXIT_FAILURE); + _exit(EXIT_FAILURE); } /* end main() */ diff --git a/testpar/t_pflush2.c b/testpar/t_pflush2.c index 3e42351..391a59c 100644 --- a/testpar/t_pflush2.c +++ b/testpar/t_pflush2.c @@ -68,7 +68,7 @@ check_test_file(char *name, size_t name_length, hid_t fapl_id) goto error; if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0) goto error; - HDassert(100 == dims[0] && 100 == dims[1]); + assert(100 == dims[0] && 100 == dims[1]); /* Read some data */ if (H5Dread(did, H5T_NATIVE_INT, sid, sid, dxpl_id, data_g) < 0) @@ -78,9 +78,9 @@ check_test_file(char *name, size_t name_length, hid_t fapl_id) val = (int)(i + (i * j) + j); if (data_g[(i * 100) + j] != val) { H5_FAILED(); - HDprintf(" data_g[%lu][%lu] = %d\n", (unsigned long)i, (unsigned long)j, - data_g[(i * 100) + j]); - HDprintf(" should be %d\n", val); + printf(" data_g[%lu][%lu] = %d\n", (unsigned long)i, (unsigned long)j, + data_g[(i * 100) + j]); + printf(" should be %d\n", val); } } } @@ -167,10 +167,10 @@ main(int argc, char *argv[]) HDputs(" Test not compatible with current Virtual File Driver"); } MPI_Finalize(); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); } - if (NULL == (data_g = HDmalloc(100 * 100 * sizeof(*data_g)))) + if (NULL == (data_g = malloc(100 * 100 * sizeof(*data_g)))) goto error; if ((fapl_id1 = H5Pcreate(H5P_FILE_ACCESS)) < 0) @@ -217,17 +217,17 @@ main(int argc, char *argv[]) h5_clean_files(&FILENAME[1], fapl_id2); if (data_g) { - HDfree(data_g); + free(data_g); data_g = NULL; } MPI_Finalize(); - HDexit(EXIT_SUCCESS); + exit(EXIT_SUCCESS); error: if (data_g) - HDfree(data_g); + free(data_g); - HDexit(EXIT_FAILURE); + exit(EXIT_FAILURE); } /* end main() */ diff --git a/testpar/t_ph5basic.c b/testpar/t_ph5basic.c index cef5d12..697b6e9 100644 --- a/testpar/t_ph5basic.c +++ b/testpar/t_ph5basic.c @@ -46,13 +46,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 @@ -62,7 +62,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); @@ -99,7 +99,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) { @@ -146,7 +146,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) { @@ -165,7 +165,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/t_pmulti_dset.c b/testpar/t_pmulti_dset.c index dd9a71a..d7561d2 100644 --- a/testpar/t_pmulti_dset.c +++ b/testpar/t_pmulti_dset.c @@ -160,15 +160,15 @@ test_pmdset(size_t niter, unsigned flags) dcpl_id[i] = -1; /* Allocate buffers */ - if (NULL == (rbuf = (unsigned *)HDmalloc(buf_size))) + if (NULL == (rbuf = (unsigned *)malloc(buf_size))) T_PMD_ERROR; - if (NULL == (erbuf = (unsigned *)HDmalloc(buf_size))) + if (NULL == (erbuf = (unsigned *)malloc(buf_size))) T_PMD_ERROR; - if (NULL == (wbuf = (unsigned *)HDmalloc(buf_size))) + if (NULL == (wbuf = (unsigned *)malloc(buf_size))) T_PMD_ERROR; - if (NULL == (efbuf = (unsigned *)HDmalloc(buf_size))) + if (NULL == (efbuf = (unsigned *)malloc(buf_size))) T_PMD_ERROR; - if (NULL == (dset_usage = (unsigned char *)HDmalloc(max_dsets * MAX_DSET_X * MAX_DSET_Y))) + if (NULL == (dset_usage = (unsigned char *)malloc(max_dsets * MAX_DSET_X * MAX_DSET_Y))) T_PMD_ERROR; /* Initialize buffer indices */ @@ -312,8 +312,8 @@ test_pmdset(size_t niter, unsigned flags) } /* end for */ /* Initialize read buffer and expected read buffer */ - (void)HDmemset(rbuf, 0, buf_size); - (void)HDmemset(erbuf, 0, buf_size); + (void)memset(rbuf, 0, buf_size); + (void)memset(erbuf, 0, buf_size); /* Initialize write buffer */ for (j = 0; j < max_dsets; j++) @@ -323,7 +323,7 @@ test_pmdset(size_t niter, unsigned flags) (j * MAX_DSET_X * MAX_DSET_Y) + (k * MAX_DSET_Y) + l); /* Initialize expected file buffer */ - (void)HDmemset(efbuf, 0, buf_size); + (void)memset(efbuf, 0, buf_size); /* Set last_read to TRUE so we don't reopen the file on the first * iteration */ @@ -384,7 +384,7 @@ test_pmdset(size_t niter, unsigned flags) /* Reset dataset usage array, if writing */ if (!do_read) - HDmemset(dset_usage, 0, max_dsets * MAX_DSET_X * MAX_DSET_Y); + memset(dset_usage, 0, max_dsets * MAX_DSET_X * MAX_DSET_Y); /* Iterate over processes */ for (l = 0; l < (size_t)mpi_size; l++) { @@ -473,7 +473,7 @@ test_pmdset(size_t niter, unsigned flags) /* Reset dataset usage array if reading, since in this case we don't care * about overlapping selections between processes */ if (do_read) - HDmemset(dset_usage, 0, max_dsets * MAX_DSET_X * MAX_DSET_Y); + memset(dset_usage, 0, max_dsets * MAX_DSET_X * MAX_DSET_Y); /* Generate points */ for (m = 0; m < npoints; m++) { diff --git a/testpar/t_pread.c b/testpar/t_pread.c index d05ec46..3f8f5b2 100644 --- a/testpar/t_pread.c +++ b/testpar/t_pread.c @@ -111,7 +111,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id) pass = TRUE; - HDassert(comm != MPI_COMM_NULL); + assert(comm != MPI_COMM_NULL); if ((MPI_Comm_rank(comm, &group_rank)) != MPI_SUCCESS) { pass = FALSE; @@ -125,7 +125,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id) if (mpi_rank == 0) { - HDfprintf(stdout, "Constructing test files..."); + fprintf(stdout, "Constructing test files..."); } /* Setup the file names @@ -151,7 +151,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id) * need to worry that we reassign it for each file! */ group_filename = FILENAMES[file_index]; - HDassert(group_filename); + assert(group_filename); /* Assign the 'data_filename' */ if (h5_fixname(group_filename, H5P_DEFAULT, data_filename, sizeof(data_filename)) == NULL) { @@ -162,7 +162,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id) /* setup data to write */ if (pass) { - if ((data_slice = (float *)HDmalloc(COUNT * sizeof(float))) == NULL) { + if ((data_slice = (float *)malloc(COUNT * sizeof(float))) == NULL) { pass = FALSE; failure_mssg = "malloc of data_slice failed.\n"; } @@ -429,17 +429,17 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id) /* report results */ if (mpi_rank == 0) { if (pass) { - HDfprintf(stdout, "Done.\n"); + fprintf(stdout, "Done.\n"); } else { - HDfprintf(stdout, "FAILED.\n"); - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + fprintf(stdout, "FAILED.\n"); + fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } } /* free data_slice if it has been allocated */ if (data_slice != NULL) { - HDfree(data_slice); + free(data_slice); data_slice = NULL; } @@ -513,7 +513,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id) pass = TRUE; - HDassert(comm != MPI_COMM_NULL); + assert(comm != MPI_COMM_NULL); if ((MPI_Comm_rank(comm, &group_rank)) != MPI_SUCCESS) { pass = FALSE; @@ -536,7 +536,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id) /* allocate space for the data_slice array */ if (pass) { - if ((data_slice = (float *)HDmalloc(COUNT * sizeof(float))) == NULL) { + if ((data_slice = (float *)malloc(COUNT * sizeof(float))) == NULL) { pass = FALSE; failure_mssg = "malloc of data_slice failed.\n"; } @@ -555,7 +555,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id) else /* test 2 group 1 */ group_filename = FILENAMES[2]; - HDassert(group_filename); + assert(group_filename); if (h5_fixname(group_filename, H5P_DEFAULT, reloc_data_filename, sizeof(reloc_data_filename)) == NULL) { @@ -670,7 +670,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id) /* free data_slice if it has been allocated */ if (data_slice != NULL) { - HDfree(data_slice); + free(data_slice); data_slice = NULL; } @@ -710,7 +710,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id) failure_mssg = "H5Tclose failed.\n"; }; - if ((data_slice = (float *)HDmalloc((size_t)dset_size * filetype_size)) == NULL) { + if ((data_slice = (float *)malloc((size_t)dset_size * filetype_size)) == NULL) { pass = FALSE; failure_mssg = "malloc of data_slice failed.\n"; } @@ -861,7 +861,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id) /* free data_slice if it has been allocated */ if (data_slice != NULL) { - HDfree(data_slice); + free(data_slice); data_slice = NULL; } @@ -869,7 +869,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id) * Read an H5S_ALL filespace into a hyperslab defined memory space */ - if ((data_slice = (float *)HDmalloc((size_t)(dset_size * 2) * filetype_size)) == NULL) { + if ((data_slice = (float *)malloc((size_t)(dset_size * 2) * filetype_size)) == NULL) { pass = FALSE; failure_mssg = "malloc of data_slice failed.\n"; } @@ -958,7 +958,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id) /* free data_slice if it has been allocated */ if (data_slice != NULL) { - HDfree(data_slice); + free(data_slice); data_slice = NULL; } @@ -1023,7 +1023,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id) } else { H5_FAILED(); - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } HDremove(reloc_data_filename); } @@ -1077,34 +1077,34 @@ main(int argc, char **argv) test_argv0 = HDstrdup(argv[0]); if ((MPI_Init(&argc, &argv)) != MPI_SUCCESS) { - HDfprintf(stderr, "FATAL: Unable to initialize MPI\n"); - HDexit(EXIT_FAILURE); + fprintf(stderr, "FATAL: Unable to initialize MPI\n"); + exit(EXIT_FAILURE); } if ((MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank)) != MPI_SUCCESS) { - HDfprintf(stderr, "FATAL: MPI_Comm_rank returned an error\n"); - HDexit(EXIT_FAILURE); + fprintf(stderr, "FATAL: MPI_Comm_rank returned an error\n"); + exit(EXIT_FAILURE); } if ((MPI_Comm_size(MPI_COMM_WORLD, &mpi_size)) != MPI_SUCCESS) { - HDfprintf(stderr, "FATAL: MPI_Comm_size returned an error\n"); - HDexit(EXIT_FAILURE); + fprintf(stderr, "FATAL: MPI_Comm_size returned an error\n"); + exit(EXIT_FAILURE); } H5open(); if (mpi_rank == 0) { - HDfprintf(stdout, "========================================\n"); - HDfprintf(stdout, "Collective file open optimization tests\n"); - HDfprintf(stdout, " mpi_size = %d\n", mpi_size); - HDfprintf(stdout, "========================================\n"); + fprintf(stdout, "========================================\n"); + fprintf(stdout, "Collective file open optimization tests\n"); + fprintf(stdout, " mpi_size = %d\n", mpi_size); + fprintf(stdout, "========================================\n"); } if (mpi_size < 3) { if (mpi_rank == 0) { - HDprintf(" Need at least 3 processes. Exiting.\n"); + printf(" Need at least 3 processes. Exiting.\n"); } goto finish; } @@ -1121,8 +1121,8 @@ main(int argc, char **argv) if ((MPI_Comm_split(MPI_COMM_WORLD, which_group, 0, &group_comm)) != MPI_SUCCESS) { - HDfprintf(stderr, "FATAL: MPI_Comm_split returned an error\n"); - HDexit(EXIT_FAILURE); + fprintf(stderr, "FATAL: MPI_Comm_split returned an error\n"); + exit(EXIT_FAILURE); } /* ------ Generate all files ------ */ @@ -1132,7 +1132,7 @@ main(int argc, char **argv) if (nerrs > 0) { if (mpi_rank == 0) { - HDprintf(" Test(1) file construction failed -- skipping tests.\n"); + printf(" Test(1) file construction failed -- skipping tests.\n"); } goto finish; } @@ -1142,7 +1142,7 @@ main(int argc, char **argv) if (nerrs > 0) { if (mpi_rank == 0) { - HDprintf(" Test(2) file construction failed -- skipping tests.\n"); + printf(" Test(2) file construction failed -- skipping tests.\n"); } goto finish; } @@ -1152,15 +1152,15 @@ main(int argc, char **argv) if (nerrs > 0) { if (mpi_rank == 0) { - HDprintf(" Parallel read test(1) failed -- skipping tests.\n"); + printf(" Parallel read test(1) failed -- skipping tests.\n"); } goto finish; } /* Update the user on our progress so far. */ if (mpi_rank == 0) { - HDprintf(" Test 1 of 2 succeeded\n"); - HDprintf(" -- Starting multi-group parallel read test.\n"); + printf(" Test 1 of 2 succeeded\n"); + printf(" -- Starting multi-group parallel read test.\n"); } /* run the 2nd set of tests */ @@ -1168,19 +1168,19 @@ main(int argc, char **argv) if (nerrs > 0) { if (mpi_rank == 0) { - HDprintf(" Multi-group read test(2) failed\n"); + printf(" Multi-group read test(2) failed\n"); } goto finish; } if (mpi_rank == 0) { - HDprintf(" Test 2 of 2 succeeded\n"); + printf(" Test 2 of 2 succeeded\n"); } finish: if ((group_comm != MPI_COMM_NULL) && (MPI_Comm_free(&group_comm)) != MPI_SUCCESS) { - HDfprintf(stderr, "MPI_Comm_free failed!\n"); + fprintf(stderr, "MPI_Comm_free failed!\n"); } /* make sure all processes are finished before final report, cleanup @@ -1191,19 +1191,19 @@ finish: if (mpi_rank == 0) { /* only process 0 reports */ const char *header = "Collective file open optimization tests"; - HDfprintf(stdout, "===================================\n"); + fprintf(stdout, "===================================\n"); if (nerrs > 0) { - HDfprintf(stdout, "***%s detected %d failures***\n", header, nerrs); + fprintf(stdout, "***%s detected %d failures***\n", header, nerrs); } else { - HDfprintf(stdout, "%s finished with no failures\n", header); + fprintf(stdout, "%s finished with no failures\n", header); } - HDfprintf(stdout, "===================================\n"); + fprintf(stdout, "===================================\n"); } /* close HDF5 library */ if (H5close() != SUCCEED) { - HDfprintf(stdout, "H5close() failed. (Ignoring)\n"); + fprintf(stdout, "H5close() failed. (Ignoring)\n"); } /* MPI_Finalize must be called AFTER H5close which may use MPI calls */ diff --git a/testpar/t_prestart.c b/testpar/t_prestart.c index bfa72b6..514906a 100644 --- a/testpar/t_prestart.c +++ b/testpar/t_prestart.c @@ -74,8 +74,8 @@ main(int argc, char **argv) VRFY(dims[1] == (hsize_t)(COL_FACTOR * mpi_size), "Wrong dataset dimensions"); /* allocate memory for data buffer */ - data_array = (DATATYPE *)HDmalloc(dims[0] * dims[1] * sizeof(DATATYPE)); - VRFY((data_array != NULL), "data_array HDmalloc succeeded"); + data_array = (DATATYPE *)malloc(dims[0] * dims[1] * sizeof(DATATYPE)); + VRFY((data_array != NULL), "data_array malloc succeeded"); /* Each process takes a slabs of rows. */ block[0] = dims[0] / (hsize_t)mpi_size; @@ -103,9 +103,9 @@ main(int argc, char **argv) for (i = 0; i < block[0]; i++) { for (j = 0; j < block[1]; j++) { if (*dataptr != mpi_rank + 1) { - HDprintf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n", - (unsigned long)i, (unsigned long)j, (unsigned long)((hsize_t)i + start[0]), - (unsigned long)((hsize_t)j + start[1]), mpi_rank + 1, *(dataptr)); + printf("Dataset Verify failed at [%lu][%lu](row %lu, col %lu): expect %d, got %d\n", + (unsigned long)i, (unsigned long)j, (unsigned long)((hsize_t)i + start[0]), + (unsigned long)((hsize_t)j + start[1]), mpi_rank + 1, *(dataptr)); nerrors++; } dataptr++; @@ -116,7 +116,7 @@ main(int argc, char **argv) /* release data buffers */ if (data_array) - HDfree(data_array); + free(data_array); nerrors += GetTestNumErrs(); diff --git a/testpar/t_prop.c b/testpar/t_prop.c index 6f7e28b..c6eb99c 100644 --- a/testpar/t_prop.c +++ b/testpar/t_prop.c @@ -35,7 +35,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc) ret = H5Pencode2(orig_pl, NULL, &buf_size, H5P_DEFAULT); VRFY((ret >= 0), "H5Pencode succeeded"); - sbuf = (uint8_t *)HDmalloc(buf_size); + sbuf = (uint8_t *)malloc(buf_size); ret = H5Pencode2(orig_pl, sbuf, &buf_size, H5P_DEFAULT); VRFY((ret >= 0), "H5Pencode succeeded"); @@ -53,7 +53,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc) MPI_Recv(&recv_size, 1, MPI_INT, 0, 123, MPI_COMM_WORLD, &status); buf_size = (size_t)recv_size; - rbuf = (uint8_t *)HDmalloc(buf_size); + rbuf = (uint8_t *)malloc(buf_size); MPI_Recv(rbuf, recv_size, MPI_BYTE, 0, 124, MPI_COMM_WORLD, &status); pl = H5Pdecode(rbuf); @@ -65,7 +65,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc) VRFY((ret >= 0), "H5Pclose succeeded"); if (NULL != rbuf) - HDfree(rbuf); + free(rbuf); } /* end if */ if (0 == mpi_rank) { @@ -80,7 +80,7 @@ test_encode_decode(hid_t orig_pl, int mpi_rank, int recv_proc) } if (NULL != sbuf) - HDfree(sbuf); + free(sbuf); MPI_Barrier(MPI_COMM_WORLD); return 0; @@ -147,7 +147,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); @@ -474,7 +474,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/t_pshutdown.c b/testpar/t_pshutdown.c index 278fd09..013dc1e 100644 --- a/testpar/t_pshutdown.c +++ b/testpar/t_pshutdown.c @@ -73,8 +73,8 @@ main(int argc, char **argv) VRFY((dset_id >= 0), "H5Dcreate succeeded"); /* allocate memory for data buffer */ - data_array = (DATATYPE *)HDmalloc(dims[0] * dims[1] * sizeof(DATATYPE)); - VRFY((data_array != NULL), "data_array HDmalloc succeeded"); + data_array = (DATATYPE *)malloc(dims[0] * dims[1] * sizeof(DATATYPE)); + VRFY((data_array != NULL), "data_array malloc succeeded"); /* Each process takes a slabs of rows. */ block[0] = dims[0] / (hsize_t)mpi_size; @@ -103,7 +103,7 @@ main(int argc, char **argv) /* release data buffers */ if (data_array) - HDfree(data_array); + free(data_array); MPI_Finalize(); diff --git a/testpar/t_select_io_dset.c b/testpar/t_select_io_dset.c index 10b29e4..eb64bfe 100644 --- a/testpar/t_select_io_dset.c +++ b/testpar/t_select_io_dset.c @@ -168,15 +168,15 @@ check_io_mode(hid_t dxpl, unsigned chunked) if (actual_io_mode != H5D_MPIO_CHUNK_COLLECTIVE) { nerrors++; if (MAINPROCESS) - HDprintf("\n Failed: Incorrect I/O mode (expected chunked, returned %u)", - (unsigned)actual_io_mode); + printf("\n Failed: Incorrect I/O mode (expected chunked, returned %u)", + (unsigned)actual_io_mode); } } else if (actual_io_mode != H5D_MPIO_CONTIGUOUS_COLLECTIVE) { nerrors++; if (MAINPROCESS) - HDprintf("\n Failed: Incorrect I/O mode (expected contiguous, returned %u)", - (unsigned)actual_io_mode); + printf("\n Failed: Incorrect I/O mode (expected contiguous, returned %u)", + (unsigned)actual_io_mode); } } /* check_io_mode() */ @@ -269,7 +269,7 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf) /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(wbuf_bak, wbuf, sizeof(wbuf)); + memcpy(wbuf_bak, wbuf, sizeof(wbuf)); /* Write data to the dataset with/without data transform */ if (H5Dwrite(did, H5T_NATIVE_INT, mspace_id, fspace_id, dxpl, wbuf) < 0) @@ -277,7 +277,7 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf) /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(wbuf, wbuf_bak, sizeof(wbuf)); + memcpy(wbuf, wbuf_bak, sizeof(wbuf)); check_io_mode(dxpl, chunked); @@ -289,9 +289,9 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf) for (i = 0; i < (int)block[0]; i++) if (rbuf[i] != (dtrans ? trans_wbuf[i] : wbuf[i])) { nerrors++; - HDprintf("\n Error in first data verification:\n"); - HDprintf(" At index %d: %d, %d\n", i + (int)start[0], dtrans ? trans_wbuf[i] : wbuf[i], - rbuf[i]); + printf("\n Error in first data verification:\n"); + printf(" At index %d: %d, %d\n", i + (int)start[0], dtrans ? trans_wbuf[i] : wbuf[i], + rbuf[i]); break; } @@ -305,8 +305,8 @@ test_no_type_conv(hid_t fid, unsigned chunked, unsigned dtrans, unsigned mwbuf) for (i = 0; i < (int)block[0]; i++) if (rbuf[i] != (2 * trans_wbuf[i])) { nerrors++; - HDprintf("\n Error in second data verification:.\n"); - HDprintf(" At index %d: %d, %d\n", i + (int)start[0], 2 * trans_wbuf[i], rbuf[i]); + printf("\n Error in second data verification:.\n"); + printf(" At index %d: %d, %d\n", i + (int)start[0], 2 * trans_wbuf[i], rbuf[i]); break; } } @@ -353,11 +353,11 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) curr_nerrors = nerrors; - if ((wbuf = (char *)HDmalloc((size_t)(4 * DSET_SELECT_DIM))) == NULL) + if ((wbuf = (char *)malloc((size_t)(4 * DSET_SELECT_DIM))) == NULL) P_TEST_ERROR; - if (mwbuf && (wbuf_bak = (char *)HDmalloc((size_t)(4 * DSET_SELECT_DIM))) == NULL) + if (mwbuf && (wbuf_bak = (char *)malloc((size_t)(4 * DSET_SELECT_DIM))) == NULL) P_TEST_ERROR; - if ((rbuf = (char *)HDmalloc((size_t)(4 * DSET_SELECT_DIM))) == NULL) + if ((rbuf = (char *)malloc((size_t)(4 * DSET_SELECT_DIM))) == NULL) P_TEST_ERROR; /* Create 1d data space */ @@ -415,7 +415,7 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(wbuf_bak, wbuf, (size_t)(4 * DSET_SELECT_DIM)); + memcpy(wbuf_bak, wbuf, (size_t)(4 * DSET_SELECT_DIM)); /* Write the data to the dataset with little endian */ if (H5Dwrite(did, H5T_STD_I32LE, mspace_id, fspace_id, dxpl, wbuf) < 0) @@ -423,7 +423,7 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(wbuf, wbuf_bak, (size_t)(4 * DSET_SELECT_DIM)); + memcpy(wbuf, wbuf_bak, (size_t)(4 * DSET_SELECT_DIM)); check_io_mode(dxpl, chunked); @@ -436,8 +436,8 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) if (rbuf[4 * i + 0] != wbuf[4 * i + 0] || rbuf[4 * i + 1] != wbuf[4 * i + 1] || rbuf[4 * i + 2] != wbuf[4 * i + 2] || rbuf[4 * i + 3] != wbuf[4 * i + 3]) { nerrors++; - HDprintf("\n Error in data verification:\n"); - HDprintf("\n Error in data verification at index %d\n", i + (int)start[0]); + printf("\n Error in data verification:\n"); + printf("\n Error in data verification at index %d\n", i + (int)start[0]); break; } } @@ -451,7 +451,7 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) if (rbuf[4 * i + 0] != wbuf[4 * i + 3] || rbuf[4 * i + 1] != wbuf[4 * i + 2] || rbuf[4 * i + 2] != wbuf[4 * i + 1] || rbuf[4 * i + 3] != wbuf[4 * i + 0]) { nerrors++; - HDprintf("\n Error in data verification at index %d\n", i + (int)start[0]); + printf("\n Error in data verification at index %d\n", i + (int)start[0]); break; } } @@ -467,13 +467,13 @@ test_no_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) P_TEST_ERROR; if (wbuf) - HDfree(wbuf); + free(wbuf); if (wbuf_bak) - HDfree(wbuf_bak); + free(wbuf_bak); if (rbuf) - HDfree(rbuf); + free(rbuf); CHECK_PASSED(); @@ -567,7 +567,7 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(wbuf_bak, wbuf, sizeof(wbuf)); + memcpy(wbuf_bak, wbuf, sizeof(wbuf)); /* Write data to the dataset with/without data transform set in dxpl */ if (H5Dwrite(did, H5T_NATIVE_LONG, mspace_id, fspace_id, dxpl, wbuf) < 0) @@ -575,7 +575,7 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(wbuf, wbuf_bak, sizeof(wbuf)); + memcpy(wbuf, wbuf_bak, sizeof(wbuf)); check_io_mode(dxpl, chunked); @@ -587,9 +587,9 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign for (i = 0; i < (int)block[0]; i++) if (rbuf[i] != (long long)(dtrans ? trans_wbuf[i] : wbuf[i])) { nerrors++; - HDprintf("\n Error in first data verification:\n"); - HDprintf(" At index %d: %lld, %lld\n", i + (int)start[0], - (long long)(dtrans ? trans_wbuf[i] : wbuf[i]), rbuf[i]); + printf("\n Error in first data verification:\n"); + printf(" At index %d: %lld, %lld\n", i + (int)start[0], + (long long)(dtrans ? trans_wbuf[i] : wbuf[i]), rbuf[i]); break; } @@ -603,9 +603,9 @@ test_larger_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsign for (i = 0; i < (int)block[0]; i++) if (rbuf[i] != (long long)(100 - trans_wbuf[i])) { nerrors++; - HDprintf("\n Error in second data verification:.\n"); - HDprintf(" At index %d: %lld, %lld\n", i + (int)start[0], - (long long)(100 - trans_wbuf[i]), rbuf[i]); + printf("\n Error in second data verification:.\n"); + printf(" At index %d: %lld, %lld\n", i + (int)start[0], (long long)(100 - trans_wbuf[i]), + rbuf[i]); break; } } @@ -716,7 +716,7 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(wbuf_bak, wbuf, sizeof(wbuf)); + memcpy(wbuf_bak, wbuf, sizeof(wbuf)); /* Write data to the dataset with/without data transform in dxpl */ if (H5Dwrite(did, H5T_NATIVE_SHORT, mspace_id, fspace_id, dxpl, wbuf) < 0) @@ -724,7 +724,7 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(wbuf, wbuf_bak, sizeof(wbuf)); + memcpy(wbuf, wbuf_bak, sizeof(wbuf)); check_io_mode(dxpl, chunked); @@ -736,8 +736,8 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig for (i = 0; i < (int)block[0]; i++) if (rbuf[i] != (dtrans ? trans_wbuf[i] : wbuf[i])) { nerrors++; - HDprintf("\n Error in first data verification:\n"); - HDprintf(" At index %d: %d, %d\n", i + (int)start[0], wbuf[i], rbuf[i]); + printf("\n Error in first data verification:\n"); + printf(" At index %d: %d, %d\n", i + (int)start[0], wbuf[i], rbuf[i]); break; } @@ -751,9 +751,8 @@ test_smaller_mem_type_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsig for (i = 0; i < (int)block[0]; i++) if (rbuf[i] != (2 * (10 + trans_wbuf[i]))) { nerrors++; - HDprintf("\n Error in second data verification:.\n"); - HDprintf(" At index %d: %d, %d\n", i + (int)start[0], (2 * (10 - trans_wbuf[i])), - rbuf[i]); + printf("\n Error in second data verification:.\n"); + printf(" At index %d: %d, %d\n", i + (int)start[0], (2 * (10 - trans_wbuf[i])), rbuf[i]); break; } } @@ -827,17 +826,17 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) curr_nerrors = nerrors; /* Allocate buffers for datasets */ - if (NULL == (s1_wbuf = (s1_t *)HDmalloc(sizeof(s1_t) * DSET_SELECT_DIM))) + if (NULL == (s1_wbuf = (s1_t *)malloc(sizeof(s1_t) * DSET_SELECT_DIM))) P_TEST_ERROR; - if (mwbuf && NULL == (s1_wbuf_bak = (s1_t *)HDmalloc(sizeof(s1_t) * DSET_SELECT_DIM))) + if (mwbuf && NULL == (s1_wbuf_bak = (s1_t *)malloc(sizeof(s1_t) * DSET_SELECT_DIM))) P_TEST_ERROR; - if (NULL == (s1_rbuf = (s1_t *)HDmalloc(sizeof(s1_t) * DSET_SELECT_DIM))) + if (NULL == (s1_rbuf = (s1_t *)malloc(sizeof(s1_t) * DSET_SELECT_DIM))) P_TEST_ERROR; - if (NULL == (s2_wbuf = (s2_t *)HDmalloc(sizeof(s2_t) * DSET_SELECT_DIM))) + if (NULL == (s2_wbuf = (s2_t *)malloc(sizeof(s2_t) * DSET_SELECT_DIM))) P_TEST_ERROR; - if (mwbuf && NULL == (s2_wbuf_bak = (s2_t *)HDmalloc(sizeof(s2_t) * DSET_SELECT_DIM))) + if (mwbuf && NULL == (s2_wbuf_bak = (s2_t *)malloc(sizeof(s2_t) * DSET_SELECT_DIM))) P_TEST_ERROR; - if (NULL == (s2_rbuf = (s2_t *)HDmalloc(sizeof(s2_t) * DSET_SELECT_DIM))) + if (NULL == (s2_rbuf = (s2_t *)malloc(sizeof(s2_t) * DSET_SELECT_DIM))) P_TEST_ERROR; /* Create the memory data type */ @@ -907,7 +906,7 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(s1_wbuf_bak, s1_wbuf, sizeof(s1_t) * DSET_SELECT_DIM); + memcpy(s1_wbuf_bak, s1_wbuf, sizeof(s1_t) * DSET_SELECT_DIM); /* Write all the data to the dataset */ if (H5Dwrite(did, s1_tid, mspace_id, fspace_id, dxpl, s1_wbuf) < 0) @@ -915,12 +914,12 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(s1_wbuf, s1_wbuf_bak, sizeof(s1_t) * DSET_SELECT_DIM); + memcpy(s1_wbuf, s1_wbuf_bak, sizeof(s1_t) * DSET_SELECT_DIM); check_io_mode(dxpl, chunked); /* Read all the data from the dataset */ - HDmemset(s1_rbuf, 0, sizeof(s1_t) * DSET_SELECT_DIM); + memset(s1_rbuf, 0, sizeof(s1_t) * DSET_SELECT_DIM); if (H5Dread(did, s1_tid, mspace_id, fspace_id, dxpl, s1_rbuf) < 0) P_TEST_ERROR; @@ -929,10 +928,10 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) if (s1_wbuf[i].a != s1_rbuf[i].a || s1_wbuf[i].b != s1_rbuf[i].b || s1_wbuf[i].c != s1_rbuf[i].c || s1_wbuf[i].d != s1_rbuf[i].d) { nerrors++; - HDprintf("\n Error in 1st data verification:\n"); - HDprintf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", i + (int)start[0], s1_wbuf[i].a, - s1_rbuf[i].a, s1_wbuf[i].b, s1_rbuf[i].b, s1_wbuf[i].c, s1_rbuf[i].c, s1_wbuf[i].d, - s1_rbuf[i].d); + printf("\n Error in 1st data verification:\n"); + printf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", i + (int)start[0], s1_wbuf[i].a, + s1_rbuf[i].a, s1_wbuf[i].b, s1_rbuf[i].b, s1_wbuf[i].c, s1_rbuf[i].c, s1_wbuf[i].d, + s1_rbuf[i].d); break; } @@ -957,7 +956,7 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(s1_wbuf_bak, s1_wbuf, sizeof(s1_t) * DSET_SELECT_DIM); + memcpy(s1_wbuf_bak, s1_wbuf, sizeof(s1_t) * DSET_SELECT_DIM); /* Write s1_wbuf to the dataset but with only subset members in ss_tid */ if (H5Dwrite(did, ss_ac_tid, mspace_id, fspace_id, dxpl, s1_wbuf) < 0) @@ -965,10 +964,10 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(s1_wbuf, s1_wbuf_bak, sizeof(s1_t) * DSET_SELECT_DIM); + memcpy(s1_wbuf, s1_wbuf_bak, sizeof(s1_t) * DSET_SELECT_DIM); /* Read the whole compound back */ - HDmemset(s1_rbuf, 0, sizeof(s1_t) * DSET_SELECT_DIM); + memset(s1_rbuf, 0, sizeof(s1_t) * DSET_SELECT_DIM); if (H5Dread(did, s1_tid, mspace_id, fspace_id, dxpl, s1_rbuf) < 0) P_TEST_ERROR; @@ -977,10 +976,10 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) if (s1_rbuf[i].a != s1_wbuf[i].a || s1_rbuf[i].b != (4 * (i + (int)start[0]) + 1) || s1_rbuf[i].c != s1_wbuf[i].c || s1_rbuf[i].d != (4 * (i + (int)start[0]) + 3)) { nerrors++; - HDprintf("\n Error in 2nd data verification:\n"); - HDprintf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", i + (int)start[0], s1_wbuf[i].a, - s1_rbuf[i].a, (4 * (i + (int)start[0]) + 1), s1_rbuf[i].b, s1_wbuf[i].c, s1_rbuf[i].c, - (4 * (i + (int)start[0]) + 3), s1_rbuf[i].d); + printf("\n Error in 2nd data verification:\n"); + printf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", i + (int)start[0], s1_wbuf[i].a, + s1_rbuf[i].a, (4 * (i + (int)start[0]) + 1), s1_rbuf[i].b, s1_wbuf[i].c, s1_rbuf[i].c, + (4 * (i + (int)start[0]) + 3), s1_rbuf[i].d); break; } @@ -1014,12 +1013,12 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) s1_rbuf[i].c != (4 * (i + (int)start[0]) + DSET_SELECT_DIM + 2) || s1_rbuf[i].d != ((4 * (i + (int)start[0])) + (2 * DSET_SELECT_DIM) + 3)) { nerrors++; - HDprintf("\n Error in 3rd data verification:\n"); - HDprintf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", i + (int)start[0], - ((4 * (i + (int)start[0])) + (2 * DSET_SELECT_DIM)), s1_rbuf[i].a, - (4 * (i + (int)start[0]) + 1), s1_rbuf[i].b, - (4 * (i + (int)start[0]) + DSET_SELECT_DIM + 2), s1_rbuf[i].c, - ((4 * (i + (int)start[0])) + (2 * DSET_SELECT_DIM) + 3), s1_rbuf[i].d); + printf("\n Error in 3rd data verification:\n"); + printf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", i + (int)start[0], + ((4 * (i + (int)start[0])) + (2 * DSET_SELECT_DIM)), s1_rbuf[i].a, + (4 * (i + (int)start[0]) + 1), s1_rbuf[i].b, + (4 * (i + (int)start[0]) + DSET_SELECT_DIM + 2), s1_rbuf[i].c, + ((4 * (i + (int)start[0])) + (2 * DSET_SELECT_DIM) + 3), s1_rbuf[i].d); break; } @@ -1049,17 +1048,17 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(s2_wbuf_bak, s2_wbuf, sizeof(s2_t) * DSET_SELECT_DIM); + memcpy(s2_wbuf_bak, s2_wbuf, sizeof(s2_t) * DSET_SELECT_DIM); if (H5Dwrite(did, s2_tid, mspace_id, fspace_id, dxpl, s2_wbuf) < 0) P_TEST_ERROR; /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(s2_wbuf, s2_wbuf_bak, sizeof(s2_t) * DSET_SELECT_DIM); + memcpy(s2_wbuf, s2_wbuf_bak, sizeof(s2_t) * DSET_SELECT_DIM); /* Read it back */ - HDmemset(s2_rbuf, 0, sizeof(s2_t) * DSET_SELECT_DIM); + memset(s2_rbuf, 0, sizeof(s2_t) * DSET_SELECT_DIM); if (H5Dread(did, s2_tid, mspace_id, fspace_id, dxpl, s2_rbuf) < 0) P_TEST_ERROR; @@ -1068,10 +1067,10 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) if (s2_wbuf[i].a != s2_rbuf[i].a || s2_wbuf[i].b != s2_rbuf[i].b || s2_wbuf[i].c != s2_rbuf[i].c || s2_wbuf[i].d != s2_rbuf[i].d) { nerrors++; - HDprintf("\n Error in 4th data verification:\n"); - HDprintf(" At index %d: %d/%d, %lld/%lld, %d/%d, %d/%d\n", i + (int)start[0], s2_wbuf[i].a, - s2_rbuf[i].a, s2_wbuf[i].b, s2_rbuf[i].b, s2_wbuf[i].c, s2_rbuf[i].c, s2_wbuf[i].d, - s2_rbuf[i].d); + printf("\n Error in 4th data verification:\n"); + printf(" At index %d: %d/%d, %lld/%lld, %d/%d, %d/%d\n", i + (int)start[0], s2_wbuf[i].a, + s2_rbuf[i].a, s2_wbuf[i].b, s2_rbuf[i].b, s2_wbuf[i].c, s2_rbuf[i].c, s2_wbuf[i].d, + s2_rbuf[i].d); break; } @@ -1094,12 +1093,12 @@ test_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) P_TEST_ERROR; /* Release buffers */ - HDfree(s1_wbuf); - HDfree(s1_wbuf_bak); - HDfree(s1_rbuf); - HDfree(s2_wbuf); - HDfree(s2_wbuf_bak); - HDfree(s2_rbuf); + free(s1_wbuf); + free(s1_wbuf_bak); + free(s1_rbuf); + free(s2_wbuf); + free(s2_wbuf_bak); + free(s2_rbuf); CHECK_PASSED(); @@ -1213,7 +1212,7 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(lwbuf_bak, lwbuf, sizeof(lwbuf)); + memcpy(lwbuf_bak, lwbuf, sizeof(lwbuf)); /* Write data to the dataset with/without data transform in dxpl */ if (H5Dwrite(did, H5T_NATIVE_LONG, mspace_id, fspace_id, dxpl, lwbuf) < 0) @@ -1221,7 +1220,7 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(lwbuf, lwbuf_bak, sizeof(lwbuf)); + memcpy(lwbuf, lwbuf_bak, sizeof(lwbuf)); check_io_mode(dxpl, chunked); @@ -1234,9 +1233,9 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned for (i = 0; i < (int)block[0]; i++) if (lrbuf[i] != (dtrans ? trans_lwbuf[i] : lwbuf[i])) { nerrors++; - HDprintf("\n Error in first data verification:\n"); - HDprintf(" At index %d: %ld, %ld\n", i + (int)start[0], - dtrans ? trans_lwbuf[i] : lwbuf[i], lrbuf[i]); + printf("\n Error in first data verification:\n"); + printf(" At index %d: %ld, %ld\n", i + (int)start[0], dtrans ? trans_lwbuf[i] : lwbuf[i], + lrbuf[i]); break; } } @@ -1272,7 +1271,7 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(lwbuf_bak, lwbuf, sizeof(lwbuf)); + memcpy(lwbuf_bak, lwbuf, sizeof(lwbuf)); /* Write data to the dataset with/without data transform */ if (H5Dwrite(did, H5T_NATIVE_LONG, mspace_id, fspace_id, dxpl, lwbuf) < 0) @@ -1280,7 +1279,7 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(lwbuf, lwbuf_bak, sizeof(lwbuf)); + memcpy(lwbuf, lwbuf_bak, sizeof(lwbuf)); /* Read the data from the dataset: type conversion int-->short */ /* If dtrans, without data transform set in dxpl */ @@ -1290,9 +1289,9 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned if (mpi_rank) { for (i = 0; i < (int)block[0]; i++) if (srbuf[i] != (short)(dtrans ? trans_lwbuf[i] : lwbuf[i])) { - HDprintf("\n Error in second data verification:\n"); - HDprintf(" At index %d: %d, %d\n", i + (int)start[0], - (short)(dtrans ? trans_lwbuf[i] : lwbuf[i]), srbuf[i]); + printf("\n Error in second data verification:\n"); + printf(" At index %d: %d, %d\n", i + (int)start[0], + (short)(dtrans ? trans_lwbuf[i] : lwbuf[i]), srbuf[i]); break; } } @@ -1333,7 +1332,7 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(swbuf_bak, swbuf, sizeof(swbuf)); + memcpy(swbuf_bak, swbuf, sizeof(swbuf)); /* Write data to the dataset with/without data transform */ if (H5Dwrite(did, H5T_NATIVE_SHORT, mspace_id, fspace_id, dxpl, swbuf) < 0) @@ -1341,7 +1340,7 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(swbuf, swbuf_bak, sizeof(swbuf)); + memcpy(swbuf, swbuf_bak, sizeof(swbuf)); /* Read the data from the dataset: type conversion int-->llong */ /* If dtrans, without data transform set in dxpl */ @@ -1351,9 +1350,9 @@ test_type_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, unsigned if (mpi_rank) { for (i = 0; i < (int)block[0]; i++) if (llrbuf[i] != (long long)(dtrans ? trans_swbuf[i] : swbuf[i])) { - HDprintf("\n Error in third data verification:\n"); - HDprintf(" At index %d: %lld, %lld\n", i + (int)start[0], - (long long)(dtrans ? trans_swbuf[i] : swbuf[i]), llrbuf[i]); + printf("\n Error in third data verification:\n"); + printf(" At index %d: %lld, %lld\n", i + (int)start[0], + (long long)(dtrans ? trans_swbuf[i] : swbuf[i]), llrbuf[i]); break; } } @@ -1496,24 +1495,24 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m buf_size = ndsets * DSET_SELECT_DIM * sizeof(int); /* Allocate buffers for all datasets */ - if (NULL == (total_wbuf = (int *)HDmalloc(buf_size))) + if (NULL == (total_wbuf = (int *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (total_wbuf_bak = (int *)HDmalloc(buf_size))) + if (mwbuf && NULL == (total_wbuf_bak = (int *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_trans_wbuf = (int *)HDmalloc(buf_size))) + if (NULL == (total_trans_wbuf = (int *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_rbuf = (int *)HDmalloc(buf_size))) + if (NULL == (total_rbuf = (int *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(long); - if (NULL == (total_lwbuf = (long *)HDmalloc(buf_size))) + if (NULL == (total_lwbuf = (long *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (total_lwbuf_bak = (long *)HDmalloc(buf_size))) + if (mwbuf && NULL == (total_lwbuf_bak = (long *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_trans_lwbuf = (long *)HDmalloc(buf_size))) + if (NULL == (total_trans_lwbuf = (long *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_lrbuf = (long *)HDmalloc(buf_size))) + if (NULL == (total_lrbuf = (long *)malloc(buf_size))) P_TEST_ERROR; /* Initialize buffer indices */ @@ -1541,7 +1540,7 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(total_wbuf_bak, total_wbuf, ndsets * DSET_SELECT_DIM * sizeof(int)); + memcpy(total_wbuf_bak, total_wbuf, ndsets * DSET_SELECT_DIM * sizeof(int)); /* Write data to the dataset with/without data transform */ if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0) @@ -1549,7 +1548,7 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(total_wbuf, total_wbuf_bak, ndsets * DSET_SELECT_DIM * sizeof(int)); + memcpy(total_wbuf, total_wbuf_bak, ndsets * DSET_SELECT_DIM * sizeof(int)); check_io_mode(dxpl, chunked); @@ -1562,9 +1561,9 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m for (j = 0; j < (int)block[0]; j++) if (rbufi[i][j] != (dtrans ? trans_wbufi[i][j] : wbufi[i][j])) { nerrors++; - HDprintf("\n Error in 1st data verification for dset %d:\n", i); - HDprintf(" At index %d: %d, %d\n", j + (int)start[0], - dtrans ? trans_wbufi[i][j] : wbufi[i][j], rbufi[i][j]); + printf("\n Error in 1st data verification for dset %d:\n", i); + printf(" At index %d: %d, %d\n", j + (int)start[0], + dtrans ? trans_wbufi[i][j] : wbufi[i][j], rbufi[i][j]); break; } @@ -1579,9 +1578,9 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m for (j = 0; j < (int)block[0]; j++) if (rbufi[i][j] != (2 * trans_wbufi[i][j])) { nerrors++; - HDprintf("\n Error in 1st (with dtrans) data verification for dset %d:\n", i); - HDprintf(" At index %d: %d, %d\n", j + (int)start[0], 2 * trans_wbufi[i][j], - rbufi[i][j]); + printf("\n Error in 1st (with dtrans) data verification for dset %d:\n", i); + printf(" At index %d: %d, %d\n", j + (int)start[0], 2 * trans_wbufi[i][j], + rbufi[i][j]); break; } } @@ -1610,7 +1609,7 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(total_lwbuf_bak, total_lwbuf, ndsets * DSET_SELECT_DIM * sizeof(long)); + memcpy(total_lwbuf_bak, total_lwbuf, ndsets * DSET_SELECT_DIM * sizeof(long)); /* Write data to the dataset with/without data transform */ if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0) @@ -1618,7 +1617,7 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(total_lwbuf, total_lwbuf_bak, ndsets * DSET_SELECT_DIM * sizeof(long)); + memcpy(total_lwbuf, total_lwbuf_bak, ndsets * DSET_SELECT_DIM * sizeof(long)); /* Read data from the dataset (if dtrans, with data transform again in dxpl */ if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0) @@ -1628,9 +1627,9 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m for (j = 0; j < (int)block[0]; j++) { if (lrbufi[i][j] != (dtrans ? (2 * trans_lwbufi[i][j]) : lwbufi[i][j])) { nerrors++; - HDprintf("\n Error in 2nd data verification for dset %d:\n", i); - HDprintf(" At index %d: %ld/%ld\n", j + (int)start[0], - (dtrans ? (2 * trans_lwbufi[i][j]) : lwbufi[i][j]), lrbufi[i][j]); + printf("\n Error in 2nd data verification for dset %d:\n", i); + printf(" At index %d: %ld/%ld\n", j + (int)start[0], + (dtrans ? (2 * trans_lwbufi[i][j]) : lwbufi[i][j]), lrbufi[i][j]); break; } } @@ -1652,14 +1651,14 @@ test_multi_dsets_no_bkg(hid_t fid, unsigned chunked, unsigned dtrans, unsigned m P_TEST_ERROR; } - HDfree(total_wbuf); - HDfree(total_wbuf_bak); - HDfree(total_rbuf); - HDfree(total_trans_wbuf); - HDfree(total_lwbuf); - HDfree(total_lwbuf_bak); - HDfree(total_trans_lwbuf); - HDfree(total_lrbuf); + free(total_wbuf); + free(total_wbuf_bak); + free(total_rbuf); + free(total_trans_wbuf); + free(total_lwbuf); + free(total_lwbuf_bak); + free(total_trans_lwbuf); + free(total_lrbuf); CHECK_PASSED(); @@ -1806,18 +1805,18 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) s2_buf_size = ndsets * DSET_SELECT_DIM * sizeof(s2_t); /* Allocate buffers for all datasets */ - if (NULL == (total_wbuf = (s1_t *)HDmalloc(buf_size))) + if (NULL == (total_wbuf = (s1_t *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (total_wbuf_bak = (s1_t *)HDmalloc(buf_size))) + if (mwbuf && NULL == (total_wbuf_bak = (s1_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_rbuf = (s1_t *)HDmalloc(buf_size))) + if (NULL == (total_rbuf = (s1_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (s2_total_wbuf = (s2_t *)HDmalloc(s2_buf_size))) + if (NULL == (s2_total_wbuf = (s2_t *)malloc(s2_buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (s2_total_wbuf_bak = (s2_t *)HDmalloc(s2_buf_size))) + if (mwbuf && NULL == (s2_total_wbuf_bak = (s2_t *)malloc(s2_buf_size))) P_TEST_ERROR; - if (NULL == (s2_total_rbuf = (s2_t *)HDmalloc(s2_buf_size))) + if (NULL == (s2_total_rbuf = (s2_t *)malloc(s2_buf_size))) P_TEST_ERROR; /* Initialize buffer indices */ @@ -1846,14 +1845,14 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(total_wbuf_bak, total_wbuf, buf_size); + memcpy(total_wbuf_bak, total_wbuf, buf_size); if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0) P_TEST_ERROR; /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(total_wbuf, total_wbuf_bak, buf_size); + memcpy(total_wbuf, total_wbuf_bak, buf_size); check_io_mode(dxpl, chunked); @@ -1866,10 +1865,10 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) if (wbufi[i][j].a != rbufi[i][j].a || wbufi[i][j].b != rbufi[i][j].b || wbufi[i][j].c != rbufi[i][j].c || wbufi[i][j].d != rbufi[i][j].d) { nerrors++; - HDprintf("\n Error in 1st data verification for dset %d:\n", i); - HDprintf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0], wbufi[i][j].a, - rbufi[i][j].a, wbufi[i][j].b, rbufi[i][j].b, wbufi[i][j].c, rbufi[i][j].c, - wbufi[i][j].d, rbufi[i][j].d); + printf("\n Error in 1st data verification for dset %d:\n", i); + printf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0], wbufi[i][j].a, + rbufi[i][j].a, wbufi[i][j].b, rbufi[i][j].b, wbufi[i][j].c, rbufi[i][j].c, + wbufi[i][j].d, rbufi[i][j].d); break; } @@ -1910,14 +1909,14 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(total_wbuf_bak, total_wbuf, buf_size); + memcpy(total_wbuf_bak, total_wbuf, buf_size); if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0) P_TEST_ERROR; /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(total_wbuf, total_wbuf_bak, buf_size); + memcpy(total_wbuf, total_wbuf_bak, buf_size); if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0) P_TEST_ERROR; @@ -1929,10 +1928,10 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) if (wbufi[i][j].a != rbufi[i][j].a || (4 * (j + (int)start[0]) + 1) != rbufi[i][j].b || wbufi[i][j].c != rbufi[i][j].c || (4 * (j + (int)start[0]) + 3) != rbufi[i][j].d) { nerrors++; - HDprintf("\n Error in 2nd data verification for dset %d:\n", i); - HDprintf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0], - wbufi[i][j].a, rbufi[i][j].a, (4 * (j + (int)start[0]) + 1), rbufi[i][j].b, - wbufi[i][j].c, rbufi[i][j].c, (4 * (j + (int)start[0]) + 3), rbufi[i][j].d); + printf("\n Error in 2nd data verification for dset %d:\n", i); + printf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0], wbufi[i][j].a, + rbufi[i][j].a, (4 * (j + (int)start[0]) + 1), rbufi[i][j].b, wbufi[i][j].c, + rbufi[i][j].c, (4 * (j + (int)start[0]) + 3), rbufi[i][j].d); break; } } @@ -1943,11 +1942,11 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) (4 * (j + (int)start[0]) + 2) != rbufi[i][j].c || (4 * (j + (int)start[0]) + 3) != rbufi[i][j].d) { nerrors++; - HDprintf("\n Error in 2nd data verification for dset %d:\n", i); - HDprintf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0], - (4 * (j + (int)start[0])), rbufi[i][j].a, (4 * (j + (int)start[0]) + 1), - rbufi[i][j].b, (4 * (j + (int)start[0]) + 2), rbufi[i][j].c, - (4 * (j + (int)start[0]) + 3), rbufi[i][j].d); + printf("\n Error in 2nd data verification for dset %d:\n", i); + printf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0], + (4 * (j + (int)start[0])), rbufi[i][j].a, (4 * (j + (int)start[0]) + 1), + rbufi[i][j].b, (4 * (j + (int)start[0]) + 2), rbufi[i][j].c, + (4 * (j + (int)start[0]) + 3), rbufi[i][j].d); break; } } @@ -2004,10 +2003,10 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) if (wbufi[0][j].a != rbufi[0][j].a || ((4 * (j + (int)start[0])) + 1) != rbufi[0][j].b || wbufi[0][j].c != rbufi[0][j].c || ((4 * (j + (int)start[0])) + 3) != rbufi[0][j].d) { nerrors++; - HDprintf("\n Error in 3rd data verification for dset0:\n"); - HDprintf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0], wbufi[0][j].a, - rbufi[0][j].a, (4 * (j + (int)start[0]) + 1), rbufi[0][j].b, wbufi[0][j].c, - rbufi[0][j].c, (4 * (j + (int)start[0]) + 3), rbufi[0][j].d); + printf("\n Error in 3rd data verification for dset0:\n"); + printf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0], wbufi[0][j].a, + rbufi[0][j].a, (4 * (j + (int)start[0]) + 1), rbufi[0][j].b, wbufi[0][j].c, rbufi[0][j].c, + (4 * (j + (int)start[0]) + 3), rbufi[0][j].d); break; } @@ -2018,11 +2017,11 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) rbufi[mm][j].c != ((4 * (j + (int)start[0])) + 2) || rbufi[mm][j].d != ((4 * (j + (int)start[0])) + (2 * DSET_SELECT_DIM) + 3)) { nerrors++; - HDprintf("\n Error in 3rd data verification for dset %d:\n", mm); - HDprintf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0], - ((4 * (j + (int)start[0])) + (2 * DSET_SELECT_DIM)), rbufi[mm][j].a, - ((4 * (j + (int)start[0])) + 1), rbufi[mm][j].b, ((4 * (j + (int)start[0])) + 2), - rbufi[mm][j].c, ((4 * (j + (int)start[0])) + (2 * DSET_SELECT_DIM) + 3), rbufi[mm][j].d); + printf("\n Error in 3rd data verification for dset %d:\n", mm); + printf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0], + ((4 * (j + (int)start[0])) + (2 * DSET_SELECT_DIM)), rbufi[mm][j].a, + ((4 * (j + (int)start[0])) + 1), rbufi[mm][j].b, ((4 * (j + (int)start[0])) + 2), + rbufi[mm][j].c, ((4 * (j + (int)start[0])) + (2 * DSET_SELECT_DIM) + 3), rbufi[mm][j].d); break; } @@ -2037,11 +2036,11 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) rbufi[i][j].c != ((4 * (j + (int)start[0])) + 2) || rbufi[i][j].d != ((4 * (j + (int)start[0])) + 3)) { nerrors++; - HDprintf("\n Error in 3rd data verification for dset %d:\n", i); - HDprintf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0], - ((4 * (j + (int)start[0]))), rbufi[i][j].a, ((4 * (j + (int)start[0])) + 1), - rbufi[i][j].b, ((4 * (j + (int)start[0])) + 2), rbufi[i][j].c, - ((4 * (j + (int)start[0])) + 3), rbufi[i][j].d); + printf("\n Error in 3rd data verification for dset %d:\n", i); + printf(" At index %d: %d/%d, %d/%d, %d/%d, %d/%d\n", j + (int)start[0], + ((4 * (j + (int)start[0]))), rbufi[i][j].a, ((4 * (j + (int)start[0])) + 1), + rbufi[i][j].b, ((4 * (j + (int)start[0])) + 2), rbufi[i][j].c, + ((4 * (j + (int)start[0])) + 3), rbufi[i][j].d); break; } } @@ -2090,14 +2089,14 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(s2_total_wbuf_bak, s2_total_wbuf, s2_buf_size); + memcpy(s2_total_wbuf_bak, s2_total_wbuf, s2_buf_size); if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0) P_TEST_ERROR; /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(s2_total_wbuf, s2_total_wbuf_bak, s2_buf_size); + memcpy(s2_total_wbuf, s2_total_wbuf_bak, s2_buf_size); if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0) P_TEST_ERROR; @@ -2107,10 +2106,10 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) if (s2_rbufi[i][j].a != s2_wbufi[i][j].a || s2_rbufi[i][j].b != s2_wbufi[i][j].b || s2_rbufi[i][j].c != s2_wbufi[i][j].c || s2_rbufi[i][j].d != s2_wbufi[i][j].d) { nerrors++; - HDprintf("\n Error in 3rd data verification for dset %d:\n", i); - HDprintf(" At index %d: %d/%d, %lld/%lld, %d/%d, %d/%d\n", j + (int)start[0], - s2_wbufi[i][j].a, s2_rbufi[i][j].a, s2_wbufi[i][j].b, s2_rbufi[i][j].b, - s2_wbufi[i][j].c, s2_rbufi[i][j].c, s2_wbufi[i][j].d, s2_rbufi[i][j].d); + printf("\n Error in 3rd data verification for dset %d:\n", i); + printf(" At index %d: %d/%d, %lld/%lld, %d/%d, %d/%d\n", j + (int)start[0], + s2_wbufi[i][j].a, s2_rbufi[i][j].a, s2_wbufi[i][j].b, s2_rbufi[i][j].b, + s2_wbufi[i][j].c, s2_rbufi[i][j].c, s2_wbufi[i][j].d, s2_rbufi[i][j].d); break; } } @@ -2130,12 +2129,12 @@ test_multi_dsets_cmpd_with_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) P_TEST_ERROR; } - HDfree(total_wbuf); - HDfree(total_wbuf_bak); - HDfree(total_rbuf); - HDfree(s2_total_wbuf); - HDfree(s2_total_wbuf_bak); - HDfree(s2_total_rbuf); + free(total_wbuf); + free(total_wbuf_bak); + free(total_rbuf); + free(s2_total_wbuf); + free(s2_total_wbuf_bak); + free(s2_total_rbuf); CHECK_PASSED(); @@ -2255,11 +2254,11 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) buf_size = ndsets * ss * DSET_SELECT_DIM; /* Allocate buffers for all datasets */ - if (NULL == (total_wbuf = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_wbuf = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_wbuf_bak = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_wbuf_bak = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_rbuf = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_rbuf = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; /* Initialize buffer indices */ @@ -2286,7 +2285,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(total_wbuf_bak, total_wbuf, buf_size); + memcpy(total_wbuf_bak, total_wbuf, buf_size); /* Write data to the dataset */ if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0) @@ -2294,7 +2293,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(total_wbuf, total_wbuf_bak, buf_size); + memcpy(total_wbuf, total_wbuf_bak, buf_size); check_io_mode(dxpl, chunked); @@ -2312,8 +2311,8 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) rbufi[i][(int)ss * j + 2] != wbufi[i][(int)ss * j + 2] || rbufi[i][(int)ss * j + 3] != wbufi[i][(int)ss * j + 3]) { H5_FAILED(); - HDprintf(" Read different values than written.\n"); - HDprintf(" For dset %d at index %d\n", i, j + (int)start[0]); + printf(" Read different values than written.\n"); + printf(" For dset %d at index %d\n", i, j + (int)start[0]); P_TEST_ERROR; } } @@ -2324,11 +2323,11 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) buf_size = ndsets * (ss * DSET_SELECT_DIM); /* Allocate buffers for all datasets */ - if (NULL == (total_lwbuf = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_lwbuf = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_lwbuf_bak = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_lwbuf_bak = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_lrbuf = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_lrbuf = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; /* Initialize buffer indices */ @@ -2359,7 +2358,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(total_lwbuf_bak, total_lwbuf, buf_size); + memcpy(total_lwbuf_bak, total_lwbuf, buf_size); /* Write data to the dataset */ if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0) @@ -2367,7 +2366,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(total_lwbuf, total_lwbuf_bak, buf_size); + memcpy(total_lwbuf, total_lwbuf_bak, buf_size); /* Read data from the dataset */ if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0) @@ -2387,8 +2386,8 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) lrbufi[i][(int)ss * j + 6] != lwbufi[i][(int)ss * j + 6] || lrbufi[i][(int)ss * j + 7] != lwbufi[i][(int)ss * j + 7]) { H5_FAILED(); - HDprintf(" Read different values than written.\n"); - HDprintf(" For dset %d at index %d\n", i, j + (int)start[0]); + printf(" Read different values than written.\n"); + printf(" For dset %d at index %d\n", i, j + (int)start[0]); P_TEST_ERROR; } } @@ -2399,11 +2398,11 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) buf_size = ndsets * (ss * DSET_SELECT_DIM); /* Allocate buffers for all datasets */ - if (NULL == (total_swbuf = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_swbuf = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_swbuf_bak = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_swbuf_bak = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_srbuf = (uint8_t *)HDmalloc(buf_size))) + if (NULL == (total_srbuf = (uint8_t *)malloc(buf_size))) P_TEST_ERROR; /* Initialize buffer indices */ @@ -2428,7 +2427,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(total_swbuf_bak, total_swbuf, buf_size); + memcpy(total_swbuf_bak, total_swbuf, buf_size); /* Write data to the dataset */ if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0) @@ -2436,7 +2435,7 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(total_swbuf, total_swbuf_bak, buf_size); + memcpy(total_swbuf, total_swbuf_bak, buf_size); /* Read data from the dataset */ if (H5Dread_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0) @@ -2449,8 +2448,8 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) if (srbufi[i][(int)ss * j + 0] != swbufi[i][(int)ss * j + 0] || srbufi[i][(int)ss * j + 1] != swbufi[i][(int)ss * j + 1]) { H5_FAILED(); - HDprintf(" Read different values than written.\n"); - HDprintf(" For dset %d at index %d\n", i, j + (int)start[0]); + printf(" Read different values than written.\n"); + printf(" For dset %d at index %d\n", i, j + (int)start[0]); P_TEST_ERROR; } @@ -2468,15 +2467,15 @@ test_multi_dsets_size_change_no_bkg(hid_t fid, unsigned chunked, unsigned mwbuf) P_TEST_ERROR; } - HDfree(total_wbuf); - HDfree(total_wbuf_bak); - HDfree(total_rbuf); - HDfree(total_lwbuf); - HDfree(total_lwbuf_bak); - HDfree(total_lrbuf); - HDfree(total_swbuf); - HDfree(total_swbuf_bak); - HDfree(total_srbuf); + free(total_wbuf); + free(total_wbuf_bak); + free(total_rbuf); + free(total_lwbuf); + free(total_lwbuf_bak); + free(total_lrbuf); + free(total_swbuf); + free(total_swbuf_bak); + free(total_srbuf); CHECK_PASSED(); @@ -2599,13 +2598,13 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un buf_size = ndsets * DSET_SELECT_DIM * sizeof(int); /* Allocate buffers for all datasets */ - if (NULL == (total_wbuf = (int *)HDmalloc(buf_size))) + if (NULL == (total_wbuf = (int *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_wbuf_bak = (int *)HDmalloc(buf_size))) + if (NULL == (total_wbuf_bak = (int *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_trans_wbuf = (int *)HDmalloc(buf_size))) + if (NULL == (total_trans_wbuf = (int *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_lrbuf = (long *)HDmalloc(ndsets * DSET_SELECT_DIM * sizeof(long)))) + if (NULL == (total_lrbuf = (long *)malloc(ndsets * DSET_SELECT_DIM * sizeof(long)))) P_TEST_ERROR; /* Initialize buffer indices */ @@ -2755,7 +2754,7 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un /* Copy wbuf if the library will be modifying it */ if (mwbuf) - HDmemcpy(total_wbuf_bak, total_wbuf, buf_size); + memcpy(total_wbuf_bak, total_wbuf, buf_size); /* Write data to the dataset with/without data transform */ if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0) @@ -2763,7 +2762,7 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un /* Restore wbuf from backup if the library modified it */ if (mwbuf) - HDmemcpy(total_wbuf, total_wbuf_bak, buf_size); + memcpy(total_wbuf, total_wbuf_bak, buf_size); check_io_mode(dxpl, chunked); @@ -2785,8 +2784,8 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un for (j = 0; j < save_block0; j++) if (l_rbufi[0][j] != (dtrans ? (long)trans_wbufi[0][j] : (long)wbufi[0][j])) { nerrors++; - HDprintf(" Verify dset0 at index %d: %ld, %ld\n", j + (int)start[0], - dtrans ? (long)trans_wbufi[0][j] : (long)wbufi[0][j], l_rbufi[0][j]); + printf(" Verify dset0 at index %d: %ld, %ld\n", j + (int)start[0], + dtrans ? (long)trans_wbufi[0][j] : (long)wbufi[0][j], l_rbufi[0][j]); break; } } @@ -2796,8 +2795,8 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un for (j = 0; j < (int)block[0]; j++) if (l_rbufi[mm][j] != (long)(dtrans ? trans_wbufi[mm][j] : wbufi[mm][j])) { nerrors++; - HDprintf(" Verify dset %d at index %d: %ld, %ld\n", mm, j + (int)start[0], - (long)(dtrans ? trans_wbufi[mm][j] : wbufi[mm][j]), l_rbufi[mm][j]); + printf(" Verify dset %d at index %d: %ld, %ld\n", mm, j + (int)start[0], + (long)(dtrans ? trans_wbufi[mm][j] : wbufi[mm][j]), l_rbufi[mm][j]); break; } @@ -2805,8 +2804,8 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un for (j = 0; j < (int)dims[0]; j++) if (l_rbufi[ll][j] != (long)(dtrans ? trans_wbufi[ll][j] : wbufi[ll][j])) { nerrors++; - HDprintf(" Verify dset %d at index %d: %ld, %ld\n", ll, j, - (long)(dtrans ? trans_wbufi[ll][j] : wbufi[ll][j]), l_rbufi[ll][j]); + printf(" Verify dset %d at index %d: %ld, %ld\n", ll, j, + (long)(dtrans ? trans_wbufi[ll][j] : wbufi[ll][j]), l_rbufi[ll][j]); break; } } @@ -2827,10 +2826,10 @@ test_multi_dsets_conv_sel_empty(hid_t fid, unsigned chunked, unsigned dtrans, un P_TEST_ERROR; } - HDfree(total_wbuf); - HDfree(total_wbuf_bak); - HDfree(total_trans_wbuf); - HDfree(total_lrbuf); + free(total_wbuf); + free(total_wbuf_bak); + free(total_trans_wbuf); + free(total_lrbuf); CHECK_PASSED(); @@ -3065,49 +3064,49 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf) /* DSET_WITH_NO_CONV */ buf_size = ndsets * DSET_SELECT_DIM * sizeof(int); - if (NULL == (total_wbuf1 = (int *)HDmalloc(buf_size))) + if (NULL == (total_wbuf1 = (int *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (total_wbuf1_bak = (int *)HDmalloc(buf_size))) + if (mwbuf && NULL == (total_wbuf1_bak = (int *)malloc(buf_size))) P_TEST_ERROR; - if (NULL == (total_rbuf1 = (int *)HDmalloc(buf_size))) + if (NULL == (total_rbuf1 = (int *)malloc(buf_size))) P_TEST_ERROR; /* DSET_WITH_CONV_AND_NO_BKG */ buf_size = ndsets * DSET_SELECT_DIM * sizeof(unsigned long); - if (NULL == (ul_total_wbuf2 = (unsigned long *)HDmalloc(buf_size))) + if (NULL == (ul_total_wbuf2 = (unsigned long *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (ul_total_wbuf2_bak = (unsigned long *)HDmalloc(buf_size))) + if (mwbuf && NULL == (ul_total_wbuf2_bak = (unsigned long *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(long); - if (NULL == (l_total_rbuf2 = (long *)HDmalloc(buf_size))) + if (NULL == (l_total_rbuf2 = (long *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(long); - if (NULL == (l_total_wbuf2 = (long *)HDmalloc(buf_size))) + if (NULL == (l_total_wbuf2 = (long *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (l_total_wbuf2_bak = (long *)HDmalloc(buf_size))) + if (mwbuf && NULL == (l_total_wbuf2_bak = (long *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(short); - if (NULL == (s_total_rbuf2 = (short *)HDmalloc(buf_size))) + if (NULL == (s_total_rbuf2 = (short *)malloc(buf_size))) P_TEST_ERROR; /* DSET_WITH_CONV_AND_BKG */ buf_size = ndsets * DSET_SELECT_DIM * sizeof(s1_t); - if (NULL == (s1_total_wbuf3 = (s1_t *)HDmalloc(buf_size))) + if (NULL == (s1_total_wbuf3 = (s1_t *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (s1_total_wbuf3_bak = (s1_t *)HDmalloc(buf_size))) + if (mwbuf && NULL == (s1_total_wbuf3_bak = (s1_t *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(s3_t); - if (NULL == (s3_total_rbuf3 = (s3_t *)HDmalloc(buf_size))) + if (NULL == (s3_total_rbuf3 = (s3_t *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(s4_t); - if (NULL == (s4_total_wbuf3 = (s4_t *)HDmalloc(buf_size))) + if (NULL == (s4_total_wbuf3 = (s4_t *)malloc(buf_size))) P_TEST_ERROR; - if (mwbuf && NULL == (s4_total_wbuf3_bak = (s4_t *)HDmalloc(buf_size))) + if (mwbuf && NULL == (s4_total_wbuf3_bak = (s4_t *)malloc(buf_size))) P_TEST_ERROR; buf_size = ndsets * DSET_SELECT_DIM * sizeof(s1_t); - if (NULL == (s1_total_rbuf3 = (s1_t *)HDmalloc(buf_size))) + if (NULL == (s1_total_rbuf3 = (s1_t *)malloc(buf_size))) P_TEST_ERROR; /* Test with s settings for ndsets */ @@ -3218,12 +3217,11 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf) /* Copy wbufs if the library will be modifying them */ if (mwbuf) { - HDmemcpy(total_wbuf1_bak, total_wbuf1, ndsets * DSET_SELECT_DIM * sizeof(int)); - HDmemcpy(ul_total_wbuf2_bak, ul_total_wbuf2, - ndsets * DSET_SELECT_DIM * sizeof(unsigned long)); - HDmemcpy(l_total_wbuf2_bak, l_total_wbuf2, ndsets * DSET_SELECT_DIM * sizeof(long)); - HDmemcpy(s1_total_wbuf3_bak, s1_total_wbuf3, ndsets * DSET_SELECT_DIM * sizeof(s1_t)); - HDmemcpy(s4_total_wbuf3_bak, s4_total_wbuf3, ndsets * DSET_SELECT_DIM * sizeof(s4_t)); + memcpy(total_wbuf1_bak, total_wbuf1, ndsets * DSET_SELECT_DIM * sizeof(int)); + memcpy(ul_total_wbuf2_bak, ul_total_wbuf2, ndsets * DSET_SELECT_DIM * sizeof(unsigned long)); + memcpy(l_total_wbuf2_bak, l_total_wbuf2, ndsets * DSET_SELECT_DIM * sizeof(long)); + memcpy(s1_total_wbuf3_bak, s1_total_wbuf3, ndsets * DSET_SELECT_DIM * sizeof(s1_t)); + memcpy(s4_total_wbuf3_bak, s4_total_wbuf3, ndsets * DSET_SELECT_DIM * sizeof(s4_t)); } if (H5Dwrite_multi(ndsets, dset_dids, mem_tids, mem_sids, file_sids, dxpl, wbufs) < 0) @@ -3231,12 +3229,11 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf) /* Restore wbufs from backup if the library modified them */ if (mwbuf) { - HDmemcpy(total_wbuf1, total_wbuf1_bak, ndsets * DSET_SELECT_DIM * sizeof(int)); - HDmemcpy(ul_total_wbuf2, ul_total_wbuf2_bak, - ndsets * DSET_SELECT_DIM * sizeof(unsigned long)); - HDmemcpy(l_total_wbuf2, l_total_wbuf2_bak, ndsets * DSET_SELECT_DIM * sizeof(long)); - HDmemcpy(s1_total_wbuf3, s1_total_wbuf3_bak, ndsets * DSET_SELECT_DIM * sizeof(s1_t)); - HDmemcpy(s4_total_wbuf3, s4_total_wbuf3_bak, ndsets * DSET_SELECT_DIM * sizeof(s4_t)); + memcpy(total_wbuf1, total_wbuf1_bak, ndsets * DSET_SELECT_DIM * sizeof(int)); + memcpy(ul_total_wbuf2, ul_total_wbuf2_bak, ndsets * DSET_SELECT_DIM * sizeof(unsigned long)); + memcpy(l_total_wbuf2, l_total_wbuf2_bak, ndsets * DSET_SELECT_DIM * sizeof(long)); + memcpy(s1_total_wbuf3, s1_total_wbuf3_bak, ndsets * DSET_SELECT_DIM * sizeof(s1_t)); + memcpy(s4_total_wbuf3, s4_total_wbuf3_bak, ndsets * DSET_SELECT_DIM * sizeof(s4_t)); } if (H5Dread_multi(ndsets, dset_dids, r_mem_tids, mem_sids, file_sids, dxpl, rbufs) < 0) @@ -3253,8 +3250,8 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf) for (j = 0; j < (int)block[0]; j++) if (rbufi1[i][j] != wbufi1[i][j]) { nerrors++; - HDprintf(" Read different values than written.\n"); - HDprintf(" For dset %d at index %d\n", i, j + (int)start[0]); + printf(" Read different values than written.\n"); + printf(" For dset %d at index %d\n", i, j + (int)start[0]); break; } @@ -3265,8 +3262,8 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf) for (j = 0; j < (int)block[0]; j++) if (l_rbufi2[i][j] != LONG_MAX) { nerrors++; - HDprintf(" Read different values than written.\n"); - HDprintf(" For dset %d at index %d\n", i, j + (int)start[0]); + printf(" Read different values than written.\n"); + printf(" For dset %d at index %d\n", i, j + (int)start[0]); break; } } @@ -3274,8 +3271,8 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf) for (j = 0; j < (int)block[0]; j++) if (s_rbufi2[i][j] != SHRT_MAX) { nerrors++; - HDprintf(" Read different values than written.\n"); - HDprintf(" For dset %d at index %d\n", i, j + (int)start[0]); + printf(" Read different values than written.\n"); + printf(" For dset %d at index %d\n", i, j + (int)start[0]); break; } } @@ -3290,8 +3287,8 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf) s3_rbufi3[i][j].c != s1_wbufi3[i][j].c || s3_rbufi3[i][j].d != s1_wbufi3[i][j].d) { nerrors++; - HDprintf(" Read different values than written.\n"); - HDprintf(" For dset %d at index %d\n", i, j + (int)start[0]); + printf(" Read different values than written.\n"); + printf(" For dset %d at index %d\n", i, j + (int)start[0]); break; } } @@ -3302,8 +3299,8 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf) s1_rbufi3[i][j].c != s1_wbufi3[i][j].c || s1_rbufi3[i][j].d != (DSET_SELECT_DIM + j + (int)start[0])) { nerrors++; - HDprintf(" Read different values than written.\n"); - HDprintf(" For dset %d at index %d\n", i, j + (int)start[0]); + printf(" Read different values than written.\n"); + printf(" For dset %d at index %d\n", i, j + (int)start[0]); break; } } @@ -3345,37 +3342,37 @@ test_multi_dsets_all(int niter, hid_t fid, unsigned chunked, unsigned mwbuf) } /* Freeing */ - HDfree(total_wbuf1); + free(total_wbuf1); total_wbuf1 = NULL; - HDfree(total_wbuf1_bak); + free(total_wbuf1_bak); total_wbuf1_bak = NULL; - HDfree(total_rbuf1); + free(total_rbuf1); total_rbuf1 = NULL; - HDfree(ul_total_wbuf2); + free(ul_total_wbuf2); ul_total_wbuf2 = NULL; - HDfree(ul_total_wbuf2_bak); + free(ul_total_wbuf2_bak); ul_total_wbuf2_bak = NULL; - HDfree(l_total_rbuf2); + free(l_total_rbuf2); l_total_rbuf2 = NULL; - HDfree(l_total_wbuf2); + free(l_total_wbuf2); l_total_wbuf2 = NULL; - HDfree(l_total_wbuf2_bak); + free(l_total_wbuf2_bak); l_total_wbuf2_bak = NULL; - HDfree(s_total_rbuf2); + free(s_total_rbuf2); s_total_rbuf2 = NULL; - HDfree(s1_total_wbuf3); + free(s1_total_wbuf3); s1_total_wbuf3 = NULL; - HDfree(s1_total_wbuf3_bak); + free(s1_total_wbuf3_bak); s1_total_wbuf3_bak = NULL; - HDfree(s3_total_rbuf3); + free(s3_total_rbuf3); s3_total_rbuf3 = NULL; - HDfree(s4_total_wbuf3); + free(s4_total_wbuf3); s4_total_wbuf3 = NULL; - HDfree(s4_total_wbuf3_bak); + free(s4_total_wbuf3_bak); s4_total_wbuf3_bak = NULL; - HDfree(s1_total_rbuf3); + free(s1_total_rbuf3); s1_total_rbuf3 = NULL; } /* end for n niter */ @@ -3769,9 +3766,9 @@ main(int argc, char *argv[]) if (MAINPROCESS) { printf("\n===================================\n"); if (nerrors) - HDprintf("***Parallel selection I/O dataset tests detected %d errors***\n", nerrors); + printf("***Parallel selection I/O dataset tests detected %d errors***\n", nerrors); else - HDprintf("Parallel selection I/O dataset tests finished with no errors\n"); + printf("Parallel selection I/O dataset tests finished with no errors\n"); printf("===================================\n"); } diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c index c11f95c..b074944 100644 --- a/testpar/t_shapesame.c +++ b/testpar/t_shapesame.c @@ -133,12 +133,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; @@ -153,7 +153,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; @@ -167,8 +167,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++) { @@ -180,8 +180,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 */ @@ -191,28 +191,28 @@ hs_dr_pio_test__setup(const int test_num, const int edge_size, const int checker tv_ptr->block_ptr = &(tv_ptr->block[PAR_SS_DR_MAX_RANK - tv_ptr->large_rank]); /* Allocate buffers */ - tv_ptr->small_ds_buf_0 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_size); + tv_ptr->small_ds_buf_0 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_size); VRFY((tv_ptr->small_ds_buf_0 != NULL), "malloc of small_ds_buf_0 succeeded"); - tv_ptr->small_ds_buf_1 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_size); + tv_ptr->small_ds_buf_1 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_size); VRFY((tv_ptr->small_ds_buf_1 != NULL), "malloc of small_ds_buf_1 succeeded"); - tv_ptr->small_ds_buf_2 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_size); + tv_ptr->small_ds_buf_2 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_size); VRFY((tv_ptr->small_ds_buf_2 != NULL), "malloc of small_ds_buf_2 succeeded"); - tv_ptr->small_ds_slice_buf = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->small_ds_slice_size); + tv_ptr->small_ds_slice_buf = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->small_ds_slice_size); VRFY((tv_ptr->small_ds_slice_buf != NULL), "malloc of small_ds_slice_buf succeeded"); - tv_ptr->large_ds_buf_0 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_size); + tv_ptr->large_ds_buf_0 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_size); VRFY((tv_ptr->large_ds_buf_0 != NULL), "malloc of large_ds_buf_0 succeeded"); - tv_ptr->large_ds_buf_1 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_size); + tv_ptr->large_ds_buf_1 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_size); VRFY((tv_ptr->large_ds_buf_1 != NULL), "malloc of large_ds_buf_1 succeeded"); - tv_ptr->large_ds_buf_2 = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_size); + tv_ptr->large_ds_buf_2 = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_size); VRFY((tv_ptr->large_ds_buf_2 != NULL), "malloc of large_ds_buf_2 succeeded"); - tv_ptr->large_ds_slice_buf = (uint32_t *)HDmalloc(sizeof(uint32_t) * tv_ptr->large_ds_slice_size); + tv_ptr->large_ds_slice_buf = (uint32_t *)malloc(sizeof(uint32_t) * tv_ptr->large_ds_slice_size); VRFY((tv_ptr->large_ds_slice_buf != NULL), "malloc of large_ds_slice_buf succeeded"); /* initialize the buffers */ @@ -220,34 +220,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 = (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 */ /* ---------------------------------------- @@ -639,22 +639,22 @@ hs_dr_pio_test__takedown(struct hs_dr_pio_test_vars_t *tv_ptr) /* Free memory buffers */ if (tv_ptr->small_ds_buf_0 != NULL) - HDfree(tv_ptr->small_ds_buf_0); + free(tv_ptr->small_ds_buf_0); if (tv_ptr->small_ds_buf_1 != NULL) - HDfree(tv_ptr->small_ds_buf_1); + free(tv_ptr->small_ds_buf_1); if (tv_ptr->small_ds_buf_2 != NULL) - HDfree(tv_ptr->small_ds_buf_2); + free(tv_ptr->small_ds_buf_2); if (tv_ptr->small_ds_slice_buf != NULL) - HDfree(tv_ptr->small_ds_slice_buf); + free(tv_ptr->small_ds_slice_buf); if (tv_ptr->large_ds_buf_0 != NULL) - HDfree(tv_ptr->large_ds_buf_0); + free(tv_ptr->large_ds_buf_0); if (tv_ptr->large_ds_buf_1 != NULL) - HDfree(tv_ptr->large_ds_buf_1); + free(tv_ptr->large_ds_buf_1); if (tv_ptr->large_ds_buf_2 != NULL) - HDfree(tv_ptr->large_ds_buf_2); + free(tv_ptr->large_ds_buf_2); if (tv_ptr->large_ds_slice_buf != NULL) - HDfree(tv_ptr->large_ds_slice_buf); + free(tv_ptr->large_ds_slice_buf); return; @@ -726,10 +726,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 @@ -816,12 +816,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, @@ -937,11 +937,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. @@ -1047,12 +1047,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); @@ -1070,8 +1070,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++) { @@ -1212,10 +1212,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 @@ -1316,12 +1316,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); @@ -1346,8 +1346,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++) { @@ -1487,10 +1487,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) { @@ -1551,12 +1551,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 */ @@ -1602,12 +1602,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); @@ -1635,8 +1635,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++) { @@ -1774,8 +1774,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 */ @@ -1790,7 +1790,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); @@ -1802,7 +1802,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); @@ -1820,7 +1820,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); @@ -1835,16 +1835,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 */ @@ -1852,7 +1852,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 */ @@ -1986,16 +1986,16 @@ 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 */ } } if ((MAINPROCESS) && (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); } return; @@ -2049,26 +2049,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 @@ -2215,25 +2215,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) { @@ -2277,8 +2277,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. */ @@ -2296,9 +2296,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; @@ -2380,25 +2380,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 @@ -2448,12 +2448,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) { @@ -2486,7 +2486,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++; @@ -2569,16 +2569,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 @@ -2600,8 +2600,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 @@ -2675,11 +2675,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, @@ -2693,12 +2693,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 = @@ -2707,7 +2707,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 */ @@ -2799,11 +2799,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 @@ -2899,11 +2899,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, @@ -2917,12 +2917,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); @@ -2945,27 +2945,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++) { @@ -3129,12 +3129,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 @@ -3221,11 +3221,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, @@ -3244,12 +3244,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); @@ -3271,8 +3271,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; @@ -3428,13 +3428,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) { @@ -3514,11 +3514,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, @@ -3536,12 +3536,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); @@ -3567,8 +3567,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; @@ -3711,8 +3711,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 */ @@ -3763,9 +3763,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 */ @@ -3773,7 +3773,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 */ @@ -3911,16 +3911,16 @@ 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 */ } } if ((MAINPROCESS) && (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); } return; @@ -3998,10 +3998,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); } @@ -4025,18 +4024,18 @@ 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"); - HDprintf("\t-f <prefix>\tfilename prefix\n"); - HDprintf("\t-2\t\tuse Split-file together with MPIO\n"); - HDprintf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", ROW_FACTOR, - COL_FACTOR); - HDprintf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n"); - HDprintf("\n"); + printf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] " + "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n"); + printf("\t-m<n_datasets>" + "\tset number of datasets for the multiple dataset test\n"); + printf("\t-n<n_groups>" + "\tset number of groups for the multiple group test\n"); + printf("\t-f <prefix>\tfilename prefix\n"); + printf("\t-2\t\tuse Split-file together with MPIO\n"); + printf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", ROW_FACTOR, + COL_FACTOR); + printf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n"); + printf("\n"); } /* @@ -4118,7 +4117,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); } @@ -4127,12 +4126,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); } @@ -4140,7 +4139,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); } @@ -4153,13 +4152,13 @@ parse_options(int argc, char **argv) for (i = 0; i < n; i++) if (h5_fixname(FILENAME[i], fapl, filenames[i], PATH_MAX) == NULL) { - HDprintf("h5_fixname failed\n"); + printf("h5_fixname failed\n"); nerrors++; return (1); } - 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]); } return (0); @@ -4293,10 +4292,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", GetTestExpress()); - HDprintf("===================================\n"); + printf("===================================\n"); + printf("Shape Same Tests Start\n"); + printf(" express_test = %d.\n", GetTestExpress()); + printf("===================================\n"); } /* Attempt to turn off atexit post processing so that in case errors @@ -4306,15 +4305,15 @@ 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(); - 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); } } @@ -4345,9 +4344,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 */ @@ -4375,16 +4374,16 @@ 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 with no errors\n"); - HDprintf("===================================\n"); + printf("Shape Same tests finished with no errors\n"); + printf("===================================\n"); } for (int i = 0; i < NFILENAME; i++) { - HDfree(filenames[i]); + free(filenames[i]); filenames[i] = NULL; } diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c index aab2b59..d0ef253 100644 --- a/testpar/t_span_tree.c +++ b/testpar/t_span_tree.c @@ -238,11 +238,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++) H5_CHECKED_ASSIGN(vector[i], int, i, unsigned); @@ -565,8 +565,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. */ @@ -619,11 +619,11 @@ coll_write_test(int chunk_factor) VRFY((ret >= 0), ""); if (vector) - HDfree(vector); + free(vector); if (matrix_out) - HDfree(matrix_out); + free(matrix_out); if (matrix_out1) - HDfree(matrix_out1); + free(matrix_out1); return; } @@ -685,8 +685,8 @@ coll_read_test(void) mdim[0] = MSPACE_DIM1; mdim[1] = (hsize_t)(MSPACE_DIM2 * mpi_size); - matrix_out = (int *)HDmalloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); - matrix_out1 = (int *)HDmalloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); + matrix_out = (int *)malloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); + matrix_out1 = (int *)malloc(sizeof(int) * (size_t)MSPACE_DIM1 * (size_t)MSPACE_DIM2 * (size_t)mpi_size); /*** For testing collective hyperslab selection read ***/ @@ -806,8 +806,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. @@ -846,8 +846,8 @@ coll_read_test(void) /* * Free read buffers. */ - HDfree(matrix_out); - HDfree(matrix_out1); + free(matrix_out); + free(matrix_out1); /* * Close memory file and memory dataspaces. @@ -934,31 +934,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 */ @@ -992,8 +992,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 */ @@ -1116,26 +1116,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 @@ -1181,8 +1180,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 */ @@ -1202,9 +1201,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 */ @@ -1290,22 +1289,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 @@ -1356,14 +1355,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) { @@ -1398,7 +1397,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++; @@ -1499,15 +1498,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 */ @@ -1519,24 +1518,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 */ @@ -1568,7 +1567,7 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ /* get the file name */ filename = (const char *)GetTestParameters(); - HDassert(filename != NULL); + assert(filename != NULL); /* ---------------------------------------- * CREATE AN HDF5 FILE WITH PARALLEL ACCESS @@ -1602,10 +1601,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 @@ -1661,9 +1660,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 @@ -1682,9 +1681,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 @@ -1710,8 +1709,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 */ @@ -1743,15 +1742,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 */ @@ -1768,15 +1767,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 */ @@ -1796,7 +1795,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); @@ -1850,15 +1849,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 */ @@ -1870,10 +1869,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 */ @@ -1883,15 +1882,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 */ @@ -1903,10 +1902,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 */ } @@ -1932,12 +1931,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 */ @@ -1950,10 +1949,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 */ @@ -2042,7 +2041,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 */ @@ -2057,9 +2056,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; @@ -2139,7 +2138,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 */ @@ -2157,9 +2156,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; @@ -2197,8 +2196,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 */ @@ -2250,14 +2249,14 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const hbool_t use_ /* Free memory buffers */ if (small_ds_buf_0 != NULL) - HDfree(small_ds_buf_0); + free(small_ds_buf_0); if (small_ds_buf_1 != NULL) - HDfree(small_ds_buf_1); + free(small_ds_buf_1); if (large_ds_buf_0 != NULL) - HDfree(large_ds_buf_0); + free(large_ds_buf_0); if (large_ds_buf_1 != NULL) - HDfree(large_ds_buf_1); + free(large_ds_buf_1); return; @@ -2362,11 +2361,11 @@ link_chunk_collective_io_test(void) MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); - HDassert(mpi_size > 0); + assert(mpi_size > 0); /* get the file name */ filename = (const char *)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/t_subfiling_vfd.c b/testpar/t_subfiling_vfd.c index ba9ecf5..08e6e1f 100644 --- a/testpar/t_subfiling_vfd.c +++ b/testpar/t_subfiling_vfd.c @@ -132,7 +132,7 @@ create_subfiling_ioc_fapl(MPI_Comm comm, MPI_Info info, hbool_t custom_config, H5FD_ioc_config_t ioc_conf; hid_t ret_value = H5I_INVALID_HID; - HDassert(!custom_config || custom_cfg); + assert(!custom_config || custom_cfg); if ((ret_value = H5Pcreate(H5P_FILE_ACCESS)) < 0) TEST_ERROR; @@ -322,16 +322,16 @@ test_config_file(void) VRFY((HDstat(SUBF_FILENAME, &file_info) >= 0), "HDstat succeeded"); - config_filename = HDmalloc(PATH_MAX); - VRFY(config_filename, "HDmalloc succeeded"); + config_filename = malloc(PATH_MAX); + VRFY(config_filename, "malloc succeeded"); HDsnprintf(config_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir, SUBF_FILENAME, (uint64_t)file_info.st_ino); - config_file = HDfopen(config_filename, "r"); - VRFY(config_file, "HDfopen succeeded"); + config_file = fopen(config_filename, "r"); + VRFY(config_file, "fopen succeeded"); - HDfree(config_filename); + free(config_filename); VRFY((HDfseek(config_file, 0, SEEK_END) >= 0), "HDfseek succeeded"); @@ -340,8 +340,8 @@ test_config_file(void) VRFY((HDfseek(config_file, 0, SEEK_SET) >= 0), "HDfseek succeeded"); - config_buf = HDmalloc((size_t)config_file_len + 1); - VRFY(config_buf, "HDmalloc succeeded"); + config_buf = malloc((size_t)config_file_len + 1); + VRFY(config_buf, "malloc succeeded"); VRFY((HDfread(config_buf, (size_t)config_file_len, 1, config_file) == 1), "HDfread succeeded"); config_buf[config_file_len] = '\0'; @@ -376,8 +376,8 @@ test_config_file(void) VRFY((H5_dirname(resolved_path, &subfile_dir) >= 0), "H5_dirname succeeded"); - tmp_buf = HDmalloc(PATH_MAX); - VRFY(tmp_buf, "HDmalloc succeeded"); + tmp_buf = malloc(PATH_MAX); + VRFY(tmp_buf, "malloc succeeded"); substr = HDstrstr(config_buf, "hdf5_file"); VRFY(substr, "HDstrstr succeeded"); @@ -395,12 +395,12 @@ test_config_file(void) VRFY((HDstrcmp(tmp_buf, subfile_dir) == 0), "HDstrcmp succeeded"); - HDfree(tmp_buf); + free(tmp_buf); H5MM_free(subfile_dir); - HDfree(resolved_path); + free(resolved_path); - subfile_name = HDmalloc(PATH_MAX); - VRFY(subfile_name, "HDmalloc succeeded"); + subfile_name = malloc(PATH_MAX); + VRFY(subfile_name, "malloc succeeded"); /* Verify the name of each subfile is in the configuration file */ num_digits = (int)(HDlog10(cfg.stripe_count) + 1); @@ -418,8 +418,8 @@ test_config_file(void) substr = HDstrstr(config_buf, subfile_name); VRFY(substr == NULL, "HDstrstr correctly failed"); - HDfree(subfile_name); - HDfree(config_buf); + free(subfile_name); + free(config_buf); VRFY((HDfclose(config_file) >= 0), "HDfclose on configuration file succeeded"); } @@ -462,8 +462,8 @@ test_stripe_sizes(void) if (MAINPROCESS) TESTING_2("random subfiling stripe sizes"); - tmp_filename = HDmalloc(PATH_MAX); - VRFY(tmp_filename, "HDmalloc succeeded"); + tmp_filename = malloc(PATH_MAX); + VRFY(tmp_filename, "malloc succeeded"); dxpl_id = H5Pcreate(H5P_DATASET_XFER); VRFY((dxpl_id >= 0), "DXPL creation succeeded"); @@ -511,10 +511,10 @@ test_stripe_sizes(void) nbytes = (size_t)(cfg.stripe_size * num_subfiles); - write_buf = HDmalloc(nbytes); - VRFY(write_buf, "HDmalloc succeeded"); + write_buf = malloc(nbytes); + VRFY(write_buf, "malloc succeeded"); - HDmemset(write_buf, 255, nbytes); + memset(write_buf, 255, nbytes); c_write_buf = write_buf; @@ -570,8 +570,8 @@ test_stripe_sizes(void) (uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles); /* Ensure file exists */ - subfile_ptr = HDfopen(tmp_filename, "r"); - VRFY(subfile_ptr, "HDfopen on subfile succeeded"); + subfile_ptr = fopen(tmp_filename, "r"); + VRFY(subfile_ptr, "fopen on subfile succeeded"); VRFY((HDfclose(subfile_ptr) >= 0), "HDfclose on subfile succeeded"); /* Check file size */ @@ -586,8 +586,8 @@ test_stripe_sizes(void) (uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles); /* Ensure file doesn't exist */ - subfile_ptr = HDfopen(tmp_filename, "r"); - VRFY(subfile_ptr == NULL, "HDfopen on subfile correctly failed"); + subfile_ptr = fopen(tmp_filename, "r"); + VRFY(subfile_ptr == NULL, "fopen on subfile correctly failed"); /* Set EOA for following write call */ VRFY((H5FDset_eoa(file_ptr, H5FD_MEM_DEFAULT, file_end_addr + nbytes) >= 0), @@ -616,8 +616,8 @@ test_stripe_sizes(void) (uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles); /* Ensure file exists */ - subfile_ptr = HDfopen(tmp_filename, "r"); - VRFY(subfile_ptr, "HDfopen on subfile succeeded"); + subfile_ptr = fopen(tmp_filename, "r"); + VRFY(subfile_ptr, "fopen on subfile succeeded"); VRFY((HDfclose(subfile_ptr) >= 0), "HDfclose on subfile succeeded"); /* Check file size */ @@ -632,10 +632,10 @@ test_stripe_sizes(void) (uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles); /* Ensure file doesn't exist */ - subfile_ptr = HDfopen(tmp_filename, "r"); - VRFY(subfile_ptr == NULL, "HDfopen on subfile correctly failed"); + subfile_ptr = fopen(tmp_filename, "r"); + VRFY(subfile_ptr == NULL, "fopen on subfile correctly failed"); - HDfree(write_buf); + free(write_buf); write_buf = NULL; VRFY((H5FDclose(file_ptr) >= 0), "H5FDclose succeeded"); @@ -673,10 +673,10 @@ test_stripe_sizes(void) nbytes = (size_t)(cfg.stripe_size * num_subfiles); - write_buf = HDmalloc(nbytes); - VRFY(write_buf, "HDmalloc succeeded"); + write_buf = malloc(nbytes); + VRFY(write_buf, "malloc succeeded"); - HDmemset(write_buf, 255, nbytes); + memset(write_buf, 255, nbytes); c_write_buf = write_buf; @@ -736,8 +736,8 @@ test_stripe_sizes(void) (uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles); /* Ensure file exists */ - subfile_ptr = HDfopen(tmp_filename, "r"); - VRFY(subfile_ptr, "HDfopen on subfile succeeded"); + subfile_ptr = fopen(tmp_filename, "r"); + VRFY(subfile_ptr, "fopen on subfile succeeded"); VRFY((HDfclose(subfile_ptr) >= 0), "HDfclose on subfile succeeded"); /* Check file size */ @@ -752,8 +752,8 @@ test_stripe_sizes(void) (uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles); /* Ensure file doesn't exist */ - subfile_ptr = HDfopen(tmp_filename, "r"); - VRFY(subfile_ptr == NULL, "HDfopen on subfile correctly failed"); + subfile_ptr = fopen(tmp_filename, "r"); + VRFY(subfile_ptr == NULL, "fopen on subfile correctly failed"); } mpi_code_g = MPI_Barrier(comm_g); @@ -793,8 +793,8 @@ test_stripe_sizes(void) (uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles); /* Ensure file exists */ - subfile_ptr = HDfopen(tmp_filename, "r"); - VRFY(subfile_ptr, "HDfopen on subfile succeeded"); + subfile_ptr = fopen(tmp_filename, "r"); + VRFY(subfile_ptr, "fopen on subfile succeeded"); VRFY((HDfclose(subfile_ptr) >= 0), "HDfclose on subfile succeeded"); /* Check file size */ @@ -809,8 +809,8 @@ test_stripe_sizes(void) (uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles); /* Ensure file doesn't exist */ - subfile_ptr = HDfopen(tmp_filename, "r"); - VRFY(subfile_ptr == NULL, "HDfopen on subfile correctly failed"); + subfile_ptr = fopen(tmp_filename, "r"); + VRFY(subfile_ptr == NULL, "fopen on subfile correctly failed"); } VRFY((H5FDclose(file_ptr) >= 0), "H5FDclose succeeded"); @@ -824,12 +824,12 @@ test_stripe_sizes(void) } H5E_END_TRY; - HDfree(write_buf); + free(write_buf); VRFY((H5Pclose(fapl_id) >= 0), "FAPL close succeeded"); } - HDfree(tmp_filename); + free(tmp_filename); VRFY((H5Pclose(dxpl_id) >= 0), "DXPL close succeeded"); @@ -858,8 +858,8 @@ test_selection_strategies(void) if (MAINPROCESS) TESTING_2("I/O concentrator selection strategies"); - tmp_filename = HDmalloc(PATH_MAX); - VRFY(tmp_filename, "HDmalloc succeeded"); + tmp_filename = malloc(PATH_MAX); + VRFY(tmp_filename, "malloc succeeded"); for (H5FD_subfiling_ioc_select_t strategy = 0; strategy < ioc_selection_options; strategy++) { /* Skip 1 IOC per node strategy since we assume it's @@ -941,7 +941,7 @@ test_selection_strategies(void) case SELECT_IOC_WITH_CONFIG: case ioc_selection_options: default: - HDprintf("invalid IOC selection strategy\n"); + printf("invalid IOC selection strategy\n"); MPI_Abort(comm_g, -1); } @@ -955,7 +955,7 @@ test_selection_strategies(void) VRFY(HDsetenv(H5FD_SUBFILING_IOC_SELECTION_CRITERIA, criteria_buf, 1) >= 0, "HDsetenv succeeded"); - HDassert(num_active_ranks == mpi_size || num_active_ranks == 1); + assert(num_active_ranks == mpi_size || num_active_ranks == 1); if ((num_active_ranks == mpi_size) || (mpi_rank == 0)) { h5_stat_t file_info; @@ -985,8 +985,8 @@ test_selection_strategies(void) (uint64_t)file_info.st_ino, num_digits, i + 1, expected_num_subfiles); /* Ensure file exists */ - subfile_ptr = HDfopen(tmp_filename, "r"); - VRFY(subfile_ptr, "HDfopen on subfile succeeded"); + subfile_ptr = fopen(tmp_filename, "r"); + VRFY(subfile_ptr, "fopen on subfile succeeded"); VRFY((HDfclose(subfile_ptr) >= 0), "HDfclose on subfile succeeded"); } @@ -996,8 +996,8 @@ test_selection_strategies(void) expected_num_subfiles); /* Ensure file doesn't exist */ - subfile_ptr = HDfopen(tmp_filename, "r"); - VRFY(subfile_ptr == NULL, "HDfopen on subfile correctly failed"); + subfile_ptr = fopen(tmp_filename, "r"); + VRFY(subfile_ptr == NULL, "fopen on subfile correctly failed"); VRFY((H5Fclose(file_id) >= 0), "File close succeeded"); @@ -1024,7 +1024,7 @@ test_selection_strategies(void) mpi_code_g = MPI_Barrier(comm_g); VRFY((mpi_code_g == MPI_SUCCESS), "MPI_Barrier succeeded"); - HDfree(tmp_filename); + free(tmp_filename); CHECK_PASSED(); } @@ -1071,8 +1071,8 @@ test_read_different_stripe_size(void) if (MAINPROCESS) TESTING_2("file re-opening with different stripe size"); - tmp_filename = HDmalloc(PATH_MAX); - VRFY(tmp_filename, "HDmalloc succeeded"); + tmp_filename = malloc(PATH_MAX); + VRFY(tmp_filename, "malloc succeeded"); /* Use a 1MiB stripe size and a subfile for each IOC */ cfg.ioc_selection = SELECT_IOC_ONE_PER_NODE; @@ -1111,8 +1111,8 @@ test_read_different_stripe_size(void) VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) >= 0), "H5Sselect_hyperslab succeeded"); - buf = HDmalloc(count[0] * sizeof(SUBF_C_TYPE)); - VRFY(buf, "HDmalloc succeeded"); + buf = malloc(count[0] * sizeof(SUBF_C_TYPE)); + VRFY(buf, "malloc succeeded"); for (size_t i = 0; i < count[0]; i++) ((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((size_t)mpi_rank + i); @@ -1120,7 +1120,7 @@ test_read_different_stripe_size(void) VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0), "Dataset write succeeded"); - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded"); @@ -1144,8 +1144,8 @@ test_read_different_stripe_size(void) (uint64_t)file_info.st_ino, num_digits, j + 1, num_subfiles); /* Ensure file exists */ - subfile_ptr = HDfopen(tmp_filename, "r"); - VRFY(subfile_ptr, "HDfopen on subfile succeeded"); + subfile_ptr = fopen(tmp_filename, "r"); + VRFY(subfile_ptr, "fopen on subfile succeeded"); VRFY((HDfclose(subfile_ptr) >= 0), "HDfclose on subfile succeeded"); /* Check file size */ @@ -1181,8 +1181,8 @@ test_read_different_stripe_size(void) VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) >= 0), "H5Sselect_hyperslab succeeded"); - buf = HDcalloc(1, count[0] * sizeof(SUBF_C_TYPE)); - VRFY(buf, "HDcalloc succeeded"); + buf = calloc(1, count[0] * sizeof(SUBF_C_TYPE)); + VRFY(buf, "calloc succeeded"); VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0), "Dataset read succeeded"); @@ -1193,7 +1193,7 @@ test_read_different_stripe_size(void) VRFY((buf_value == (SUBF_C_TYPE)((size_t)mpi_rank + i)), "data verification succeeded"); } - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded"); @@ -1215,14 +1215,14 @@ test_read_different_stripe_size(void) if (j < (num_subfiles / 2)) { /* Ensure file exists */ - subfile_ptr = HDfopen(tmp_filename, "r"); - VRFY(subfile_ptr, "HDfopen on subfile succeeded"); + subfile_ptr = fopen(tmp_filename, "r"); + VRFY(subfile_ptr, "fopen on subfile succeeded"); VRFY((HDfclose(subfile_ptr) >= 0), "HDfclose on subfile succeeded"); } else { /* Ensure file doesn't exist */ - subfile_ptr = HDfopen(tmp_filename, "r"); - VRFY(subfile_ptr == NULL, "HDfopen on subfile correctly failed"); + subfile_ptr = fopen(tmp_filename, "r"); + VRFY(subfile_ptr == NULL, "fopen on subfile correctly failed"); } } } @@ -1239,7 +1239,7 @@ test_read_different_stripe_size(void) VRFY((H5Pclose(dxpl_id) >= 0), "DXPL close succeeded"); VRFY((H5Pclose(fapl_id) >= 0), "FAPL close succeeded"); - HDfree(tmp_filename); + free(tmp_filename); CHECK_PASSED(); } @@ -1331,8 +1331,8 @@ test_subfiling_precreate_rank_0(void) H5Dcreate2(file_id, "DSET", SUBF_HDF5_TYPE, fspace_id, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset creation succeeded"); - buf = HDmalloc(dset_dims[0] * sizeof(SUBF_C_TYPE)); - VRFY(buf, "HDmalloc succeeded"); + buf = malloc(dset_dims[0] * sizeof(SUBF_C_TYPE)); + VRFY(buf, "malloc succeeded"); for (size_t i = 0; i < dset_dims[0]; i++) ((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((i / n_elements_per_rank) + (i % n_elements_per_rank)); @@ -1340,7 +1340,7 @@ test_subfiling_precreate_rank_0(void) VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0), "Dataset write succeeded"); - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded"); @@ -1357,8 +1357,8 @@ test_subfiling_precreate_rank_0(void) VRFY((HDstat(SUBF_FILENAME, &file_info) >= 0), "HDstat succeeded"); - tmp_filename = HDmalloc(PATH_MAX); - VRFY(tmp_filename, "HDmalloc succeeded"); + tmp_filename = malloc(PATH_MAX); + VRFY(tmp_filename, "malloc succeeded"); for (int i = 0; i < num_subfiles; i++) { h5_stat_t subfile_info; @@ -1367,8 +1367,8 @@ test_subfiling_precreate_rank_0(void) (uint64_t)file_info.st_ino, num_digits, i + 1, num_subfiles); /* Ensure file exists */ - subfile_ptr = HDfopen(tmp_filename, "r"); - VRFY(subfile_ptr, "HDfopen on subfile succeeded"); + subfile_ptr = fopen(tmp_filename, "r"); + VRFY(subfile_ptr, "fopen on subfile succeeded"); VRFY((HDfclose(subfile_ptr) >= 0), "HDfclose on subfile succeeded"); /* Check file size */ @@ -1383,10 +1383,10 @@ test_subfiling_precreate_rank_0(void) (uint64_t)file_info.st_ino, num_digits, num_subfiles + 1, num_subfiles); /* Ensure file doesn't exist */ - subfile_ptr = HDfopen(tmp_filename, "r"); - VRFY(subfile_ptr == NULL, "HDfopen on subfile correctly failed"); + subfile_ptr = fopen(tmp_filename, "r"); + VRFY(subfile_ptr == NULL, "fopen on subfile correctly failed"); - HDfree(tmp_filename); + free(tmp_filename); tmp_filename = NULL; } @@ -1413,8 +1413,8 @@ test_subfiling_precreate_rank_0(void) VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) >= 0), "H5Sselect_hyperslab succeeded"); - buf = HDcalloc(1, count[0] * sizeof(SUBF_C_TYPE)); - VRFY(buf, "HDcalloc succeeded"); + buf = calloc(1, count[0] * sizeof(SUBF_C_TYPE)); + VRFY(buf, "calloc succeeded"); VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0), "Dataset read succeeded"); @@ -1425,7 +1425,7 @@ test_subfiling_precreate_rank_0(void) VRFY((buf_value == (SUBF_C_TYPE)((size_t)mpi_rank + i)), "data verification succeeded"); } - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded"); @@ -1522,8 +1522,8 @@ test_subfiling_write_many_read_one(void) VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) >= 0), "H5Sselect_hyperslab succeeded"); - buf = HDmalloc(count[0] * sizeof(SUBF_C_TYPE)); - VRFY(buf, "HDmalloc succeeded"); + buf = malloc(count[0] * sizeof(SUBF_C_TYPE)); + VRFY(buf, "malloc succeeded"); for (size_t i = 0; i < count[0]; i++) ((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((size_t)mpi_rank + i); @@ -1531,7 +1531,7 @@ test_subfiling_write_many_read_one(void) VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0), "Dataset write succeeded"); - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1550,8 +1550,8 @@ test_subfiling_write_many_read_one(void) dset_id = H5Dopen2(file_id, "DSET", H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); - buf = HDcalloc(1, target_size); - VRFY(buf, "HDcalloc succeeded"); + buf = calloc(1, target_size); + VRFY(buf, "calloc succeeded"); VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, H5S_ALL, dxpl_id, buf) >= 0), "Dataset read succeeded"); @@ -1564,7 +1564,7 @@ test_subfiling_write_many_read_one(void) } } - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1678,8 +1678,8 @@ test_subfiling_write_many_read_few(void) VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) >= 0), "H5Sselect_hyperslab succeeded"); - buf = HDmalloc(count[0] * sizeof(SUBF_C_TYPE)); - VRFY(buf, "HDmalloc succeeded"); + buf = malloc(count[0] * sizeof(SUBF_C_TYPE)); + VRFY(buf, "malloc succeeded"); for (size_t i = 0; i < count[0]; i++) ((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((size_t)mpi_rank + i); @@ -1687,7 +1687,7 @@ test_subfiling_write_many_read_few(void) VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0), "Dataset write succeeded"); - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1736,8 +1736,8 @@ test_subfiling_write_many_read_few(void) dset_id = H5Dopen2(file_id, "DSET", H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); - buf = HDcalloc(1, target_size); - VRFY(buf, "HDcalloc succeeded"); + buf = calloc(1, target_size); + VRFY(buf, "calloc succeeded"); VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, H5S_ALL, dxpl_id, buf) >= 0), "Dataset read succeeded"); @@ -1750,7 +1750,7 @@ test_subfiling_write_many_read_few(void) } } - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -1829,7 +1829,7 @@ test_subfiling_h5fuse(void) if (MAINPROCESS) { FILE *h5fuse_script; - h5fuse_script = HDfopen("h5fuse.sh", "r"); + h5fuse_script = fopen("h5fuse.sh", "r"); if (h5fuse_script) HDfclose(h5fuse_script); else @@ -1903,8 +1903,8 @@ test_subfiling_h5fuse(void) VRFY((H5Sselect_hyperslab(fspace_id, H5S_SELECT_SET, start, NULL, count, NULL) >= 0), "H5Sselect_hyperslab succeeded"); - buf = HDmalloc(count[0] * sizeof(SUBF_C_TYPE)); - VRFY(buf, "HDmalloc succeeded"); + buf = malloc(count[0] * sizeof(SUBF_C_TYPE)); + VRFY(buf, "malloc succeeded"); for (size_t i = 0; i < count[0]; i++) ((SUBF_C_TYPE *)buf)[i] = (SUBF_C_TYPE)((size_t)mpi_rank + i); @@ -1912,7 +1912,7 @@ test_subfiling_h5fuse(void) VRFY((H5Dwrite(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, fspace_id, dxpl_id, buf) >= 0), "Dataset write succeeded"); - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Sclose(fspace_id) >= 0), "File dataspace close succeeded"); @@ -1931,8 +1931,8 @@ test_subfiling_h5fuse(void) char *tmp_filename; char *args[7]; - tmp_filename = HDmalloc(PATH_MAX); - VRFY(tmp_filename, "HDmalloc succeeded"); + tmp_filename = malloc(PATH_MAX); + VRFY(tmp_filename, "malloc succeeded"); /* Generate name for configuration file */ HDsnprintf(tmp_filename, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir, @@ -1957,14 +1957,14 @@ test_subfiling_h5fuse(void) int ret; if ((ret = WEXITSTATUS(status)) != 0) { - HDprintf("h5fuse process exited with error code %d\n", ret); - HDfflush(stdout); + printf("h5fuse process exited with error code %d\n", ret); + fflush(stdout); MPI_Abort(comm_g, -1); } } else { - HDprintf("h5fuse process terminated abnormally\n"); - HDfflush(stdout); + printf("h5fuse process terminated abnormally\n"); + fflush(stdout); MPI_Abort(comm_g, -1); } } @@ -1980,8 +1980,8 @@ test_subfiling_h5fuse(void) dset_id = H5Dopen2(file_id, "DSET", H5P_DEFAULT); VRFY((dset_id >= 0), "Dataset open succeeded"); - buf = HDcalloc(1, target_size); - VRFY(buf, "HDcalloc succeeded"); + buf = calloc(1, target_size); + VRFY(buf, "calloc succeeded"); VRFY((H5Dread(dset_id, SUBF_HDF5_TYPE, H5S_BLOCK, H5S_ALL, dxpl_id, buf) >= 0), "Dataset read succeeded"); @@ -1994,7 +1994,7 @@ test_subfiling_h5fuse(void) } } - HDfree(buf); + free(buf); buf = NULL; VRFY((H5Dclose(dset_id) >= 0), "Dataset close succeeded"); @@ -2024,8 +2024,8 @@ test_subfiling_h5fuse(void) } H5E_END_TRY; - filename_buf = HDmalloc(PATH_MAX); - VRFY(filename_buf, "HDmalloc succeeded"); + filename_buf = malloc(PATH_MAX); + VRFY(filename_buf, "malloc succeeded"); /* Generate name for configuration file */ HDsnprintf(filename_buf, PATH_MAX, "%s/" H5FD_SUBFILING_CONFIG_FILENAME_TEMPLATE, config_dir, @@ -2033,7 +2033,7 @@ test_subfiling_h5fuse(void) /* Delete the configuration file */ if (HDremove(filename_buf) < 0) { - HDprintf("couldn't remove Subfiling VFD configuration file '%s'\n", filename_buf); + printf("couldn't remove Subfiling VFD configuration file '%s'\n", filename_buf); nerrors++; } @@ -2044,12 +2044,12 @@ test_subfiling_h5fuse(void) /* Delete the subfile */ if (HDremove(filename_buf) < 0) { - HDprintf("couldn't remove subfile '%s'\n", filename_buf); + printf("couldn't remove subfile '%s'\n", filename_buf); nerrors++; } } - HDfree(filename_buf); + free(filename_buf); } VRFY((H5Pclose(fapl_id) >= 0), "FAPL close succeeded"); @@ -2093,13 +2093,13 @@ parse_subfiling_env_vars(void) } if (NULL != (env_value = HDgetenv(H5FD_IOC_THREAD_POOL_SIZE))) { - ioc_thread_pool_size_g = HDatoi(env_value); + ioc_thread_pool_size_g = atoi(env_value); if (ioc_thread_pool_size_g <= 0) ioc_thread_pool_size_g = -1; } if (NULL != (env_value = HDgetenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX))) { - HDassert(config_dir); + assert(config_dir); HDstrncpy(config_dir, env_value, PATH_MAX); @@ -2129,27 +2129,27 @@ main(int argc, char **argv) /* Initialize MPI */ if (MPI_SUCCESS != (mpi_code_g = MPI_Init_thread(&argc, &argv, required, &provided))) { - HDprintf("MPI_Init_thread failed with error code %d\n", mpi_code_g); + printf("MPI_Init_thread failed with error code %d\n", mpi_code_g); nerrors++; goto exit; } if (MPI_SUCCESS != (mpi_code_g = MPI_Comm_rank(comm_g, &mpi_rank))) { - HDprintf("MPI_Comm_rank failed with error code %d\n", mpi_code_g); + printf("MPI_Comm_rank failed with error code %d\n", mpi_code_g); nerrors++; goto exit; } if (provided != required) { if (MAINPROCESS) - HDprintf("MPI doesn't support MPI_Init_thread with MPI_THREAD_MULTIPLE\n"); + printf("MPI doesn't support MPI_Init_thread with MPI_THREAD_MULTIPLE\n"); nerrors++; goto exit; } if (MPI_SUCCESS != (mpi_code_g = MPI_Comm_size(comm_g, &mpi_size))) { if (MAINPROCESS) - HDprintf("MPI_Comm_size failed with error code %d\n", mpi_code_g); + printf("MPI_Comm_size failed with error code %d\n", mpi_code_g); nerrors++; goto exit; } @@ -2158,19 +2158,19 @@ main(int argc, char **argv) if (MPI_SUCCESS != (mpi_code_g = MPI_Comm_split_type(comm_g, MPI_COMM_TYPE_SHARED, mpi_rank, MPI_INFO_NULL, &node_local_comm))) { if (MAINPROCESS) - HDprintf("MPI_Comm_split_type failed with error code %d\n", mpi_code_g); + printf("MPI_Comm_split_type failed with error code %d\n", mpi_code_g); nerrors++; goto exit; } if (MPI_SUCCESS != (mpi_code_g = MPI_Comm_size(node_local_comm, &node_local_size))) { if (MAINPROCESS) - HDprintf("MPI_Comm_size failed with error code %d\n", mpi_code_g); + printf("MPI_Comm_size failed with error code %d\n", mpi_code_g); nerrors++; goto exit; } if (MPI_SUCCESS != (mpi_code_g = MPI_Comm_rank(node_local_comm, &node_local_rank))) { if (MAINPROCESS) - HDprintf("MPI_Comm_rank failed with error code %d\n", mpi_code_g); + printf("MPI_Comm_rank failed with error code %d\n", mpi_code_g); nerrors++; goto exit; } @@ -2180,7 +2180,7 @@ main(int argc, char **argv) if (MPI_SUCCESS != (mpi_code_g = MPI_Allreduce(MPI_IN_PLACE, &num_nodes_g, 1, MPI_INT, MPI_SUM, comm_g))) { if (MAINPROCESS) - HDprintf("MPI_Allreduce failed with error code %d\n", mpi_code_g); + printf("MPI_Allreduce failed with error code %d\n", mpi_code_g); nerrors++; goto exit; } @@ -2193,32 +2193,32 @@ main(int argc, char **argv) */ if (MPI_SUCCESS != (mpi_code_g = MPI_Comm_split(comm_g, node_local_rank, mpi_rank, &ioc_comm))) { if (MAINPROCESS) - HDprintf("MPI_Comm_split failed with error code %d\n", mpi_code_g); + printf("MPI_Comm_split failed with error code %d\n", mpi_code_g); nerrors++; goto exit; } if (MPI_SUCCESS != (mpi_code_g = MPI_Comm_size(ioc_comm, &ioc_comm_size))) { if (MAINPROCESS) - HDprintf("MPI_Comm_size failed with error code %d\n", mpi_code_g); + printf("MPI_Comm_size failed with error code %d\n", mpi_code_g); nerrors++; goto exit; } if (MPI_SUCCESS != (mpi_code_g = MPI_Comm_rank(ioc_comm, &ioc_comm_rank))) { if (MAINPROCESS) - HDprintf("MPI_Comm_rank failed with error code %d\n", mpi_code_g); + printf("MPI_Comm_rank failed with error code %d\n", mpi_code_g); nerrors++; goto exit; } if (H5dont_atexit() < 0) { if (MAINPROCESS) - HDprintf("Failed to turn off atexit processing. Continue.\n"); + printf("Failed to turn off atexit processing. Continue.\n"); } H5open(); if (MAINPROCESS) { - HDprintf("Testing Subfiling VFD functionality\n"); + printf("Testing Subfiling VFD functionality\n"); } TestAlarmOn(); @@ -2236,7 +2236,7 @@ main(int argc, char **argv) if (mpi_size > 1) { if (MPI_SUCCESS != (mpi_code_g = MPI_Bcast(&seed, 1, MPI_UNSIGNED, 0, comm_g))) { if (MAINPROCESS) - HDprintf("MPI_Bcast failed with error code %d\n", mpi_code_g); + printf("MPI_Bcast failed with error code %d\n", mpi_code_g); nerrors++; goto exit; } @@ -2245,13 +2245,13 @@ main(int argc, char **argv) srand(seed); if (MAINPROCESS) - HDprintf("Using seed: %u\n\n", seed); + printf("Using seed: %u\n\n", seed); /* Allocate buffer for possible config file directory specified */ - config_dir = HDmalloc(PATH_MAX); + config_dir = malloc(PATH_MAX); if (!config_dir) { if (MAINPROCESS) - HDprintf("couldn't allocate space for subfiling config file directory buffer\n"); + printf("couldn't allocate space for subfiling config file directory buffer\n"); nerrors++; goto exit; } @@ -2312,7 +2312,7 @@ main(int argc, char **argv) if (HDsetenv(H5FD_SUBFILING_STRIPE_SIZE, tmp, 1) < 0) { if (MAINPROCESS) - HDprintf("HDsetenv failed\n"); + printf("HDsetenv failed\n"); nerrors++; goto exit; } @@ -2329,7 +2329,7 @@ main(int argc, char **argv) if (HDsetenv(H5FD_SUBFILING_IOC_PER_NODE, ioc_per_node_str, 1) < 0) { if (MAINPROCESS) - HDprintf("HDsetenv failed\n"); + printf("HDsetenv failed\n"); nerrors++; goto exit; } @@ -2339,7 +2339,7 @@ main(int argc, char **argv) if (ioc_thread_pool_size_g < 0) { if (HDsetenv(H5FD_IOC_THREAD_POOL_SIZE, "2", 1) < 0) { if (MAINPROCESS) - HDprintf("HDsetenv failed\n"); + printf("HDsetenv failed\n"); nerrors++; goto exit; } @@ -2364,7 +2364,7 @@ main(int argc, char **argv) if (MAINPROCESS) { if ((HDmkdir(SUBFILING_CONFIG_FILE_DIR, (mode_t)0755) < 0) && (errno != EEXIST)) { - HDprintf("couldn't create temporary testing directory\n"); + printf("couldn't create temporary testing directory\n"); mkdir_success = 0; } else @@ -2376,14 +2376,14 @@ main(int argc, char **argv) if (!mkdir_success) { if (MAINPROCESS) - HDprintf("HDmkdir failed\n"); + printf("HDmkdir failed\n"); nerrors++; goto exit; } if (HDsetenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX, SUBFILING_CONFIG_FILE_DIR, 1) < 0) { if (MAINPROCESS) - HDprintf("HDsetenv failed\n"); + printf("HDsetenv failed\n"); nerrors++; goto exit; } @@ -2391,7 +2391,7 @@ main(int argc, char **argv) else { if (HDsetenv(H5FD_SUBFILING_CONFIG_FILE_PREFIX, ".", 1) < 0) { if (MAINPROCESS) - HDprintf("HDsetenv failed\n"); + printf("HDsetenv failed\n"); nerrors++; goto exit; } @@ -2413,7 +2413,7 @@ main(int argc, char **argv) num_iocs_g = mpi_size; if (MAINPROCESS) { - HDprintf("Re-running tests with environment variables set\n"); + printf("Re-running tests with environment variables set\n"); } for (size_t i = 0; i < ARRAY_SIZE(tests); i++) { @@ -2448,14 +2448,14 @@ exit: if (MAINPROCESS) { if (HDrmdir(SUBFILING_CONFIG_FILE_DIR) < 0 && (errno != ENOENT)) { - HDprintf("couldn't remove temporary testing directory\n"); + printf("couldn't remove temporary testing directory\n"); nerrors++; } } if (nerrors) { if (MAINPROCESS) - HDprintf("*** %d TEST ERROR%s OCCURRED ***\n", nerrors, nerrors > 1 ? "S" : ""); + printf("*** %d TEST ERROR%s OCCURRED ***\n", nerrors, nerrors > 1 ? "S" : ""); } TestAlarmOff(); @@ -2469,7 +2469,7 @@ exit: MPI_Finalize(); - HDexit(nerrors ? EXIT_FAILURE : EXIT_SUCCESS); + exit(nerrors ? EXIT_FAILURE : EXIT_SUCCESS); } #else /* H5_HAVE_SUBFILING_VFD */ @@ -2478,9 +2478,9 @@ int main(void) { h5_reset(); - HDprintf("Testing Subfiling VFD functionality\n"); - HDprintf("SKIPPED - Subfiling VFD not built\n"); - HDexit(EXIT_SUCCESS); + printf("Testing Subfiling VFD functionality\n"); + printf("SKIPPED - Subfiling VFD not built\n"); + exit(EXIT_SUCCESS); } #endif /* H5_HAVE_SUBFILING_VFD */ diff --git a/testpar/t_vfd.c b/testpar/t_vfd.c index 86cfe2f..fe3477d 100644 --- a/testpar/t_vfd.c +++ b/testpar/t_vfd.c @@ -133,7 +133,7 @@ alloc_and_init_file_images(int mpi_size) pass = TRUE; if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* allocate the file image buffers */ if (pass) { @@ -141,11 +141,11 @@ alloc_and_init_file_images(int mpi_size) buf_len = INTS_PER_RANK * mpi_size; buf_size = sizeof(int32_t) * (size_t)INTS_PER_RANK * (size_t)mpi_size; - increasing_fi_buf = (int32_t *)HDmalloc(buf_size); - decreasing_fi_buf = (int32_t *)HDmalloc(buf_size); - negative_fi_buf = (int32_t *)HDmalloc(buf_size); - zero_fi_buf = (int32_t *)HDmalloc(buf_size); - read_fi_buf = (int32_t *)HDmalloc(buf_size); + increasing_fi_buf = (int32_t *)malloc(buf_size); + decreasing_fi_buf = (int32_t *)malloc(buf_size); + negative_fi_buf = (int32_t *)malloc(buf_size); + zero_fi_buf = (int32_t *)malloc(buf_size); + read_fi_buf = (int32_t *)malloc(buf_size); if ((!increasing_fi_buf) || (!decreasing_fi_buf) || (!negative_fi_buf) || (!zero_fi_buf) || (!read_fi_buf)) { @@ -156,7 +156,7 @@ alloc_and_init_file_images(int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* initialize the file image buffers */ if (pass) { @@ -172,7 +172,7 @@ alloc_and_init_file_images(int mpi_size) } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* discard file image buffers if there was an error */ if (!pass) { @@ -203,31 +203,31 @@ free_file_images(void) { if (increasing_fi_buf) { - HDfree(increasing_fi_buf); + free(increasing_fi_buf); increasing_fi_buf = NULL; } if (decreasing_fi_buf) { - HDfree(decreasing_fi_buf); + free(decreasing_fi_buf); decreasing_fi_buf = NULL; } if (negative_fi_buf) { - HDfree(negative_fi_buf); + free(negative_fi_buf); negative_fi_buf = NULL; } if (zero_fi_buf) { - HDfree(zero_fi_buf); + free(zero_fi_buf); zero_fi_buf = NULL; } if (read_fi_buf) { - HDfree(read_fi_buf); + free(read_fi_buf); read_fi_buf = NULL; } @@ -270,13 +270,13 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x unsigned flags = 0; /* file open flags */ H5FD_t *lf = NULL; /* VFD struct ptr */ - HDassert(vfd_name); - HDassert(lf_ptr); - HDassert(fapl_id_ptr); - HDassert(dxpl_id_ptr); + assert(vfd_name); + assert(lf_ptr); + assert(fapl_id_ptr); + assert(dxpl_id_ptr); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the file name -- do this now, since setting up the ioc faple requires it. This will probably * change */ @@ -290,7 +290,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setupf fapl for target VFD */ if (pass) { @@ -354,8 +354,8 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x failure_mssg = "Can't set MPI communicator and info in subfiling fapl."; } - HDmemset(&ioc_config, 0, sizeof(ioc_config)); - HDmemset(&subfiling_conf, 0, sizeof(subfiling_conf)); + memset(&ioc_config, 0, sizeof(ioc_config)); + memset(&subfiling_conf, 0, sizeof(subfiling_conf)); /* Get subfiling VFD defaults */ if ((pass) && (H5Pget_fapl_subfiling(fapl_id, &subfiling_conf) == FAIL)) { @@ -407,7 +407,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* setup the file name */ if (pass) { @@ -420,7 +420,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* Open the VFD test file with the specified VFD. */ @@ -436,7 +436,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* set eoa as specified */ @@ -452,7 +452,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if (pass) { /* setup dxpl */ @@ -466,7 +466,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if (pass) { @@ -478,7 +478,7 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if (pass) { @@ -533,12 +533,12 @@ takedown_vfd_test_file(int mpi_rank, char *filename, H5FD_t **lf_ptr, hid_t *fap int cp = 0; hbool_t show_progress = FALSE; - HDassert(lf_ptr); - HDassert(fapl_id_ptr); - HDassert(dxpl_id_ptr); + assert(lf_ptr); + assert(fapl_id_ptr); + assert(dxpl_id_ptr); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* Close the test file if it is open, regardless of the value of pass. * This should let the test program shut down more cleanly. @@ -554,7 +554,7 @@ takedown_vfd_test_file(int mpi_rank, char *filename, H5FD_t **lf_ptr, hid_t *fap } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 6) On rank 0, delete the test file. */ @@ -575,7 +575,7 @@ takedown_vfd_test_file(int mpi_rank, char *filename, H5FD_t **lf_ptr, hid_t *fap MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* Close the fapl */ if (H5Pclose(*fapl_id_ptr) < 0) { @@ -585,7 +585,7 @@ takedown_vfd_test_file(int mpi_rank, char *filename, H5FD_t **lf_ptr, hid_t *fap } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* Close the dxpl */ if (H5Pclose(*dxpl_id_ptr) < 0) { @@ -595,7 +595,7 @@ takedown_vfd_test_file(int mpi_rank, char *filename, H5FD_t **lf_ptr, hid_t *fap } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); return; @@ -681,7 +681,7 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } else { - HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); + assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 1 -- %s / col op / col I/O", vfd_name); @@ -693,7 +693,7 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ show_progress = ((show_progress) && (mpi_rank == 0)); if (show_progress) - HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */ if (pass) { @@ -705,7 +705,7 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 2) Using rank zero, write the entire increasing_fi_buf to * the file. @@ -729,7 +729,7 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 4) On each rank, zero the read buffer, and then read * INTS_PER_RANK * sizeof(int32) bytes from the file @@ -787,13 +787,13 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5) Barrier */ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 6) Close the test file and delete it (on rank 0 only). * Close FAPL and DXPL. @@ -801,7 +801,7 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* report results */ if (mpi_rank == 0) { @@ -815,7 +815,7 @@ vector_read_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ H5_FAILED(); if ((disp_failure_mssgs) || (show_progress)) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } } } @@ -914,7 +914,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } else { - HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); + assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 2 -- %s / col op / col I/O", vfd_name); @@ -926,7 +926,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ show_progress = ((show_progress) && (mpi_rank == 0)); if (show_progress) - HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */ if (pass) { @@ -938,7 +938,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 2) Using rank zero, write the entire decreasing_fi_buf to * the file. @@ -962,7 +962,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 4) On each rank, zero the read buffer. */ if (pass) { @@ -974,7 +974,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5) On even ranks, read INTS_PER_RANK * sizeof(int32) * bytes from the file starting at offset mpi_rank * @@ -1007,13 +1007,13 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 6) Barrier */ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 7) On odd ranks, read INTS_PER_RANK * sizeof(int32) * bytes from the file starting at offset mpi_rank * @@ -1046,7 +1046,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 8) Verify that read_fi_buf contains zeros for all * indices less than mpi_rank * INTS_PER_RANK, or @@ -1081,20 +1081,20 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 9) Barrier */ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 10) Close the test file and delete it (on rank 0 only). * Close FAPL and DXPL. */ takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* report results */ if (mpi_rank == 0) { @@ -1108,7 +1108,7 @@ vector_read_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ H5_FAILED(); if ((disp_failure_mssgs) || (show_progress)) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } } } @@ -1218,7 +1218,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } else { - HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); + assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 3 -- %s / col op / col I/O", vfd_name); @@ -1230,7 +1230,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ show_progress = ((show_progress) && (mpi_rank == 0)); if (show_progress) - HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */ if (pass) { @@ -1242,7 +1242,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 2) Using rank zero, write the entire negative_fi_buf to * the file. @@ -1266,7 +1266,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 4) On each rank, zero the four read buffers. */ if (pass) { @@ -1281,7 +1281,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5) On each rank, do a vector read from the file, with * each rank's vector having four elements, with each @@ -1354,7 +1354,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 6) Verify that buf_0, buf_1, buf_2, and buf_3 contain * the expected data. Note that this will be different @@ -1412,13 +1412,13 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 7) Barrier */ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 8) Close the test file and delete it (on rank 0 only). * Close FAPL and DXPL. @@ -1426,7 +1426,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* report results */ if (mpi_rank == 0) { @@ -1440,7 +1440,7 @@ vector_read_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ H5_FAILED(); if ((disp_failure_mssgs) || (show_progress)) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } } } @@ -1574,7 +1574,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } else { - HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); + assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 4 -- %s / col op / col I/O", vfd_name); @@ -1586,7 +1586,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ show_progress = ((show_progress) && (mpi_rank == 0)); if (show_progress) - HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */ if (pass) { @@ -1598,7 +1598,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 2) Using rank zero, write the entire negative_fi_buf to * the file. @@ -1622,7 +1622,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 4) Set all cells of read_fi_buf to zero. */ if (pass) { @@ -1634,7 +1634,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5) For each rank, define base_index equal to: * @@ -1775,8 +1775,8 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ pass = FALSE; failure_mssg = "unexpected data read from file (1.1)"; - HDfprintf(stdout, "\nread_fi_buf[%d] = %d, increasing_fi_buf[%d] = %d\n", - j, read_fi_buf[j], j, increasing_fi_buf[j]); + fprintf(stdout, "\nread_fi_buf[%d] = %d, increasing_fi_buf[%d] = %d\n", j, + read_fi_buf[j], j, increasing_fi_buf[j]); } } else if (((INTS_PER_RANK / 4) <= k) && (k < (3 * (INTS_PER_RANK / 8)))) { @@ -1860,7 +1860,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ break; default: - HDassert(FALSE); /* should be un-reachable */ + assert(FALSE); /* should be un-reachable */ break; } } @@ -1874,13 +1874,13 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } /* end if */ if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 7) Barrier */ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 8) Close the test file and delete it (on rank 0 only). * Close FAPL and DXPL. @@ -1888,7 +1888,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* report results */ if (mpi_rank == 0) { @@ -1902,7 +1902,7 @@ vector_read_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ H5_FAILED(); if ((disp_failure_mssgs) || (show_progress)) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } } } @@ -2004,7 +2004,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } else { - HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); + assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); HDsnprintf(test_title, sizeof(test_title), "parallel vector read test 5 -- %s / col op / col I/O", vfd_name); @@ -2016,7 +2016,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ show_progress = ((show_progress) && (mpi_rank == 0)); if (show_progress) - HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */ if (pass) { @@ -2028,7 +2028,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 2) Using rank zero, write the entire negative_fi_buf to * the file. @@ -2052,7 +2052,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 4) Set all cells of read_fi_buf to zero. */ if (pass) { @@ -2064,7 +2064,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5) For each rank, define base_index equal to: * @@ -2108,7 +2108,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 6) On each rank, verify that read_fi_buf contains the * the expected values -- that is the matching values from @@ -2141,13 +2141,13 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ } /* end if */ if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 7) Barrier */ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 8) Close the test file and delete it (on rank 0 only). * Close FAPL and DXPL. @@ -2155,7 +2155,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* report results */ if (mpi_rank == 0) { @@ -2168,7 +2168,7 @@ vector_read_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer_ H5_FAILED(); if ((disp_failure_mssgs) || (show_progress)) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } } } @@ -2243,7 +2243,7 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } else { - HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); + assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); HDsnprintf(test_title, sizeof(test_title), "parallel vector write test 1 -- %s / col op / col I/O", vfd_name); @@ -2255,7 +2255,7 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer show_progress = ((show_progress) && (mpi_rank == 0)); if (show_progress) - HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */ if (pass) { @@ -2267,7 +2267,7 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 2) Write the entire increasing_fi_buf to the file, with * exactly one buffer per vector per rank. Use either @@ -2290,14 +2290,14 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 3) Barrier */ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 4) On each rank, read the entire file into the read_fi_buf, * and compare against increasing_fi_buf. Report failure @@ -2326,7 +2326,7 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5) Close the test file and delete it (on rank 0 only). * Close FAPL and DXPL. @@ -2334,7 +2334,7 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* report results */ if (mpi_rank == 0) { @@ -2348,7 +2348,7 @@ vector_write_test_1(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer H5_FAILED(); if ((disp_failure_mssgs) || (show_progress)) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } } } @@ -2433,7 +2433,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } else { - HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); + assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); HDsnprintf(test_title, sizeof(test_title), "parallel vector write test 2 -- %s / col op / col I/O", vfd_name); @@ -2445,7 +2445,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer show_progress = ((show_progress) && (mpi_rank == 0)); if (show_progress) - HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */ if (pass) { @@ -2457,7 +2457,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 2) Write the odd blocks of the increasing_fi_buf to the file, * with the odd ranks writing the odd blocks, and the even @@ -2494,7 +2494,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 3) Write the even blocks of the negative_fi_buf to the file, * with the even ranks writing the even blocks, and the odd @@ -2527,14 +2527,14 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 4) Barrier */ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5) On each rank, read the entire file into the read_fi_buf, * and compare against increasing_fi_buf. Report failure @@ -2581,7 +2581,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 6) Close the test file and delete it (on rank 0 only). * Close FAPL and DXPL. @@ -2589,7 +2589,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* report results */ if (mpi_rank == 0) { @@ -2603,7 +2603,7 @@ vector_write_test_2(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer H5_FAILED(); if ((disp_failure_mssgs) || (show_progress)) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } } } @@ -2689,7 +2689,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } else { - HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); + assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); HDsnprintf(test_title, sizeof(test_title), "parallel vector write test 3 -- %s / col op / col I/O", vfd_name); @@ -2701,7 +2701,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer show_progress = ((show_progress) && (mpi_rank == 0)); if (show_progress) - HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */ if (pass) { @@ -2713,7 +2713,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 2) For each rank, construct a vector with base address * (mpi_rank * INTS_PER_RANK) and writing all bytes from @@ -2759,14 +2759,14 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 3) Barrier */ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 4) On each rank, read the entire file into the read_fi_buf, * and compare against increasing_fi_buf, @@ -2838,7 +2838,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5) Close the test file and delete it (on rank 0 only). * Close FAPL and DXPL. @@ -2846,7 +2846,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* report results */ if (mpi_rank == 0) { @@ -2860,7 +2860,7 @@ vector_write_test_3(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer H5_FAILED(); if ((disp_failure_mssgs) || (show_progress)) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } } } @@ -2952,7 +2952,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } else { - HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); + assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); HDsnprintf(test_title, sizeof(test_title), "parallel vector write test 4 -- %s / col op / col I/O", vfd_name); @@ -2964,7 +2964,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer show_progress = ((show_progress) && (mpi_rank == 0)); if (show_progress) - HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */ if (pass) { @@ -2976,7 +2976,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 2) For each rank, construct a vector with base address * (mpi_rank * INTS_PER_RANK) and writing all bytes from @@ -3023,14 +3023,14 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 3) Barrier */ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 4) On each rank, read the entire file into the read_fi_buf, * and compare against increasing_fi_buf, @@ -3102,7 +3102,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5) Close the test file and delete it (on rank 0 only). * Close FAPL and DXPL. @@ -3110,7 +3110,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* report results */ if (mpi_rank == 0) { @@ -3124,7 +3124,7 @@ vector_write_test_4(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer H5_FAILED(); if ((disp_failure_mssgs) || (show_progress)) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } } } @@ -3252,7 +3252,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } else { - HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); + assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); HDsnprintf(test_title, sizeof(test_title), "parallel vector write test 5 -- %s / col op / col I/O", vfd_name); @@ -3264,7 +3264,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer show_progress = ((show_progress) && (mpi_rank == 0)); if (show_progress) - HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */ if (pass) { @@ -3276,7 +3276,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 2) Set the test file in a known state by writing zeros * to all bytes in the test file. Since we have already @@ -3298,14 +3298,14 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 3) Barrier */ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 4) For each rank, define base_index equal to: * @@ -3415,13 +3415,13 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5) Barrier */ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 6) On each rank, read the entire file into the read_fi_buf, * and compare against increasing_fi_buf, @@ -3458,8 +3458,8 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer pass = FALSE; failure_mssg = "unexpected data read from file (1.1)"; - HDprintf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j], - negative_fi_buf[j]); + printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j], + negative_fi_buf[j]); } } else if (((INTS_PER_RANK / 4) <= k) && (k < (3 * (INTS_PER_RANK / 8)))) { @@ -3469,8 +3469,8 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer pass = FALSE; failure_mssg = "unexpected data read from file (1.2)"; - HDprintf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j], - decreasing_fi_buf[j]); + printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j], + decreasing_fi_buf[j]); } } else if (((INTS_PER_RANK / 16) <= k) && (k < (INTS_PER_RANK / 8))) { @@ -3480,8 +3480,8 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer pass = FALSE; failure_mssg = "unexpected data read from file (1.3)"; - HDprintf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j], - increasing_fi_buf[j]); + printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j], + increasing_fi_buf[j]); } } else { @@ -3502,8 +3502,8 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer pass = FALSE; failure_mssg = "unexpected data read from file (2.1)"; - HDprintf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j], - increasing_fi_buf[j]); + printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j], + increasing_fi_buf[j]); } } else if ((((INTS_PER_RANK / 2) + 1) <= k) && (k <= (INTS_PER_RANK - 2))) { @@ -3513,8 +3513,8 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer pass = FALSE; failure_mssg = "unexpected data read from file (2.2)"; - HDprintf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j], - decreasing_fi_buf[j]); + printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j], + decreasing_fi_buf[j]); } } else { @@ -3535,8 +3535,8 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer pass = FALSE; failure_mssg = "unexpected data read from file (3.1)"; - HDprintf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j], - negative_fi_buf[j]); + printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j], + negative_fi_buf[j]); } } else { @@ -3558,7 +3558,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer break; default: - HDassert(FALSE); /* should be un-reachable */ + assert(FALSE); /* should be un-reachable */ break; } } @@ -3566,7 +3566,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 7) Close the test file and delete it (on rank 0 only). * Close FAPL and DXPL. @@ -3574,7 +3574,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* report results */ if (mpi_rank == 0) { @@ -3588,7 +3588,7 @@ vector_write_test_5(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer H5_FAILED(); if ((disp_failure_mssgs) || (show_progress)) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } } } @@ -3689,7 +3689,7 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } else { - HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); + assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); HDsnprintf(test_title, sizeof(test_title), "parallel vector write test 6 -- %s / col op / col I/O", vfd_name); @@ -3701,7 +3701,7 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer show_progress = ((show_progress) && (mpi_rank == 0)); if (show_progress) - HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */ if (pass) { @@ -3713,7 +3713,7 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 2) Using rank zero, write the entire negative_fi_buf to * the file. @@ -3736,7 +3736,7 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 4) For each rank, define base_index equal to: * @@ -3780,13 +3780,13 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5) Barrier */ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 6) On each rank, read the entire file into the read_fi_buf, * and compare against zero_fi_buf, and increasing_fi_buf @@ -3822,13 +3822,13 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } /* end if */ if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 7) Barrier */ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 8) Close the test file and delete it (on rank 0 only). * Close FAPL and DXPL. @@ -3836,7 +3836,7 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* report results */ if (mpi_rank == 0) { @@ -3850,7 +3850,7 @@ vector_write_test_6(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer H5_FAILED(); if ((disp_failure_mssgs) || (show_progress)) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } } } @@ -3947,7 +3947,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } else { - HDassert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); + assert(coll_opt_mode == H5FD_MPIO_COLLECTIVE_IO); HDsprintf(test_title, "parallel vector write test 7 -- %s / col op / col I/O", vfd_name); } @@ -3958,7 +3958,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer show_progress = ((show_progress) && (mpi_rank == 0)); if (show_progress) - HDfprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "\n%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 1) Open the test file with the specified VFD, set the eoa, and setup the dxpl */ if (pass) { @@ -3970,7 +3970,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 2) Set the test file in a known state by writing zeros * to all bytes in the test file. Since we have already @@ -3992,14 +3992,14 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 3) Barrier */ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); if (pass) { @@ -4025,13 +4025,13 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 5) Barrier */ MPI_Barrier(comm); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 6) On each rank, read the entire file into the read_fi_buf, * and compare against increasing_fi_buf, and zero_fi_buf as @@ -4064,8 +4064,8 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer pass = FALSE; failure_mssg = "unexpected data read from file (1)"; - HDprintf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j], - increasing_fi_buf[j]); + printf("\nread_fi_buf[%d] = %d, %d expected.\n", j, read_fi_buf[j], + increasing_fi_buf[j]); } } else { @@ -4075,7 +4075,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer pass = FALSE; failure_mssg = "unexpected data read from file (2)"; - HDprintf("\nread_fi_buf[%d] = %d, 0 expected.\n", j, read_fi_buf[j]); + printf("\nread_fi_buf[%d] = %d, 0 expected.\n", j, read_fi_buf[j]); } } } @@ -4083,7 +4083,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer } if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* 7) Close the test file and delete it (on rank 0 only). * Close FAPL and DXPL. @@ -4091,7 +4091,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer takedown_vfd_test_file(mpi_rank, filename, &lf, &fapl_id, &dxpl_id); if (show_progress) - HDfprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); + fprintf(stdout, "%s: cp = %d, pass = %d.\n", fcn_name, cp++, pass); /* report results */ if (mpi_rank == 0) { @@ -4105,7 +4105,7 @@ vector_write_test_7(int file_name_id, int mpi_rank, int mpi_size, H5FD_mpio_xfer H5_FAILED(); if ((disp_failure_mssgs) || (show_progress)) { - HDfprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); + fprintf(stdout, "%s: failure_mssg = \"%s\"\n", fcn_name, failure_mssg); } } } @@ -4142,17 +4142,17 @@ main(int argc, char **argv) #ifdef H5_HAVE_SUBFILING_VFD if (MPI_SUCCESS != MPI_Init_thread(&argc, &argv, required, &provided)) { - HDprintf(" MPI doesn't support MPI_Init_thread with MPI_THREAD_MULTIPLE. Exiting\n"); + printf(" MPI doesn't support MPI_Init_thread with MPI_THREAD_MULTIPLE. Exiting\n"); goto finish; } if (provided != required) { - HDprintf(" MPI doesn't support MPI_Init_thread with MPI_THREAD_MULTIPLE. Exiting\n"); + printf(" MPI doesn't support MPI_Init_thread with MPI_THREAD_MULTIPLE. Exiting\n"); goto finish; } #else if (MPI_SUCCESS != MPI_Init(&argc, &argv)) { - HDprintf(" MPI_Init failed. Exiting\n"); + printf(" MPI_Init failed. Exiting\n"); goto finish; } #endif @@ -4166,20 +4166,20 @@ main(int argc, char **argv) * calls which may not work. */ if (H5dont_atexit() < 0) - 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(); if (mpi_rank == 0) { - HDprintf("=========================================\n"); - HDprintf("Parallel virtual file driver (VFD) tests\n"); - HDprintf(" mpi_size = %d\n", mpi_size); - HDprintf("=========================================\n"); + printf("=========================================\n"); + printf("Parallel virtual file driver (VFD) tests\n"); + printf(" mpi_size = %d\n", mpi_size); + printf("=========================================\n"); } if (mpi_size < 2) { if (mpi_rank == 0) - HDprintf(" Need at least 2 processes. Exiting.\n"); + printf(" Need at least 2 processes. Exiting.\n"); goto finish; } @@ -4187,14 +4187,14 @@ main(int argc, char **argv) if (!pass) { - HDprintf("\nAllocation and initialize of file image buffers failed. Test aborted.\n"); + printf("\nAllocation and initialize of file image buffers failed. Test aborted.\n"); } MPI_Barrier(comm); if (mpi_rank == 0) { - HDprintf("\n\n --- TESTING MPIO VFD --- \n\n"); + printf("\n\n --- TESTING MPIO VFD --- \n\n"); } nerrs += @@ -4276,7 +4276,7 @@ main(int argc, char **argv) #ifdef H5_HAVE_SUBFILING_VFD if (mpi_rank == 0) { - HDprintf("\n\n --- TESTING SUBFILING VFD --- \n\n"); + printf("\n\n --- TESTING SUBFILING VFD --- \n\n"); } nerrs += vector_read_test_1(7, mpi_rank, mpi_size, H5FD_MPIO_INDEPENDENT, H5FD_MPIO_INDIVIDUAL_IO, @@ -4371,12 +4371,12 @@ finish: MPI_Barrier(comm); if (mpi_rank == 0) { /* only process 0 reports */ - HDprintf("===================================\n"); + printf("===================================\n"); if (nerrs > 0) - HDprintf("***vfd tests detected %d failures***\n", nerrs); + printf("***vfd tests detected %d failures***\n", nerrs); else - HDprintf("vfd tests finished with no failures\n"); - HDprintf("===================================\n"); + printf("vfd tests finished with no failures\n"); + printf("===================================\n"); } /* discard the file image buffers */ diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c index e7befd6..b35a758 100644 --- a/testpar/testphdf5.c +++ b/testpar/testphdf5.c @@ -76,11 +76,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); @@ -103,18 +102,18 @@ 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"); - HDprintf("\t-f <prefix>\tfilename prefix\n"); - HDprintf("\t-2\t\tuse Split-file together with MPIO\n"); - HDprintf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", ROW_FACTOR, - COL_FACTOR); - HDprintf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n"); - HDprintf("\n"); + printf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] " + "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n"); + printf("\t-m<n_datasets>" + "\tset number of datasets for the multiple dataset test\n"); + printf("\t-n<n_groups>" + "\tset number of groups for the multiple group test\n"); + printf("\t-f <prefix>\tfilename prefix\n"); + printf("\t-2\t\tuse Split-file together with MPIO\n"); + printf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n", ROW_FACTOR, + COL_FACTOR); + printf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n"); + printf("\n"); } /* @@ -196,7 +195,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); } @@ -205,12 +204,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); } @@ -218,7 +217,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); } @@ -231,13 +230,13 @@ parse_options(int argc, char **argv) for (i = 0; i < n; i++) if (h5_fixname(FILENAME[i], fapl, filenames[i], PATH_MAX) == NULL) { - HDprintf("h5_fixname failed\n"); + printf("h5_fixname failed\n"); nerrors++; return (1); } - 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]); } return (0); @@ -319,9 +318,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 @@ -330,15 +329,15 @@ 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(); - 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); } } @@ -402,7 +401,7 @@ main(int argc, char **argv) #ifndef H5_HAVE_WIN32_API 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 AddTest("fill", dataset_fillvalue, NULL, "dataset fill value", PARATESTFILE); @@ -412,9 +411,9 @@ main(int argc, char **argv) AddTest("cchunk4", coll_chunk4, NULL, "collective chunk io with partial non-selection ", PARATESTFILE); 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"); } AddTest((mpi_size < 3) ? "-cchunk5" : "cchunk5", coll_chunk5, NULL, "linked chunk collective IO without optimization", PARATESTFILE); @@ -450,8 +449,8 @@ main(int argc, char **argv) &io_mode_confusion_params); 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) { rr_obj_flush_confusion_params.name = PARATESTFILE; @@ -477,18 +476,18 @@ main(int argc, char **argv) AddTest("extlink", external_links, NULL, "test external links", NULL); 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"); } AddTest((mpi_size < 2) ? "-fiodc" : "fiodc", file_image_daisy_chain_test, NULL, "file image ops daisy chain", NULL); 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) { AddTest("atomicity", dataset_atomicity, NULL, "dataset atomic updates", PARATESTFILE); @@ -516,9 +515,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 */ @@ -546,16 +545,16 @@ 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 with no errors\n"); - HDprintf("===================================\n"); + printf("PHDF5 tests finished with no errors\n"); + printf("===================================\n"); } for (int i = 0; i < NFILENAME; i++) { - HDfree(filenames[i]); + free(filenames[i]); filenames[i] = NULL; } |