diff options
Diffstat (limited to 'src/H5Pint.c')
-rw-r--r-- | src/H5Pint.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/H5Pint.c b/src/H5Pint.c index 12582bb..3c145c5 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -5463,12 +5463,31 @@ H5P_verify_apl_and_dxpl(hid_t *acspl_id, const H5P_libclass_t *libclass, hid_t * HDassert(libclass); HDassert(dxpl_id); +#ifdef H5_HAVE_PARALLEL + /* If parallel is enabled and the file driver used in the MPI-IO + VFD, issue an MPI barrier for easier debugging if the API function + calling this is supposed to be called collectively. Note that this + happens only when the environment variable H5_COLL_BARRIER is set + to non 0. */ + if(is_collective && H5_coll_api_sanity_check_g) { + MPI_Comm mpi_comm; /* file communicator */ + + /* retrieve the MPI communicator from the loc_id or the fapl_id */ + if(H5F_mpi_retrieve_comm(loc_id, *acspl_id, &mpi_comm) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MPI communicator") + + /* issue the barrier */ + if(mpi_comm != MPI_COMM_NULL) + MPI_Barrier(mpi_comm); + } +#endif /* H5_HAVE_PARALLEL */ + /* Set access plist to the default property list of the appropriate class if it's the generic default */ if(H5P_DEFAULT == *acspl_id) *acspl_id = *libclass->def_plist_id; else { #ifdef H5_HAVE_PARALLEL - H5P_coll_md_read_flag_t is_collective; /* Collective metadata read flag */ + H5P_coll_md_read_flag_t md_coll_read; /* Collective metadata read flag */ H5P_genplist_t *plist; /* Property list pointer */ #endif /* H5_HAVE_PARALLEL */ @@ -5484,34 +5503,15 @@ H5P_verify_apl_and_dxpl(hid_t *acspl_id, const H5P_libclass_t *libclass, hid_t * HGOTO_ERROR(H5E_PLIST, H5E_BADATOM, FAIL, "can't find object for ID") /* Get the collective metadata read flag */ - if(H5P_peek(plist, H5_COLL_MD_READ_FLAG_NAME, &is_collective) < 0) + if(H5P_peek(plist, H5_COLL_MD_READ_FLAG_NAME, &md_coll_read) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get core collective metadata read flag") /* If collective metadata read requested and using internal DXPL, switch to internal collective DXPL */ - if(H5P_USER_TRUE == is_collective) + if(H5P_USER_TRUE == md_coll_read) *dxpl_id = H5AC_coll_read_dxpl_id; #endif /* H5_HAVE_PARALLEL */ } /* end else */ -#ifdef H5_HAVE_PARALLEL - /* If parallel is enabled and the file driver used in the MPI-IO - VFD, issue an MPI barrier for easier debugging if the API function - calling this is supposed to be called collectively. Note that this - happens only when the environment variable H5_COLL_BARRIER is set - to non 0. */ - if(is_collective && H5_coll_api_sanity_check_g) { - MPI_Comm mpi_comm; /* file communicator */ - - /* retrieve the MPI communicator from the loc_id or the fapl_id */ - if(H5F_mpi_retrieve_comm(loc_id, *acspl_id, &mpi_comm) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get MPI communicator") - - /* issue the barrier */ - if(mpi_comm != MPI_COMM_NULL) - MPI_Barrier(mpi_comm); - } -#endif /* H5_HAVE_PARALLEL */ - done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P_verify_apl_and_dxpl() */ |