summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorkmu <kmu@hdfgroup.org>2020-01-23 03:30:36 (GMT)
committerkmu <kmu@hdfgroup.org>2020-01-23 03:30:36 (GMT)
commit2de0ce0d8ba2fb58fadefc5d718a3c0fedab25c8 (patch)
tree795739e979593ab3b0d0d3b4a6124c1f7049ab50 /testpar
parent408b9b1f3b8e84ba090c51e665d38eedef32c7ee (diff)
parentd7414053638316081f11fad78474b2c3cde336c5 (diff)
downloadhdf5-2de0ce0d8ba2fb58fadefc5d718a3c0fedab25c8.zip
hdf5-2de0ce0d8ba2fb58fadefc5d718a3c0fedab25c8.tar.gz
hdf5-2de0ce0d8ba2fb58fadefc5d718a3c0fedab25c8.tar.bz2
merge and fix conflict
Diffstat (limited to 'testpar')
-rw-r--r--testpar/CMakeLists.txt4
-rw-r--r--testpar/t_2Gio.c4
-rw-r--r--testpar/t_bigio.c1
-rw-r--r--testpar/t_cache.c17
-rw-r--r--testpar/t_coll_chunk.c1
-rw-r--r--testpar/t_coll_md_read.c1
-rw-r--r--testpar/t_dset.c10
-rw-r--r--testpar/t_filter_read.c2
-rw-r--r--testpar/t_mdset.c11
-rw-r--r--testpar/t_mpi.c10
-rw-r--r--testpar/t_shapesame.c15
-rw-r--r--testpar/t_span_tree.c17
12 files changed, 40 insertions, 53 deletions
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index 9795c65..3e4957d 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -79,4 +79,6 @@ foreach (h5_testp ${H5P_TESTS})
ADD_H5P_EXE(${h5_testp})
endforeach ()
-include (CMakeTests.cmake)
+if (HDF5_TEST_PARALLEL)
+ include (CMakeTests.cmake)
+endif ()
diff --git a/testpar/t_2Gio.c b/testpar/t_2Gio.c
index d48dfca..a49fefe 100644
--- a/testpar/t_2Gio.c
+++ b/testpar/t_2Gio.c
@@ -552,7 +552,7 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[]
#define H5FILE_NAME "hugefile.h5"
#define DATASETNAME "dataset"
-int MpioTest2G( MPI_Comm comm )
+static int MpioTest2G( MPI_Comm comm )
{
/*
* HDF5 APIs definitions
@@ -3891,8 +3891,6 @@ actual_io_mode_tests(void) {
* Programmer: Jonathan Kim
* Date: Aug, 2012
*/
-#define DSET_NOCOLCAUSE "nocolcause"
-#define NELM 2
#define FILE_EXTERNAL "nocolcause_extern.data"
static void
test_no_collective_cause_mode(int selection_mode)
diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c
index 12c1023..b681a2a 100644
--- a/testpar/t_bigio.c
+++ b/testpar/t_bigio.c
@@ -27,7 +27,6 @@ const char *FILENAME[3]={ "bigio_test.h5",
#define DATASET2 "DSET2"
#define DATASET3 "DSET3"
#define DATASET4 "DSET4"
-#define DATASET5 "DSET5"
#define DXFER_COLLECTIVE_IO 0x1 /* Collective IO*/
#define DXFER_INDEPENDENT_IO 0x2 /* Independent IO collectively */
#define DXFER_BIGCOUNT (1 < 29)
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index ebb8e33..058cde6 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -28,7 +28,7 @@
#include "H5Fpkg.h"
#include "H5Iprivate.h"
#include "H5MFprivate.h"
-
+#include "H5private.h"
#define BASE_ADDR (haddr_t)1024
@@ -38,7 +38,6 @@ int failures = 0;
hbool_t verbose = TRUE; /* used to control error messages */
#define NFILENAME 2
-#define PARATESTFILE filenames[0]
const char *FILENAME[NFILENAME]={"CacheTestDummy", NULL};
#ifndef PATH_MAX
#define PATH_MAX 512
@@ -219,7 +218,9 @@ struct datum data[NUM_DATA_ENTRIES];
#define STD_VIRT_NUM_DATA_ENTRIES NUM_DATA_ENTRIES
#define EXPRESS_VIRT_NUM_DATA_ENTRIES (NUM_DATA_ENTRIES / 10)
/* Use a smaller test size to avoid creating huge MPE logfiles. */
+#ifdef H5_HAVE_MPE
#define MPE_VIRT_NUM_DATA_ENTIES (NUM_DATA_ENTRIES / 100)
+#endif
int virt_num_data_entries = NUM_DATA_ENTRIES;
@@ -2378,7 +2379,7 @@ datum_get_initial_load_size(void *udata_ptr, size_t *image_len_ptr)
*-------------------------------------------------------------------------
*/
static void *
-datum_deserialize(const void * image_ptr,
+datum_deserialize(const void H5_ATTR_NDEBUG_UNUSED *image_ptr,
H5_ATTR_UNUSED size_t len,
void * udata_ptr,
hbool_t * dirty_ptr)
@@ -2491,14 +2492,13 @@ datum_image_len(const void *thing, size_t *image_len)
*/
static herr_t
datum_serialize(const H5F_t *f,
- void *image_ptr,
+ void H5_ATTR_NDEBUG_UNUSED *image_ptr,
size_t len,
void *thing_ptr)
{
herr_t ret_value = SUCCEED;
int idx;
struct datum * entry_ptr;
- H5C_t * cache_ptr;
struct H5AC_aux_t * aux_ptr;
HDassert( thing_ptr );
@@ -2509,11 +2509,8 @@ datum_serialize(const H5F_t *f,
HDassert( f );
HDassert( f->shared );
HDassert( f->shared->cache );
-
- cache_ptr = f->shared->cache;
-
- HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC );
- HDassert( cache_ptr->aux_ptr );
+ HDassert( f->shared->cache->magic == H5C__H5C_T_MAGIC );
+ HDassert( f->shared->cache->aux_ptr );
aux_ptr = (H5AC_aux_t *)(f->shared->cache->aux_ptr);
diff --git a/testpar/t_coll_chunk.c b/testpar/t_coll_chunk.c
index 40cc1ca..2d758ba 100644
--- a/testpar/t_coll_chunk.c
+++ b/testpar/t_coll_chunk.c
@@ -620,7 +620,6 @@ coll_chunktest(const char* filename,
size_t num_points; /* for point selection */
hsize_t *coords = NULL; /* for point selection */
hsize_t current_dims; /* for point selection */
- int i;
/* set up MPI parameters */
MPI_Comm_size(comm,&mpi_size);
diff --git a/testpar/t_coll_md_read.c b/testpar/t_coll_md_read.c
index 912388c..c0fe04b 100644
--- a/testpar/t_coll_md_read.c
+++ b/testpar/t_coll_md_read.c
@@ -34,7 +34,6 @@
#define MULTI_CHUNK_IO_ADDRMAP_ISSUE_DIMS 2
-#define LINK_CHUNK_IO_SORT_CHUNK_ISSUE_NO_SEL_PROCESS (mpi_rank == mpi_size - 1)
#define LINK_CHUNK_IO_SORT_CHUNK_ISSUE_DATASET_NAME "linked_chunk_io_sort_chunk_issue"
#define LINK_CHUNK_IO_SORT_CHUNK_ISSUE_Y_DIM_SCALE 20000
#define LINK_CHUNK_IO_SORT_CHUNK_ISSUE_CHUNK_SIZE 1
diff --git a/testpar/t_dset.c b/testpar/t_dset.c
index 6c91a41..87782d0 100644
--- a/testpar/t_dset.c
+++ b/testpar/t_dset.c
@@ -567,7 +567,6 @@ dataset_writeAll(void)
size_t num_points; /* for point selection */
hsize_t *coords = NULL; /* for point selection */
hsize_t current_dims; /* for point selection */
- int i;
herr_t ret; /* Generic return value */
int mpi_size, mpi_rank;
@@ -1098,7 +1097,6 @@ dataset_readAll(void)
size_t num_points; /* for point selection */
hsize_t *coords = NULL; /* for point selection */
- hsize_t current_dims; /* for point selection */
int i,j,k;
herr_t ret; /* Generic return value */
@@ -3470,8 +3468,9 @@ actual_io_mode_tests(void) {
* Programmer: Jonathan Kim
* Date: Aug, 2012
*/
+#ifdef LATER
#define DSET_NOCOLCAUSE "nocolcause"
-#define NELM 2
+#endif
#define FILE_EXTERNAL "nocolcause_extern.data"
static void
test_no_collective_cause_mode(int selection_mode)
@@ -3482,7 +3481,6 @@ test_no_collective_cause_mode(int selection_mode)
uint32_t no_collective_cause_global_write = 0;
uint32_t no_collective_cause_global_read = 0;
uint32_t no_collective_cause_global_expected = 0;
- hsize_t coord[NELM][RANK];
const char * filename;
const char * test_name;
@@ -3797,6 +3795,7 @@ test_no_collective_cause_mode(int selection_mode)
* Programmer: Jonathan Kim
* Date: Aug, 2012
*/
+#ifdef LATER
static void
test_no_collective_cause_mode_filter(int selection_mode)
{
@@ -3806,7 +3805,7 @@ test_no_collective_cause_mode_filter(int selection_mode)
uint32_t no_collective_cause_global_expected = 0;
const char * filename;
- const char * test_name;
+ const char * test_name = "I/O";
hbool_t is_chunked=1;
int mpi_size = -1;
int mpi_rank = -1;
@@ -4008,6 +4007,7 @@ test_no_collective_cause_mode_filter(int selection_mode)
HDfree(buffer);
return;
}
+#endif
/* Function: no_collective_cause_tests
*
diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c
index 28baed5..cabb51e 100644
--- a/testpar/t_filter_read.c
+++ b/testpar/t_filter_read.c
@@ -215,7 +215,9 @@ test_filter_read(void)
unsigned disable_partial_chunk_filters; /* Whether filters are disabled on partial chunks */
herr_t hrc;
const char *filename;
+#ifdef H5_HAVE_FILTER_FLETCHER32
hsize_t fletcher32_size; /* Size of dataset with Fletcher32 checksum */
+#endif
#ifdef H5_HAVE_FILTER_DEFLATE
hsize_t deflate_size; /* Size of dataset with deflate filter */
diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c
index 63ac8d3..ee868ee 100644
--- a/testpar/t_mdset.c
+++ b/testpar/t_mdset.c
@@ -13,6 +13,7 @@
#include "testphdf5.h"
#include "H5Dprivate.h"
+#include "H5private.h"
#define DIM 2
#define SIZE 32
@@ -332,7 +333,7 @@ void compact_dataset(void)
/* Verify data value */
for(i = 0; i < size; i++)
for(j = 0; j < size; j++)
- if(inme[(i * size) + j] != outme[(i * 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]);
@@ -1959,7 +1960,7 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm)
/* private communicator size and rank */
int mpi_size;
int mpi_rank;
- int mrc; /* mpi error code */
+ int mrc; /* mpi error code */
/* steps to verify and have been verified */
int steps = 0;
int steps_done = 0;
@@ -2477,7 +2478,7 @@ void rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
/* compare read data with expected data */
for ( j = 0; j < LOCAL_DATA_SIZE; j++ )
- if (data_read[j] != data[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",
@@ -2540,7 +2541,7 @@ void rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
VRFY((err >= 0), "H5Aread failed.\n");
/* compare read attribute data with expected data */
for ( j = 0; j < LOCAL_DATA_SIZE; j++ )
- if (att_read[j] != att[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]);
@@ -2592,7 +2593,7 @@ void rr_obj_hdr_flush_confusion_reader(MPI_Comm comm)
VRFY((err >= 0), "H5Aread failed.\n");
/* compare read attribute data with expected data */
for ( j = 0; j < LARGE_ATTR_SIZE; j++ )
- if (lg_att_read[j] != lg_att[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]);
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c
index 890a918..fe78317 100644
--- a/testpar/t_mpi.c
+++ b/testpar/t_mpi.c
@@ -303,7 +303,7 @@ static int test_mpio_gb_file(char *filename) {
mpi_rank, mpi_off, mpi_off);
/* set data to some trivial pattern for easy verification */
for (j = 0; j < MB; j++)
- *(buf + j) = i * mpi_size + mpi_rank;
+ *(buf + j) = (int8_t)(i * mpi_size + mpi_rank);
if (VERBOSE_MED)
HDfprintf(stdout,
"proc %d: writing %d bytes at offset %lld\n",
@@ -351,7 +351,7 @@ static int test_mpio_gb_file(char *filename) {
mrc = MPI_File_read_at(fh, mpi_off, buf, MB, MPI_BYTE,
&mpi_stat);
INFO((mrc == MPI_SUCCESS), "GB size file read");
- expected = i * mpi_size + (mpi_size - mpi_rank - 1);
+ expected = (int8_t)(i * mpi_size + (mpi_size - mpi_rank - 1));
vrfyerrs = 0;
for (j = 0; j < MB; j++) {
if ((*(buf + j) != expected)
@@ -526,7 +526,7 @@ static int test_mpio_1wMr(char *filename, int special_request) {
* ==================================================*/
irank = 0;
for (i = 0; i < DIMSIZE; i++)
- writedata[i] = irank * DIMSIZE + i;
+ H5_CHECKED_ASSIGN(writedata[i], uint8_t, irank * DIMSIZE + i, int)
mpi_off = irank * DIMSIZE;
/* Only one process writes */
@@ -597,7 +597,7 @@ static int test_mpio_1wMr(char *filename, int special_request) {
return 1;
};
for (i = 0; i < DIMSIZE; i++) {
- expect_val = irank * DIMSIZE + i;
+ H5_CHECKED_ASSIGN(expect_val, uint8_t, irank * DIMSIZE + i, int);
if (readdata[i] != expect_val) {
PRINTID;
HDprintf("read data[%d:%d] got %02x, expect %02x\n", irank, i,
@@ -697,7 +697,7 @@ static int test_mpio_derived_dtype(char *filename) {
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
retcode = 0;
for (i = 0; i < 3; i++)
- buf[i] = i + 1;
+ H5_CHECKED_ASSIGN(buf[i], int8_t, i + 1, int);
if ((mpi_err = MPI_File_open(MPI_COMM_WORLD, filename,
MPI_MODE_RDWR | MPI_MODE_CREATE, MPI_INFO_NULL, &fh))
diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c
index abbfbb3..c12cf5a 100644
--- a/testpar/t_shapesame.c
+++ b/testpar/t_shapesame.c
@@ -1981,7 +1981,6 @@ contig_hs_dr_pio_test__run_test(const int test_num,
#if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG
const char *fcnName = "contig_hs_dr_pio_test__run_test()";
#endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
- int mpi_rank;
struct hs_dr_pio_test_vars_t test_vars =
{
/* int mpi_size = */ -1,
@@ -2049,9 +2048,6 @@ contig_hs_dr_pio_test__run_test(const int test_num,
small_rank, large_rank, use_collective_io,
dset_type, express_test, tv_ptr);
- /* initialize the local copy of mpi_rank */
- mpi_rank = tv_ptr->mpi_rank;
-
/* initialize skips & max_skips */
tv_ptr->skips = *skips_ptr;
tv_ptr->max_skips = max_skips;
@@ -3520,7 +3516,6 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr)
const char *fcnName = "ckrbrd_hs_dr_pio_test__m2d_l2s()";
#endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG */
hbool_t data_ok = FALSE;
- hbool_t mis_match = FALSE;
int i, j, k, l;
size_t u;
size_t start_index;
@@ -3768,8 +3763,6 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr)
/* verify that expected data is retrieved */
- mis_match = FALSE;
-
expected_value = (uint32_t)(
(i * tv_ptr->edge_size * tv_ptr->edge_size *
tv_ptr->edge_size * tv_ptr->edge_size) +
@@ -3878,7 +3871,6 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr)
const char *fcnName = "ckrbrd_hs_dr_pio_test__m2d_s2l()";
#endif /* CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG */
hbool_t data_ok = FALSE;
- hbool_t mis_match = FALSE;
int i, j, k, l;
size_t u;
size_t start_index;
@@ -4138,8 +4130,6 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr)
HDassert( stop_index < tv_ptr->large_ds_size );
- mis_match = FALSE;
-
data_ok = TRUE;
ptr_1 = tv_ptr->large_ds_buf_1;
@@ -4235,7 +4225,6 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num,
#if CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG
const char *fcnName = "ckrbrd_hs_dr_pio_test__run_test()";
#endif /* CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG */
- int mpi_rank; /* needed by VRFY */
struct hs_dr_pio_test_vars_t test_vars =
{
/* int mpi_size = */ -1,
@@ -4305,10 +4294,6 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num,
tv_ptr);
- /* initialize the local copy of mpi_rank */
- mpi_rank = tv_ptr->mpi_rank;
-
-
/* initialize skips & max_skips */
tv_ptr->skips = *skips_ptr;
tv_ptr->max_skips = max_skips;
diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c
index 9a4ac4d..c3cc7b5 100644
--- a/testpar/t_span_tree.c
+++ b/testpar/t_span_tree.c
@@ -37,7 +37,7 @@
static void coll_write_test(int chunk_factor);
-static void coll_read_test(int chunk_factor);
+static void coll_read_test(void);
/*-------------------------------------------------------------------------
@@ -84,7 +84,7 @@ void
coll_irregular_cont_read(void)
{
- coll_read_test(0);
+ coll_read_test();
}
@@ -133,7 +133,7 @@ void
coll_irregular_simple_chunk_read(void)
{
- coll_read_test(1);
+ coll_read_test();
}
@@ -181,7 +181,7 @@ void
coll_irregular_complex_chunk_read(void)
{
- coll_read_test(4);
+ coll_read_test();
}
@@ -662,7 +662,7 @@ void coll_write_test(int chunk_factor)
*-------------------------------------------------------------------------
*/
static void
-coll_read_test(int chunk_factor)
+coll_read_test(void)
{
const char *filename;
@@ -923,7 +923,9 @@ coll_read_test(int chunk_factor)
****************************************************************/
#define LDSCT_DS_RANK 5
+#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
#define LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK 0
+#endif
#define LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG 0
@@ -1558,7 +1560,9 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size,
size_t small_ds_size;
size_t small_ds_slice_size;
size_t large_ds_size;
+#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
size_t large_ds_slice_size;
+#endif
uint32_t expected_value;
uint32_t * small_ds_buf_0 = NULL;
uint32_t * small_ds_buf_1 = NULL;
@@ -1612,9 +1616,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size,
small_ds_size = (size_t)((mpi_size + 1) * 1 * 1 * 10 * 10);
small_ds_slice_size = (size_t) ( 1 * 1 * 10 * 10);
large_ds_size = (size_t)((mpi_size + 1) * 10 * 10 * 10 * 10);
- large_ds_slice_size = (size_t) (10 * 10 * 10 * 10);
#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG
+ 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,