summaryrefslogtreecommitdiffstats
path: root/testpar/testphdf5.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2014-01-06 17:56:45 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2014-01-06 17:56:45 (GMT)
commit6ceb9711b8f891229cf4206417a824ffb7850c3d (patch)
tree7b837f45ff5605abd1a51d918b98790dfa8488ca /testpar/testphdf5.c
parent1febc8a4531e221c468c55a1f367b110d15094b9 (diff)
downloadhdf5-6ceb9711b8f891229cf4206417a824ffb7850c3d.zip
hdf5-6ceb9711b8f891229cf4206417a824ffb7850c3d.tar.gz
hdf5-6ceb9711b8f891229cf4206417a824ffb7850c3d.tar.bz2
[svn-r24612] fix bugs in parallel tests exposed in corner cases when running with 1
or 2 processes. First bug is in testpar/t_mdset.c, where the test reports an error in addition to skipping the test if there are less than three procs. Fix to just skip the test. Second bug is in testpar/t_dset.c in actual_io_mode tests, where incorrect expected value for IO mode was set if the number of procs running the test is 1. tested with h5committest.
Diffstat (limited to 'testpar/testphdf5.c')
-rw-r--r--testpar/testphdf5.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index 89230f1..3419977 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -342,7 +342,7 @@ int main(int argc, char **argv)
* calls. By then, MPI calls may not work.
*/
if (H5dont_atexit() < 0){
- printf("Failed to turn off atexit processing. Continue.\n", mpi_rank);
+ printf("Failed to turn off atexit processing. Continue.\n");
};
H5open();
h5_show_hostname();
@@ -486,11 +486,17 @@ int main(int argc, char **argv)
"I/O mode confusion test -- hangs quickly on failure",
&io_mode_confusion_params);
- rr_obj_flush_confusion_params.name = PARATESTFILE;
- rr_obj_flush_confusion_params.count = 0; /* value not used */
- AddTest("rrobjflushconf", rr_obj_hdr_flush_confusion, NULL,
- "round robin object header flush confusion test",
- &rr_obj_flush_confusion_params);
+ if((mpi_size < 3) && MAINPROCESS) {
+ printf("rr_obj_hdr_flush_confusion test needs at least 3 processes.\n");
+ printf("rr_obj_hdr_flush_confusion test will be skipped \n");
+ }
+ if(mpi_size > 2) {
+ rr_obj_flush_confusion_params.name = PARATESTFILE;
+ rr_obj_flush_confusion_params.count = 0; /* value not used */
+ AddTest("rrobjflushconf", rr_obj_hdr_flush_confusion, NULL,
+ "round robin object header flush confusion test",
+ &rr_obj_flush_confusion_params);
+ }
AddTest("tldsc",
lower_dim_size_comp_test, NULL,