summaryrefslogtreecommitdiffstats
path: root/testpar/t_span_tree.c
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-12-08 13:42:49 (GMT)
committerGitHub <noreply@github.com>2023-12-08 13:42:49 (GMT)
commit95827bc79d592ad5aa71ec3199a83ede9b324c20 (patch)
tree0b97f531f4d2f7ce133659245976eeea0ba2e242 /testpar/t_span_tree.c
parentfb84c696a476c39db2c35e7d86b818138e089358 (diff)
downloadhdf5-95827bc79d592ad5aa71ec3199a83ede9b324c20.zip
hdf5-95827bc79d592ad5aa71ec3199a83ede9b324c20.tar.gz
hdf5-95827bc79d592ad5aa71ec3199a83ede9b324c20.tar.bz2
HDF5 API test updates (#3835) (#3889)
* HDF5 API test updates Removed test duplication from bringing API tests back into the library from external VOL tests repo Synced changes between API tests and library's tests Updated API tests CMake code to directly use and install testhdf5, testphdf5, etc. instead of creating duplicate binaries Added new h5_using_native_vol() test function to determine whether the VOL connector being used is (or the VOL connector stack being used resolves to) the native VOL connector
Diffstat (limited to 'testpar/t_span_tree.c')
-rw-r--r--testpar/t_span_tree.c127
1 files changed, 126 insertions, 1 deletions
diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c
index e4ff258..b381ef5 100644
--- a/testpar/t_span_tree.c
+++ b/testpar/t_span_tree.c
@@ -21,7 +21,7 @@
one in collective mode,
2) We will read two datasets with the same hyperslab selection settings,
1. independent read to read independent output,
- independent read to read collecive output,
+ independent read to read collective output,
Compare the result,
If the result is the same, then collective write succeeds.
2. collective read to read independent output,
@@ -54,6 +54,22 @@ static void coll_read_test(void);
void
coll_irregular_cont_write(void)
{
+ int mpi_rank;
+
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+
+ /* Make sure the connector supports the API functions being tested */
+ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) ||
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
+ if (MAINPROCESS) {
+ puts("SKIPPED");
+ printf(" API functions for basic file dataset, or dataset more aren't supported with this "
+ "connector\n");
+ fflush(stdout);
+ }
+
+ return;
+ }
coll_write_test(0);
}
@@ -73,6 +89,22 @@ coll_irregular_cont_write(void)
void
coll_irregular_cont_read(void)
{
+ int mpi_rank;
+
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+
+ /* Make sure the connector supports the API functions being tested */
+ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) ||
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
+ if (MAINPROCESS) {
+ puts("SKIPPED");
+ printf(" API functions for basic file dataset, or dataset more aren't supported with this "
+ "connector\n");
+ fflush(stdout);
+ }
+
+ return;
+ }
coll_read_test();
}
@@ -92,6 +124,22 @@ coll_irregular_cont_read(void)
void
coll_irregular_simple_chunk_write(void)
{
+ int mpi_rank;
+
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+
+ /* Make sure the connector supports the API functions being tested */
+ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) ||
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
+ if (MAINPROCESS) {
+ puts("SKIPPED");
+ printf(" API functions for basic file dataset, or dataset more aren't supported with this "
+ "connector\n");
+ fflush(stdout);
+ }
+
+ return;
+ }
coll_write_test(1);
}
@@ -111,6 +159,22 @@ coll_irregular_simple_chunk_write(void)
void
coll_irregular_simple_chunk_read(void)
{
+ int mpi_rank;
+
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+
+ /* Make sure the connector supports the API functions being tested */
+ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) ||
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
+ if (MAINPROCESS) {
+ puts("SKIPPED");
+ printf(" API functions for basic file dataset, or dataset more aren't supported with this "
+ "connector\n");
+ fflush(stdout);
+ }
+
+ return;
+ }
coll_read_test();
}
@@ -130,6 +194,22 @@ coll_irregular_simple_chunk_read(void)
void
coll_irregular_complex_chunk_write(void)
{
+ int mpi_rank;
+
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+
+ /* Make sure the connector supports the API functions being tested */
+ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) ||
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
+ if (MAINPROCESS) {
+ puts("SKIPPED");
+ printf(" API functions for basic file dataset, or dataset more aren't supported with this "
+ "connector\n");
+ fflush(stdout);
+ }
+
+ return;
+ }
coll_write_test(4);
}
@@ -149,6 +229,22 @@ coll_irregular_complex_chunk_write(void)
void
coll_irregular_complex_chunk_read(void)
{
+ int mpi_rank;
+
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+
+ /* Make sure the connector supports the API functions being tested */
+ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC) ||
+ !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_MORE)) {
+ if (MAINPROCESS) {
+ puts("SKIPPED");
+ printf(" API functions for basic file dataset, or dataset more aren't supported with this "
+ "connector\n");
+ fflush(stdout);
+ }
+
+ return;
+ }
coll_read_test();
}
@@ -1775,6 +1871,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, const bool use_col
ret = H5Dwrite(small_dataset, dset_type, mem_small_ds_sid, file_small_ds_sid, xfer_plist, small_ds_buf_0);
VRFY((ret >= 0), "H5Dwrite() small_dataset initial write succeeded");
+ /* sync with the other processes before reading data */
+ mrc = MPI_Barrier(MPI_COMM_WORLD);
+ VRFY((mrc == MPI_SUCCESS), "Sync after small dataset writes");
+
/* read the small data set back to verify that it contains the
* expected data. Note that each process reads in the entire
* data set and verifies it.
@@ -2254,6 +2354,20 @@ lower_dim_size_comp_test(void)
/* const char *fcnName = "lower_dim_size_comp_test()"; */
int chunk_edge_size = 0;
int use_collective_io;
+ int mpi_rank;
+
+ MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+
+ /* Make sure the connector supports the API functions being tested */
+ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
+ if (MAINPROCESS) {
+ puts("SKIPPED");
+ printf(" API functions for basic file or dataset aren't supported with this connector\n");
+ fflush(stdout);
+ }
+
+ return;
+ }
HDcompile_assert(sizeof(uint32_t) == sizeof(unsigned));
for (use_collective_io = 0; use_collective_io <= 1; use_collective_io++) {
@@ -2331,6 +2445,17 @@ link_chunk_collective_io_test(void)
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
+ /* Make sure the connector supports the API functions being tested */
+ if (!(vol_cap_flags_g & H5VL_CAP_FLAG_FILE_BASIC) || !(vol_cap_flags_g & H5VL_CAP_FLAG_DATASET_BASIC)) {
+ if (MAINPROCESS) {
+ puts("SKIPPED");
+ printf(" API functions for basic file or dataset aren't supported with this connector\n");
+ fflush(stdout);
+ }
+
+ return;
+ }
+
assert(mpi_size > 0);
/* get the file name */