summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2022-08-04 17:56:48 (GMT)
committerGitHub <noreply@github.com>2022-08-04 17:56:48 (GMT)
commitbf07e0f2c9b381509abbde59fca8bea5445da261 (patch)
tree69551f0ec6658cc4e970bf1080fa4c5b256b289f /testpar
parenta71534fcc248737491adcfd770c7ab69b4adc2d4 (diff)
downloadhdf5-bf07e0f2c9b381509abbde59fca8bea5445da261.zip
hdf5-bf07e0f2c9b381509abbde59fca8bea5445da261.tar.gz
hdf5-bf07e0f2c9b381509abbde59fca8bea5445da261.tar.bz2
Subfiling updates for release (#1963)
* Remove generated file h5fuse.sh * Link pthreads library when Subfiling VFD is built * Switch to MPI I/O driver for Subfiling HDF5 stub file * Rough first implementation for Subfiling file deletion * Subfiling VFD - get file dirname for file deletion * Subfiling VFD - set lock callback to NULL for now to avoid performance issues * Committing clang-format changes * Minor tidying up of Subfiling testing * Fixups for Subfiling VFD support in tools * Tidy up Subfiling public interface and add Doxygen * Respect Subfiling configuration settings from application * Add release note for Subfiling VFD * Committing clang-format changes * Committing clang-format changes * Shorten some Subfiling environment variable names Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'testpar')
-rw-r--r--testpar/t_subfiling_vfd.c20
-rw-r--r--testpar/t_vfd.c32
2 files changed, 26 insertions, 26 deletions
diff --git a/testpar/t_subfiling_vfd.c b/testpar/t_subfiling_vfd.c
index 44a78e1..f6fa63c 100644
--- a/testpar/t_subfiling_vfd.c
+++ b/testpar/t_subfiling_vfd.c
@@ -107,6 +107,8 @@ create_subfiling_ioc_fapl(void)
TEST_ERROR;
}
+ if (H5Pclose(subfiling_conf->ioc_fapl_id) < 0)
+ TEST_ERROR;
subfiling_conf->ioc_fapl_id = ioc_fapl;
if (H5Pset_fapl_subfiling(ret_value, subfiling_conf) < 0)
@@ -140,19 +142,16 @@ error:
static void
test_create_and_close(void)
{
- H5FD_subfiling_config_t subfiling_config;
- const char *test_filenames[2];
- hid_t file_id = H5I_INVALID_HID;
- hid_t fapl_id = H5I_INVALID_HID;
+ const char *test_filenames[2];
+ hid_t file_id = H5I_INVALID_HID;
+ hid_t fapl_id = H5I_INVALID_HID;
if (MAINPROCESS)
- TESTING("File creation and immediate close");
+ HDprintf("File creation and immediate close\n");
fapl_id = create_subfiling_ioc_fapl();
VRFY((fapl_id >= 0), "FAPL creation succeeded");
- VRFY((H5Pget_fapl_subfiling(fapl_id, &subfiling_config) >= 0), "H5Pget_fapl_subfiling succeeded");
-
file_id = H5Fcreate("basic_create.h5", H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
VRFY((file_id >= 0), "H5Fcreate succeeded");
@@ -162,9 +161,6 @@ test_create_and_close(void)
test_filenames[1] = NULL;
h5_clean_files(test_filenames, fapl_id);
- if (H5P_DEFAULT != subfiling_config.ioc_fapl_id)
- VRFY((H5Pclose(subfiling_config.ioc_fapl_id) >= 0), "FAPL close succeeded");
-
return;
}
@@ -191,13 +187,13 @@ main(int argc, char **argv)
MPI_Comm_size(comm, &mpi_size);
MPI_Comm_rank(comm, &mpi_rank);
- H5open();
-
if (H5dont_atexit() < 0) {
if (MAINPROCESS)
HDprintf("Failed to turn off atexit processing. Continue.\n");
}
+ H5open();
+
/* Enable selection I/O using internal temporary workaround */
H5_use_selection_io_g = TRUE;
diff --git a/testpar/t_vfd.c b/testpar/t_vfd.c
index 0547008..f5f0267 100644
--- a/testpar/t_vfd.c
+++ b/testpar/t_vfd.c
@@ -329,22 +329,26 @@ setup_vfd_test_file(int file_name_id, char *file_name, int mpi_size, H5FD_mpio_x
#ifdef H5_HAVE_SUBFILING_VFD
else if (HDstrcmp(vfd_name, H5FD_SUBFILING_NAME) == 0) {
- hid_t ioc_fapl;
- H5FD_ioc_config_t ioc_config = {/* magic = */ H5FD_IOC_FAPL_MAGIC,
- /* version = */ H5FD_CURR_IOC_FAPL_VERSION,
- /* stripe_count = */ 0, /* will over write */
- /* stripe_depth = */ (INTS_PER_RANK / 2),
- /* ioc_selection = */ SELECT_IOC_ONE_PER_NODE,
- /* ioc_fapl_id = */ H5P_DEFAULT, /* will over write? */
- /* thread_pool_count = */ H5FD_IOC_THREAD_POOL_SIZE};
- H5FD_subfiling_config_t subfiling_conf = {
- /* magic = */ H5FD_IOC_FAPL_MAGIC,
- /* version = */ H5FD_CURR_IOC_FAPL_VERSION,
- /* stripe_count = */ 0, /* will over write */
- /* stripe_depth = */ (INTS_PER_RANK / 2),
+ H5FD_subfiling_shared_config_t shared_conf = {
/* ioc_selection = */ SELECT_IOC_ONE_PER_NODE,
+ /* stripe_size = */ (INTS_PER_RANK / 2),
+ /* stripe_count = */ 0, /* will over write */
+ };
+ H5FD_subfiling_config_t subfiling_conf = {
+ /* magic = */ H5FD_SUBFILING_FAPL_MAGIC,
+ /* version = */ H5FD_SUBFILING_CURR_FAPL_VERSION,
/* ioc_fapl_id = */ H5P_DEFAULT, /* will over write? */
- /* require_ioc = */ TRUE};
+ /* require_ioc = */ TRUE,
+ /* shared_cfg = */ shared_conf,
+ };
+ H5FD_ioc_config_t ioc_config = {
+ /* magic = */ H5FD_IOC_FAPL_MAGIC,
+ /* version = */ H5FD_IOC_CURR_FAPL_VERSION,
+ /* under_fapl_id = */ H5P_DEFAULT,
+ /* thread_pool_count = */ H5FD_IOC_DEFAULT_THREAD_POOL_SIZE,
+ /* subf_config = */ shared_conf,
+ };
+ hid_t ioc_fapl = H5I_INVALID_HID;
if ((pass) && ((ioc_fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)) {