Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync change for allowing serial tools to use Subfiling VFD #4326

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions tools/lib/h5tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,16 +579,8 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info)
}
else if (!strcmp(vfd_info->u.name, drivernames[SUBFILING_VFD_IDX])) {
#if defined(H5_HAVE_PARALLEL) && defined(H5_HAVE_SUBFILING_VFD)
int mpi_initialized, mpi_finalized;

/* check if MPI is available. */
MPI_Initialized(&mpi_initialized);
MPI_Finalized(&mpi_finalized);

if (mpi_initialized && !mpi_finalized) {
if (H5Pset_fapl_subfiling(fapl_id, (const H5FD_subfiling_config_t *)vfd_info->info) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_subfiling() failed");
}
if (H5Pset_fapl_subfiling(fapl_id, (const H5FD_subfiling_config_t *)vfd_info->info) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_subfiling() failed");
#else
H5TOOLS_GOTO_ERROR(FAIL, "The Subfiling VFD is not enabled");
#endif
Expand Down Expand Up @@ -618,9 +610,20 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info)
*
* Currently, driver configuration strings are unsupported.
*/
if (H5Pset_driver_by_value(fapl_id, vfd_info->u.value, (const char *)vfd_info->info) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "can't load VFD plugin by driver value '%ld'",
(long int)vfd_info->u.value);

if (vfd_info->u.value == H5_VFD_SUBFILING) {
#if defined(H5_HAVE_PARALLEL) && defined(H5_HAVE_SUBFILING_VFD)
if (H5Pset_fapl_subfiling(fapl_id, (const H5FD_subfiling_config_t *)vfd_info->info) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_subfiling() failed");
#else
H5TOOLS_GOTO_ERROR(FAIL, "The Subfiling VFD is not enabled");
#endif
}
else {
if (H5Pset_driver_by_value(fapl_id, vfd_info->u.value, (const char *)vfd_info->info) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "can't load VFD plugin by driver value '%ld'",
(long int)vfd_info->u.value);
}
break;

default:
Expand Down
Loading