summaryrefslogtreecommitdiffstats
path: root/testpar/t_mpi.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>1999-07-03 00:27:36 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>1999-07-03 00:27:36 (GMT)
commit1b20703c2048cf176df2d5c792de56da92ae03e2 (patch)
tree16bd088a5b6c7673d7f089a95e92fe8bf6f03d02 /testpar/t_mpi.c
parent8ecbdd7050c038277de3e4644f1aed92163ba52c (diff)
downloadhdf5-1b20703c2048cf176df2d5c792de56da92ae03e2.zip
hdf5-1b20703c2048cf176df2d5c792de56da92ae03e2.tar.gz
hdf5-1b20703c2048cf176df2d5c792de56da92ae03e2.tar.bz2
[svn-r1417] t_mpi.c:
Changed it to skip the test instead of aborting when there is not enough processes to do the test. Also corrected an error in the error reporting printf statement. t_dset.c: testphdf5.c: testphdf5.h: Added option for specifying chunk dimensions.
Diffstat (limited to 'testpar/t_mpi.c')
-rw-r--r--testpar/t_mpi.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c
index 0d6d390..dbcfada 100644
--- a/testpar/t_mpi.c
+++ b/testpar/t_mpi.c
@@ -45,7 +45,12 @@ test_mpio_overlap_writes(char *filename[])
MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank);
/* Need at least 2 processes */
- VRFY((mpi_size >= 2), "Has at least 2 processes");
+ if (mpi_size < 2) {
+ if (MAINPROCESS)
+ printf("Need at least 2 processes to run MPIO test.\n");
+ printf(" -SKIP- \n");
+ return;
+ }
/* splits processes 0 to n-2 into one comm. and the last one into another */
color = ((mpi_rank < (mpi_size - 1)) ? 0 : 1);
@@ -112,9 +117,11 @@ test_mpio_overlap_writes(char *filename[])
&mpi_stat);
VRFY((mrc==MPI_SUCCESS), "");
for (i=0; i<stride; i++){
- if (buf[i] != ((mpi_off+i) & 0x7f))
- printf("proc %d: found data error at [%d], expect %d, got %d\n",
- mpi_rank, mpi_off+i, mpi_off & 0x7f, buf[0]);
+ char expected;
+ expected = (mpi_off+i) & 0x7f;
+ if (buf[i] != expected)
+ printf("proc %d: found data error at [%ld], expect %d, got %d\n",
+ mpi_rank, mpi_off+i, expected, buf[i]);
}
}