summaryrefslogtreecommitdiffstats
path: root/testpar/t_dset.c
diff options
context:
space:
mode:
Diffstat (limited to 'testpar/t_dset.c')
-rw-r--r--testpar/t_dset.c94
1 files changed, 45 insertions, 49 deletions
diff --git a/testpar/t_dset.c b/testpar/t_dset.c
index d9139d3..22eefbc 100644
--- a/testpar/t_dset.c
+++ b/testpar/t_dset.c
@@ -3107,12 +3107,12 @@ actual_io_mode_tests(void) {
static void
test_no_collective_cause_mode(int selection_mode)
{
- int no_collective_cause_local_write = 0;
- int no_collective_cause_local_read = 0;
- int no_collective_cause_local_expected = 0;
- int no_collective_cause_global_write = 0;
- int no_collective_cause_global_read = 0;
- int no_collective_cause_global_expected = 0;
+ uint32_t no_collective_cause_local_write = 0;
+ uint32_t no_collective_cause_local_read = 0;
+ uint32_t no_collective_cause_local_expected = 0;
+ 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;
@@ -3145,6 +3145,18 @@ test_no_collective_cause_mode(int selection_mode)
#endif
/* set to global value as default */
int l_facc_type = facc_type;
+ char message[256];
+
+ /* Set up MPI parameters */
+ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+
+ MPI_Barrier(MPI_COMM_WORLD);
+
+ HDassert(mpi_size >= 1);
+
+ mpi_comm = MPI_COMM_WORLD;
+ mpi_info = MPI_INFO_NULL;
/* Create the dataset creation plist */
dcpl = H5Pcreate(H5P_DATASET_CREATE);
@@ -3193,15 +3205,6 @@ test_no_collective_cause_mode(int selection_mode)
VRFY((sid >= 0), "H5Screate_simple succeeded");
}
- /* Set up MPI parameters */
- MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
- MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
-
-
- HDassert(mpi_size >= 1);
-
- mpi_comm = MPI_COMM_WORLD;
- mpi_info = MPI_INFO_NULL;
filename = (const char *)GetTestParameters();
HDassert(filename != NULL);
@@ -3399,17 +3402,12 @@ test_no_collective_cause_mode(int selection_mode)
"reading and writing are the same for global cause of Broken Collective I/O");
/* Test values */
- if(no_collective_cause_local_expected != (unsigned) -1 && no_collective_cause_global_expected != (unsigned) -1) {
- char message[100];
- sprintf(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);
- sprintf(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);
- } else {
- HDfprintf(stderr, "%s %d -> (%d,%d)\n", test_name, mpi_rank,
- test_no_collective_cause_mode, no_collective_cause_local_write);
- }
-
+ memset (message, 0, sizeof (message));
+ sprintf(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);
+ memset (message, 0, sizeof (message));
+ sprintf(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);
/* Release some resources */
if (sid)
@@ -3463,10 +3461,10 @@ test_no_collective_cause_mode(int selection_mode)
static void
test_no_collective_cause_mode_filter(int selection_mode)
{
- int no_collective_cause_local_read = 0;
- int no_collective_cause_local_expected = 0;
- int no_collective_cause_global_read = 0;
- int no_collective_cause_global_expected = 0;
+ uint32_t no_collective_cause_local_read = 0;
+ uint32_t no_collective_cause_local_expected = 0;
+ uint32_t no_collective_cause_global_read = 0;
+ uint32_t no_collective_cause_global_expected = 0;
const char * filename;
const char * test_name;
@@ -3495,7 +3493,18 @@ test_no_collective_cause_mode_filter(int selection_mode)
#ifdef H5_HAVE_FILTER_FLETCHER32
H5Z_filter_t filter_info;
#endif
+ char message[256];
+
+ /* Set up MPI parameters */
+ MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+
+ MPI_Barrier(MPI_COMM_WORLD);
+
+ HDassert(mpi_size >= 1);
+ mpi_comm = MPI_COMM_WORLD;
+ mpi_info = MPI_INFO_NULL;
/* Create the dataset creation plist */
dcpl = H5Pcreate(H5P_DATASET_CREATE);
@@ -3523,15 +3532,6 @@ test_no_collective_cause_mode_filter(int selection_mode)
sid = H5Screate_simple (RANK, dims, NULL);
VRFY((sid >= 0), "H5Screate_simple succeeded");
- /* Set up MPI parameters */
- MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
- MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
-
-
- HDassert(mpi_size >= 1);
-
- mpi_comm = MPI_COMM_WORLD;
- mpi_info = MPI_INFO_NULL;
filename = (const char *)GetTestParameters();
HDassert(filename != NULL);
@@ -3651,16 +3651,12 @@ test_no_collective_cause_mode_filter(int selection_mode)
VRFY((ret >= 0), "retriving no collective cause succeeded" );
/* Test values */
- if(no_collective_cause_local_expected != (unsigned) -1 && no_collective_cause_global_expected != (unsigned) -1) {
- char message[100];
- sprintf(message, "Local cause of Broken Collective I/O has the correct value for %s.\n",test_name);
- VRFY((no_collective_cause_local_read == no_collective_cause_local_expected), message);
- sprintf(message, "Global cause of Broken Collective I/O has the correct value for %s.\n",test_name);
- VRFY((no_collective_cause_global_read == no_collective_cause_global_expected), message);
- } else {
- HDfprintf(stderr, "%s %d -> (%d,%d)\n", test_name, mpi_rank,
- test_no_collective_cause_mode_filter, no_collective_cause_local_read);
- }
+ memset (message, 0, sizeof (message));
+ sprintf(message, "Local cause of Broken Collective I/O has the correct value for %s.\n",test_name);
+ VRFY((no_collective_cause_local_read == (uint32_t)no_collective_cause_local_expected), message);
+ memset (message, 0, sizeof (message));
+ sprintf(message, "Global cause of Broken Collective I/O has the correct value for %s.\n",test_name);
+ VRFY((no_collective_cause_global_read == (uint32_t)no_collective_cause_global_expected), message);
/* Release some resources */
if (sid)