summaryrefslogtreecommitdiffstats
path: root/testpar/t_bigio.c
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-11-13 19:49:38 (GMT)
committerGitHub <noreply@github.com>2023-11-13 19:49:38 (GMT)
commit28d2b6771f41396f1e243e00cb9dd57c4c891613 (patch)
tree238e77e247ac6b688d0eea0a6f81df95e47448dc /testpar/t_bigio.c
parent8b3ffdef3099d2699ec71a5f855966132b3d3c25 (diff)
downloadhdf5-28d2b6771f41396f1e243e00cb9dd57c4c891613.zip
hdf5-28d2b6771f41396f1e243e00cb9dd57c4c891613.tar.gz
hdf5-28d2b6771f41396f1e243e00cb9dd57c4c891613.tar.bz2
HDF5 API test updates (#3835)
* 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 * Remove duplicate variable
Diffstat (limited to 'testpar/t_bigio.c')
-rw-r--r--testpar/t_bigio.c46
1 files changed, 42 insertions, 4 deletions
diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c
index 2726f91..910c7a2 100644
--- a/testpar/t_bigio.c
+++ b/testpar/t_bigio.c
@@ -1,3 +1,14 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "hdf5.h"
#include "testphdf5.h"
@@ -1854,7 +1865,8 @@ main(int argc, char **argv)
{
hsize_t newsize = 1048576;
/* Set the bigio processing limit to be 'newsize' bytes */
- hsize_t oldsize = H5_mpi_set_bigio_count(newsize);
+ hsize_t oldsize = H5_mpi_set_bigio_count(newsize);
+ hid_t acc_plist = H5I_INVALID_HID;
/* Having set the bigio handling to a size that is manageable,
* we'll set our 'bigcount' variable to be 2X that limit so
@@ -1879,6 +1891,30 @@ main(int argc, char **argv)
/* set alarm. */
TestAlarmOn();
+ acc_plist = create_faccess_plist(MPI_COMM_WORLD, MPI_INFO_NULL, facc_type);
+
+ /* Get the capability flag of the VOL connector being used */
+ if (H5Pget_vol_cap_flags(acc_plist, &vol_cap_flags_g) < 0) {
+ if (MAIN_PROCESS)
+ printf("Failed to get the capability flag of the VOL connector being used\n");
+
+ MPI_Finalize();
+ return -1;
+ }
+
+ /* Make sure the connector supports the API functions being tested. This test only
+ * uses a few API functions, such as H5Fcreate/open/close/delete, H5Dcreate/write/read/close,
+ * and H5Dget_space. */
+ 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 (MAIN_PROCESS)
+ printf(
+ "API functions for basic file, dataset basic or more aren't supported with this connector\n");
+
+ MPI_Finalize();
+ return 0;
+ }
+
dataset_big_write();
MPI_Barrier(MPI_COMM_WORLD);
@@ -1900,9 +1936,6 @@ main(int argc, char **argv)
H5_mpi_set_bigio_count(oldsize);
single_rank_independent_io();
- /* turn off alarm */
- TestAlarmOff();
-
if (mpi_rank_g == 0) {
hid_t fapl_id = H5Pcreate(H5P_FILE_ACCESS);
@@ -1926,6 +1959,11 @@ main(int argc, char **argv)
printf("==================================================\n");
}
+ H5Pclose(acc_plist);
+
+ /* turn off alarm */
+ TestAlarmOff();
+
/* close HDF5 library */
H5close();