summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2000-11-28 16:35:06 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2000-11-28 16:35:06 (GMT)
commitf8d5c76ee70b6f644eaa67c4449065b4f5b68e47 (patch)
tree654e062a273e6e0420872304527cd8012bd42bd4 /testpar
parent51f5bbc54fae647682f4d6723c5c956053e6195a (diff)
downloadhdf5-f8d5c76ee70b6f644eaa67c4449065b4f5b68e47.zip
hdf5-f8d5c76ee70b6f644eaa67c4449065b4f5b68e47.tar.gz
hdf5-f8d5c76ee70b6f644eaa67c4449065b4f5b68e47.tar.bz2
[svn-r3009] Purpose:
New parallel test features Description: Added test cases: INDEPENDENT write with some processes do not participate at all. The library should not hang for this case. COLLECTIVE read/write with some processes asking for zero elements. The library should work properly and not hanging. Some house cleaning: get rid of a conditional directive that was fixed already. Platforms tested: IRIX64,-64,parallel
Diffstat (limited to 'testpar')
-rw-r--r--testpar/t_dset.c36
1 files changed, 27 insertions, 9 deletions
diff --git a/testpar/t_dset.c b/testpar/t_dset.c
index 32e14e2..2e79014 100644
--- a/testpar/t_dset.c
+++ b/testpar/t_dset.c
@@ -316,6 +316,25 @@ dataset_writeInd(char *filename)
H5P_DEFAULT, data_array1);
VRFY((ret >= 0), "H5Dwrite dataset2 succeeded");
+ /* setup dimensions again to write with zero rows for process 0 */
+ if (verbose)
+ printf("writeInd by some with zero row\n");
+ slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW);
+ ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
+ /* need to make mem_dataspace to match for process 0 */
+ if (MAINPROCESS){
+ ret=H5Sselect_hyperslab(mem_dataspace, H5S_SELECT_SET, start, stride, count, block);
+ VRFY((ret >= 0), "H5Sset_hyperslab mem_dataspace succeeded");
+ }
+ MESG("writeInd by some with zero row");
+if ((mpi_rank/2)*2 != mpi_rank){
+ ret = H5Dwrite(dataset1, H5T_NATIVE_INT, mem_dataspace, file_dataspace,
+ H5P_DEFAULT, data_array1);
+ VRFY((ret >= 0), "H5Dwrite dataset1 by ZROW succeeded");
+}
+MPI_Barrier(MPI_COMM_WORLD);
+
/* release dataspace ID */
H5Sclose(file_dataspace);
@@ -578,7 +597,8 @@ dataset_writeAll(char *filename)
VRFY((ret >= 0), "H5Dwrite dataset1 succeeded");
/* setup dimensions again to writeAll with zero rows for process 0 */
-printf("writeAll by some with zero row\n");
+ if (verbose)
+ printf("writeAll by some with zero row\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW);
ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -640,7 +660,8 @@ printf("writeAll by some with zero row\n");
VRFY((ret >= 0), "H5Dwrite dataset2 succeeded");
/* setup dimensions again to writeAll with zero columns for process 0 */
-printf("writeAll by some with zero col\n");
+ if (verbose)
+ printf("writeAll by some with zero col\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZCOL);
ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -794,7 +815,8 @@ dataset_readAll(char *filename)
if (ret) nerrors++;
/* setup dimensions again to readAll with zero columns for process 0 */
-printf("readAll by some with zero col\n");
+ if (verbose)
+ printf("readAll by some with zero col\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZCOL);
ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -856,7 +878,8 @@ printf("readAll by some with zero col\n");
if (ret) nerrors++;
/* setup dimensions again to readAll with zero rows for process 0 */
-printf("readAll by some with zero row\n");
+ if (verbose)
+ printf("readAll by some with zero row\n");
slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW);
ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0), "H5Sset_hyperslab succeeded");
@@ -1061,7 +1084,6 @@ extend_writeInd(char *filename)
mem_dataspace = H5Screate_simple (RANK, block, NULL);
VRFY((mem_dataspace >= 0), "");
-#ifndef DISABLE
/* Try write to dataset2 beyond its current dim sizes. Should fail. */
/* Temporary turn off auto error reporting */
H5Eget_auto(&old_func, &old_client_data);
@@ -1081,10 +1103,6 @@ extend_writeInd(char *filename)
/* restore auto error reporting */
H5Eset_auto(old_func, old_client_data);
H5Sclose(file_dataspace);
-#else
- /* Skip test because H5Dwrite is not failing as expected */
- printf("***Skip test of write-beyond-current-dim-size\n");
-#endif
/* Extend dataset2 and try again. Should succeed. */
dims[0] = dim0;