summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
Diffstat (limited to 'testpar')
-rw-r--r--testpar/t_2Gio.c4
-rw-r--r--testpar/t_bigio.c41
-rw-r--r--testpar/t_cache.c4
-rw-r--r--testpar/t_dset.c4
-rw-r--r--testpar/t_filters_parallel.c4
-rw-r--r--testpar/t_mpi.c4
-rw-r--r--testpar/t_pflush2.c2
-rw-r--r--testpar/t_pread.c52
8 files changed, 69 insertions, 46 deletions
diff --git a/testpar/t_2Gio.c b/testpar/t_2Gio.c
index 911be2c..4570fbc 100644
--- a/testpar/t_2Gio.c
+++ b/testpar/t_2Gio.c
@@ -3323,7 +3323,7 @@ none_selection_chunk(void)
* Simple independent I/O. This tests that the defaults are properly set.
*
* TEST_ACTUAL_IO_RESET:
- * Performs collective and then independent I/O with hthe same dxpl to
+ * Performs collective and then independent I/O with the same dxpl to
* make sure the peroperty is correctly reset to the default on each use.
* Specifically, this test runs TEST_ACTUAL_IO_MULTI_CHUNK_NO_OPT_MIX_DISAGREE
* (The most complex case that works on all builds) and then performs
@@ -3644,7 +3644,7 @@ test_actual_io_mode(int selection_mode)
/* Set the threshold number of processes per chunk to twice mpi_size.
* This will prevent the threshold from ever being met, thus forcing
* multi chunk io instead of link chunk io.
- * This is via deault.
+ * This is via default.
*/
if (multi_chunk_io) {
/* force multi-chunk-io by threshold */
diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c
index c21d233..0a971c5 100644
--- a/testpar/t_bigio.c
+++ b/testpar/t_bigio.c
@@ -1107,13 +1107,15 @@ single_rank_independent_io(void)
HDprintf("\nSingle Rank Independent I/O\n");
if (MAIN_PROCESS) {
- hsize_t dims[] = {LARGE_DIM};
- hid_t file_id = -1;
- hid_t fapl_id = -1;
- hid_t dset_id = -1;
- hid_t fspace_id = -1;
- hid_t mspace_id = -1;
- void * data = NULL;
+ hsize_t dims[] = {LARGE_DIM};
+ hid_t file_id = -1;
+ hid_t fapl_id = -1;
+ hid_t dset_id = -1;
+ hid_t fspace_id = -1;
+ hid_t mspace_id = -1;
+ herr_t ret;
+ int * data = NULL;
+ uint64_t i;
fapl_id = H5Pcreate(H5P_FILE_ACCESS);
VRFY_G((fapl_id >= 0), "H5P_FILE_ACCESS");
@@ -1135,6 +1137,10 @@ single_rank_independent_io(void)
data = malloc(LARGE_DIM * sizeof(int));
+ /* Initialize data */
+ for (i = 0; i < LARGE_DIM; i++)
+ data[i] = (int)(i % (uint64_t)DXFER_BIGCOUNT);
+
if (mpi_rank_g == 0)
H5Sselect_all(fspace_id);
else
@@ -1143,7 +1149,24 @@ single_rank_independent_io(void)
dims[0] = LARGE_DIM;
mspace_id = H5Screate_simple(1, dims, NULL);
VRFY_G((mspace_id >= 0), "H5Screate_simple mspace_id succeeded");
+
+ /* Write data */
H5Dwrite(dset_id, H5T_NATIVE_INT, mspace_id, fspace_id, H5P_DEFAULT, data);
+ VRFY_G((ret >= 0), "H5Dwrite succeeded");
+
+ /* Wipe buffer */
+ HDmemset(data, 0, LARGE_DIM * sizeof(int));
+
+ /* Read data back */
+ H5Dread(dset_id, H5T_NATIVE_INT, mspace_id, fspace_id, H5P_DEFAULT, data);
+ VRFY_G((ret >= 0), "H5Dread succeeded");
+
+ /* Verify data */
+ for (i = 0; i < LARGE_DIM; i++)
+ if (data[i] != (int)(i % (uint64_t)DXFER_BIGCOUNT)) {
+ HDfprintf(stderr, "verify failed\n");
+ exit(1);
+ }
free(data);
H5Sclose(mspace_id);
@@ -1861,7 +1884,7 @@ main(int argc, char **argv)
HDprintf("Failed to turn off atexit processing. Continue.\n");
/* set alarm. */
- ALARM_ON;
+ TestAlarmOn();
dataset_big_write();
MPI_Barrier(MPI_COMM_WORLD);
@@ -1878,7 +1901,7 @@ main(int argc, char **argv)
single_rank_independent_io();
/* turn off alarm */
- ALARM_OFF;
+ TestAlarmOff();
if (mpi_rank_g == 0)
HDremove(FILENAME[0]);
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 3ce5729..83c1dc3 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -6718,7 +6718,7 @@ smoke_check_6(int metadata_write_strategy)
if (FALSE != entry_ptr->header.coll_access) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Entry inserted indepedently marked as collective.\n",
+ HDfprintf(stdout, "%d:%s: Entry inserted independently marked as collective.\n",
world_mpi_rank, FUNC);
}
}
@@ -6774,7 +6774,7 @@ smoke_check_6(int metadata_write_strategy)
if (FALSE != entry_ptr->header.coll_access) {
nerrors++;
if (verbose) {
- HDfprintf(stdout, "%d:%s: Entry inserted indepedently marked as collective.\n",
+ HDfprintf(stdout, "%d:%s: Entry inserted independently marked as collective.\n",
world_mpi_rank, FUNC);
}
}
diff --git a/testpar/t_dset.c b/testpar/t_dset.c
index 8616bef..6b6be6f 100644
--- a/testpar/t_dset.c
+++ b/testpar/t_dset.c
@@ -2881,7 +2881,7 @@ none_selection_chunk(void)
* Simple independent I/O. This tests that the defaults are properly set.
*
* TEST_ACTUAL_IO_RESET:
- * Performs collective and then independent I/O with hthe same dxpl to
+ * Performs collective and then independent I/O with the same dxpl to
* make sure the peroperty is correctly reset to the default on each use.
* Specifically, this test runs TEST_ACTUAL_IO_MULTI_CHUNK_NO_OPT_MIX_DISAGREE
* (The most complex case that works on all builds) and then performs
@@ -3202,7 +3202,7 @@ test_actual_io_mode(int selection_mode)
/* Set the threshold number of processes per chunk to twice mpi_size.
* This will prevent the threshold from ever being met, thus forcing
* multi chunk io instead of link chunk io.
- * This is via deault.
+ * This is via default.
*/
if (multi_chunk_io) {
/* force multi-chunk-io by threshold */
diff --git a/testpar/t_filters_parallel.c b/testpar/t_filters_parallel.c
index bfb5897..731f493 100644
--- a/testpar/t_filters_parallel.c
+++ b/testpar/t_filters_parallel.c
@@ -8792,7 +8792,7 @@ main(int argc, char **argv)
if (VERBOSE_MED)
h5_show_hostname();
- ALARM_ON;
+ TestAlarmOn();
num_filters = ARRAY_SIZE(filterIDs);
@@ -8960,7 +8960,7 @@ exit:
if (MAINPROCESS)
HDprintf("*** %d TEST ERROR%s OCCURRED ***\n", nerrors, nerrors > 1 ? "S" : "");
- ALARM_OFF;
+ TestAlarmOff();
h5_clean_files(FILENAME, fapl_id);
fapl_id = H5I_INVALID_HID;
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c
index bb56f35..96cbc4b 100644
--- a/testpar/t_mpi.c
+++ b/testpar/t_mpi.c
@@ -1086,7 +1086,7 @@ main(int argc, char **argv)
H5Pset_fapl_mpio(fapl, MPI_COMM_WORLD, MPI_INFO_NULL);
/* set alarm. */
- ALARM_ON;
+ TestAlarmOn();
/*=======================================
* MPIO 1 write Many read test
@@ -1195,7 +1195,7 @@ finish:
}
/* turn off alarm */
- ALARM_OFF;
+ TestAlarmOff();
h5_clean_files(FILENAME, fapl);
H5close();
diff --git a/testpar/t_pflush2.c b/testpar/t_pflush2.c
index 032d914..f4e6602 100644
--- a/testpar/t_pflush2.c
+++ b/testpar/t_pflush2.c
@@ -167,7 +167,7 @@ main(int argc, char *argv[])
HDputs(" Test not compatible with current Virtual File Driver");
}
MPI_Finalize();
- HDexit(EXIT_FAILURE);
+ HDexit(EXIT_SUCCESS);
}
if ((fapl_id1 = H5Pcreate(H5P_FILE_ACCESS)) < 0)
diff --git a/testpar/t_pread.c b/testpar/t_pread.c
index 97f6d99..d79130b 100644
--- a/testpar/t_pread.c
+++ b/testpar/t_pread.c
@@ -35,7 +35,7 @@ const char *FILENAMES[NFILENAME + 1] = {"reloc_t_pread_data_file", "reloc_t_prea
#define LIMIT_NPROC 6
-hbool_t pass = true;
+hbool_t pass = TRUE;
static const char *random_hdf5_text = "Now is the time for all first-time-users of HDF5 to read their \
manual or go thru the tutorials!\n\
While you\'re at it, now is also the time to read up on MPI-IO.";
@@ -112,7 +112,7 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
float nextValue;
float * data_slice = NULL;
- pass = true;
+ pass = TRUE;
HDassert(comm != MPI_COMM_NULL);
@@ -256,14 +256,14 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
if (pass) {
if ((dset_id = H5Dcreate2(file_id, "dataset0", H5T_NATIVE_FLOAT, filespace, H5P_DEFAULT, H5P_DEFAULT,
H5P_DEFAULT)) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Dcreate2() failed.\n";
}
}
if (pass) {
if ((H5Dwrite(dset_id, H5T_NATIVE_FLOAT, memspace, filespace, dxpl_id, data_slice)) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Dwrite() failed.\n";
}
}
@@ -273,14 +273,14 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
if (pass) {
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Pcreate() failed.\n";
}
}
if (pass) {
if ((H5Pset_chunk(dcpl_id, 1, chunk)) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Pset_chunk() failed.\n";
}
}
@@ -289,27 +289,27 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
if ((dset_id_ch = H5Dcreate2(file_id, "dataset0_chunked", H5T_NATIVE_FLOAT, filespace, H5P_DEFAULT,
dcpl_id, H5P_DEFAULT)) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Dcreate2() failed.\n";
}
}
if (pass) {
if ((H5Dwrite(dset_id_ch, H5T_NATIVE_FLOAT, memspace, filespace, dxpl_id, data_slice)) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Dwrite() failed.\n";
}
}
if (pass || (dcpl_id != -1)) {
if (H5Pclose(dcpl_id) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Pclose(dcpl_id) failed.\n";
}
}
if (pass || (dset_id_ch != -1)) {
if (H5Dclose(dset_id_ch) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Dclose(dset_id_ch) failed.\n";
}
}
@@ -317,49 +317,49 @@ generate_test_file(MPI_Comm comm, int mpi_rank, int group_id)
/* close file, etc. */
if (pass || (dset_id != -1)) {
if (H5Dclose(dset_id) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Dclose(dset_id) failed.\n";
}
}
if (pass || (memspace != -1)) {
if (H5Sclose(memspace) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Sclose(memspace) failed.\n";
}
}
if (pass || (filespace != -1)) {
if (H5Sclose(filespace) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Sclose(filespace) failed.\n";
}
}
if (pass || (file_id != -1)) {
if (H5Fclose(file_id) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Fclose(file_id) failed.\n";
}
}
if (pass || (dxpl_id != -1)) {
if (H5Pclose(dxpl_id) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Pclose(dxpl_id) failed.\n";
}
}
if (pass || (fapl_id != -1)) {
if (H5Pclose(fapl_id) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Pclose(fapl_id) failed.\n";
}
}
if (pass || (fctmpl != -1)) {
if (H5Pclose(fctmpl) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Pclose(fctmpl) failed.\n";
}
}
@@ -661,14 +661,14 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
if (pass || (memspace != -1)) {
if (H5Sclose(memspace) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Sclose(memspace) failed.\n";
}
}
if (pass || (filespace != -1)) {
if (H5Sclose(filespace) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Sclose(filespace) failed.\n";
}
}
@@ -859,7 +859,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
if (pass || (filespace != -1)) {
if (H5Sclose(filespace) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Sclose(filespace) failed.\n";
}
}
@@ -956,7 +956,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
if (pass || (memspace != -1)) {
if (H5Sclose(memspace) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Sclose(memspace) failed.\n";
}
}
@@ -969,7 +969,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
if (pass || (dxpl_id != -1)) {
if (H5Pclose(dxpl_id) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Pclose(dxpl_id) failed.\n";
}
}
@@ -978,28 +978,28 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int mpi_size, int group_id)
/* close file, etc. */
if (pass || (dset_id != -1)) {
if (H5Dclose(dset_id) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Dclose(dset_id) failed.\n";
}
}
if (pass || (dset_id_ch != -1)) {
if (H5Dclose(dset_id_ch) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Dclose(dset_id_ch) failed.\n";
}
}
if (pass || (file_id != -1)) {
if (H5Fclose(file_id) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Fclose(file_id) failed.\n";
}
}
if (pass || (fapl_id != -1)) {
if (H5Pclose(fapl_id) < 0) {
- pass = false;
+ pass = FALSE;
failure_mssg = "H5Pclose(fapl_id) failed.\n";
}
}