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