summaryrefslogtreecommitdiffstats
path: root/testpar/API/t_span_tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'testpar/API/t_span_tree.c')
-rw-r--r--testpar/API/t_span_tree.c329
1 files changed, 164 insertions, 165 deletions
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);