mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
Remove HD from HDmem* calls (#3211)
This commit is contained in:
@@ -787,7 +787,7 @@ dataset_big_read(void)
|
||||
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);
|
||||
@@ -867,7 +867,7 @@ dataset_big_read(void)
|
||||
|
||||
if (mpi_rank_g == 0)
|
||||
printf("\nRead Testing Dataset2 by ROW\n");
|
||||
HDmemset(rdata, 0, bigcount * sizeof(B_DATATYPE));
|
||||
memset(rdata, 0, bigcount * sizeof(B_DATATYPE));
|
||||
dataset = H5Dopen2(fid, DATASET2, H5P_DEFAULT);
|
||||
VRFY_G((dataset >= 0), "H5Dopen2 succeeded");
|
||||
|
||||
@@ -930,7 +930,7 @@ dataset_big_read(void)
|
||||
|
||||
if (mpi_rank_g == 0)
|
||||
printf("\nRead Testing Dataset3 read select ALL proc 0, NONE others\n");
|
||||
HDmemset(rdata, 0, bigcount * sizeof(B_DATATYPE));
|
||||
memset(rdata, 0, bigcount * sizeof(B_DATATYPE));
|
||||
dataset = H5Dopen2(fid, DATASET3, H5P_DEFAULT);
|
||||
VRFY_G((dataset >= 0), "H5Dopen2 succeeded");
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
@@ -238,7 +238,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];
|
||||
@@ -372,7 +372,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];
|
||||
|
||||
|
||||
@@ -205,9 +205,9 @@ 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");
|
||||
}
|
||||
|
||||
|
||||
@@ -3821,11 +3821,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);
|
||||
|
||||
@@ -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), "");
|
||||
|
||||
|
||||
@@ -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);
|
||||
@@ -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);
|
||||
|
||||
+15
-15
@@ -236,18 +236,18 @@ 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(); */
|
||||
assert(filename != NULL);
|
||||
@@ -738,7 +738,7 @@ 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
|
||||
fprintf(stdout, "%s reading slices from big cube on disk into small cube slice.\n", fcnName);
|
||||
@@ -951,7 +951,7 @@ contig_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
|
||||
#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.
|
||||
@@ -1220,7 +1220,7 @@ 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
|
||||
fprintf(stdout, "%s writing slices from big ds to slices of small ds on disk.\n", fcnName);
|
||||
@@ -1493,7 +1493,7 @@ 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
|
||||
fprintf(stdout, "%s writing process slices of small ds to slices of large ds on disk.\n", fcnName);
|
||||
@@ -2578,7 +2578,7 @@ 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
|
||||
fprintf(stdout, "%s:%d: initial small_ds_slice_buf = ", fcnName, tv_ptr->mpi_rank);
|
||||
@@ -2810,7 +2810,7 @@ ckrbrd_hs_dr_pio_test__d2m_s2l(struct hs_dr_pio_test_vars_t *tv_ptr)
|
||||
#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
|
||||
@@ -3134,7 +3134,7 @@ 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
|
||||
fprintf(stdout,
|
||||
@@ -3431,7 +3431,7 @@ 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
|
||||
fprintf(stdout,
|
||||
@@ -4334,7 +4334,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
#if 0
|
||||
HDmemset(filenames, 0, sizeof(filenames));
|
||||
memset(filenames, 0, sizeof(filenames));
|
||||
for (int i = 0; i < NFILENAME; i++) {
|
||||
if (NULL == (filenames[i] = malloc(PATH_MAX))) {
|
||||
printf("couldn't allocate filename array\n");
|
||||
|
||||
@@ -320,7 +320,7 @@ coll_write_test(int chunk_factor)
|
||||
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;
|
||||
@@ -643,8 +643,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.
|
||||
*/
|
||||
@@ -881,8 +881,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.
|
||||
|
||||
@@ -351,7 +351,7 @@ main(int argc, char **argv)
|
||||
/* 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] = malloc(PATH_MAX))) {
|
||||
printf("couldn't allocate filename array\n");
|
||||
|
||||
Reference in New Issue
Block a user