summaryrefslogtreecommitdiffstats
path: root/testpar/t_2Gio.c
diff options
context:
space:
mode:
Diffstat (limited to 'testpar/t_2Gio.c')
-rw-r--r--testpar/t_2Gio.c77
1 files changed, 64 insertions, 13 deletions
diff --git a/testpar/t_2Gio.c b/testpar/t_2Gio.c
index d62fb55..8b67dd9 100644
--- a/testpar/t_2Gio.c
+++ b/testpar/t_2Gio.c
@@ -3868,6 +3868,10 @@ test_no_collective_cause_mode(int selection_mode)
uint32_t no_collective_cause_global_expected = 0;
// hsize_t coord[NELM][MAX_RANK];
+ uint32_t no_selection_io_cause_write = 0;
+ uint32_t no_selection_io_cause_read = 0;
+ uint32_t no_selection_io_cause_expected = 0;
+
const char *filename;
const char *test_name;
hbool_t is_chunked = 1;
@@ -3968,27 +3972,50 @@ test_no_collective_cause_mode(int selection_mode)
dataset = H5Dcreate2(fid, "nocolcause", data_type, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
VRFY((dataset >= 0), "H5Dcreate2() dataset succeeded");
+ /* Set up the dxpl for the write */
+ dxpl_write = H5Pcreate(H5P_DATASET_XFER);
+ VRFY((dxpl_write >= 0), "H5Pcreate(H5P_DATASET_XFER) succeeded");
+
/*
* Set expected causes and some tweaks based on the type of test
*/
if (selection_mode & TEST_DATATYPE_CONVERSION) {
test_name = "Broken Collective I/O - Datatype Conversion";
- no_collective_cause_local_expected |= H5D_MPIO_DATATYPE_CONVERSION;
- no_collective_cause_global_expected |= H5D_MPIO_DATATYPE_CONVERSION;
+
/* set different sign to trigger type conversion */
data_type = H5T_NATIVE_UINT;
+
+ /* Disable selection I/O since datatype conversion is supported in collective with selection I/O */
+ ret = H5Pset_selection_io(dxpl_write, H5D_SELECTION_IO_MODE_OFF);
+ VRFY((ret >= 0), "H5Pset_selection_io succeeded");
+
+ no_collective_cause_local_expected |= H5D_MPIO_DATATYPE_CONVERSION | H5D_MPIO_NO_SELECTION_IO;
+ no_collective_cause_global_expected |= H5D_MPIO_DATATYPE_CONVERSION | H5D_MPIO_NO_SELECTION_IO;
+ no_selection_io_cause_expected |= H5D_SEL_IO_DISABLE_BY_API;
}
if (selection_mode & TEST_DATA_TRANSFORMS) {
test_name = "Broken Collective I/O - DATA Transforms";
- no_collective_cause_local_expected |= H5D_MPIO_DATA_TRANSFORMS;
- no_collective_cause_global_expected |= H5D_MPIO_DATA_TRANSFORMS;
+
+ /* Set transform */
+ ret = H5Pset_data_transform(dxpl_write, "x+1");
+ VRFY((ret >= 0), "H5Pset_data_transform succeeded");
+
+ /* Disable selection I/O since data transforms are supported in collective with selection I/O */
+ ret = H5Pset_selection_io(dxpl_write, H5D_SELECTION_IO_MODE_OFF);
+ VRFY((ret >= 0), "H5Pset_selection_io succeeded");
+
+ no_collective_cause_local_expected |= H5D_MPIO_DATA_TRANSFORMS | H5D_MPIO_NO_SELECTION_IO;
+ no_collective_cause_global_expected |= H5D_MPIO_DATA_TRANSFORMS | H5D_MPIO_NO_SELECTION_IO;
+ no_selection_io_cause_expected |= H5D_SEL_IO_DISABLE_BY_API;
}
if (selection_mode & TEST_NOT_SIMPLE_OR_SCALAR_DATASPACES) {
test_name = "Broken Collective I/O - No Simple or Scalar DataSpace";
no_collective_cause_local_expected |= H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES;
no_collective_cause_global_expected |= H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES;
+ no_collective_cause_local_expected &= ~(unsigned)H5D_MPIO_NO_SELECTION_IO;
+ no_collective_cause_global_expected &= ~(unsigned)H5D_MPIO_NO_SELECTION_IO;
}
if (selection_mode & TEST_NOT_CONTIGUOUS_OR_CHUNKED_DATASET_COMPACT ||
@@ -3996,6 +4023,8 @@ test_no_collective_cause_mode(int selection_mode)
test_name = "Broken Collective I/O - No CONTI or CHUNKED Dataset";
no_collective_cause_local_expected |= H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET;
no_collective_cause_global_expected |= H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET;
+ no_collective_cause_local_expected &= ~(unsigned)H5D_MPIO_NO_SELECTION_IO;
+ no_collective_cause_global_expected &= ~(unsigned)H5D_MPIO_NO_SELECTION_IO;
}
if (selection_mode & TEST_COLLECTIVE) {
@@ -4008,6 +4037,8 @@ test_no_collective_cause_mode(int selection_mode)
test_name = "Broken Collective I/O - Independent";
no_collective_cause_local_expected = H5D_MPIO_SET_INDEPENDENT;
no_collective_cause_global_expected = H5D_MPIO_SET_INDEPENDENT;
+ no_collective_cause_local_expected &= ~(unsigned)H5D_MPIO_NO_SELECTION_IO;
+ no_collective_cause_global_expected &= ~(unsigned)H5D_MPIO_NO_SELECTION_IO;
/* switch to independent io */
is_independent = 1;
}
@@ -4037,10 +4068,6 @@ test_no_collective_cause_mode(int selection_mode)
for (i = 0; i < length; i++)
buffer[i] = i;
- /* Set up the dxpl for the write */
- dxpl_write = H5Pcreate(H5P_DATASET_XFER);
- VRFY((dxpl_write >= 0), "H5Pcreate(H5P_DATASET_XFER) succeeded");
-
if (is_independent) {
/* Set Independent I/O */
ret = H5Pset_dxpl_mpio(dxpl_write, H5FD_MPIO_INDEPENDENT);
@@ -4052,11 +4079,6 @@ test_no_collective_cause_mode(int selection_mode)
VRFY((ret >= 0), "H5Pset_dxpl_mpio succeeded");
}
- if (selection_mode & TEST_DATA_TRANSFORMS) {
- ret = H5Pset_data_transform(dxpl_write, "x+1");
- VRFY((ret >= 0), "H5Pset_data_transform succeeded");
- }
-
/*---------------------
* Test Write access
*---------------------*/
@@ -4072,6 +4094,20 @@ test_no_collective_cause_mode(int selection_mode)
&no_collective_cause_global_write);
VRFY((ret >= 0), "retrieving no collective cause succeeded");
+ ret = H5Pget_no_selection_io_cause(dxpl_write, &no_selection_io_cause_write);
+ VRFY((ret >= 0), "retrieving no selection io cause succeeded");
+
+ if (no_collective_cause_local_write & H5D_MPIO_NO_SELECTION_IO) {
+ VRFY((no_selection_io_cause_write == no_selection_io_cause_expected),
+ "H5D_MPIO_NO_SELECTION_IO for write is as expected");
+ }
+
+ if (no_collective_cause_global_write & H5D_MPIO_NO_SELECTION_IO) {
+
+ VRFY((no_selection_io_cause_write == no_selection_io_cause_expected),
+ "H5D_MPIO_NO_SELECTION_IO for write is as expected");
+ }
+
/*---------------------
* Test Read access
*---------------------*/
@@ -4092,6 +4128,21 @@ test_no_collective_cause_mode(int selection_mode)
&no_collective_cause_global_read);
VRFY((ret >= 0), "retrieving no collective cause succeeded");
+ ret = H5Pget_no_selection_io_cause(dxpl_read, &no_selection_io_cause_read);
+ VRFY((ret >= 0), "retrieving no selection io cause succeeded");
+
+ if (no_collective_cause_local_read & H5D_MPIO_NO_SELECTION_IO) {
+
+ VRFY((no_selection_io_cause_read == no_selection_io_cause_expected),
+ "H5D_MPIO_NO_SELECTION_IO for read is as expected");
+ }
+
+ if (no_collective_cause_global_read & H5D_MPIO_NO_SELECTION_IO) {
+
+ VRFY((no_selection_io_cause_read == no_selection_io_cause_expected),
+ "H5D_MPIO_NO_SELECTION_IO for read is as expected");
+ }
+
/* Check write vs read */
VRFY((no_collective_cause_local_read == no_collective_cause_local_write),
"reading and writing are the same for local cause of Broken Collective I/O");