summaryrefslogtreecommitdiffstats
path: root/src/H5Farray.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-02-10 17:26:09 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-02-10 17:26:09 (GMT)
commit24d8506dd564c5cc0fdebb5ebdfaec7bda5a7435 (patch)
tree6b2eb3bb1e782c40718204882428e6471b6281ac /src/H5Farray.c
parent738661ab9f409b8d961ba1402d6c4dd5f99ecb43 (diff)
downloadhdf5-24d8506dd564c5cc0fdebb5ebdfaec7bda5a7435.zip
hdf5-24d8506dd564c5cc0fdebb5ebdfaec7bda5a7435.tar.gz
hdf5-24d8506dd564c5cc0fdebb5ebdfaec7bda5a7435.tar.bz2
[svn-r6387] Purpose:
Bug Fix Description: Metadata cache in parallel I/O can cause hangs in applications which perform independent I/O on chunked datasets, because the metadata cache can attempt to flush out dirty metadata from only a single process, instead of collectively from all processes. Solution: Pass a dataset transfer property list down from every API function which could possibly trigger metadata I/O. Then, split the metadata cache into two sets of entries to allow dirty metadata to be set aside when a hash table collision occurs during independent I/O. Platforms tested: Tested h5committest {arabica (fortran), eirene (fortran, C++) modi4 (parallel, fortran)} FreeBSD 4.7 (sleipnir) serial & parallel Misc. update: Updated release_docs/RELEASE
Diffstat (limited to 'src/H5Farray.c')
-rw-r--r--src/H5Farray.c84
1 files changed, 34 insertions, 50 deletions
diff --git a/src/H5Farray.c b/src/H5Farray.c
index bc82cf5..d5d251e 100644
--- a/src/H5Farray.c
+++ b/src/H5Farray.c
@@ -92,7 +92,6 @@ H5F_arr_read(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
struct H5O_efl_t efl; /* External File List info */
#ifdef H5_HAVE_PARALLEL
H5FD_mpio_xfer_t xfer_mode=H5FD_MPIO_INDEPENDENT;
- H5P_genplist_t *plist=NULL; /* Property list */
#endif /* H5_HAVE_PARALLEL */
herr_t ret_value = SUCCEED; /* Return value */
@@ -113,32 +112,25 @@ H5F_arr_read(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
H5V_vector_cpy(layout->ndims, hslab_size, _hslab_size);
#ifdef H5_HAVE_PARALLEL
- {
- H5FD_mpio_dxpl_t *dx;
- hid_t driver_id; /* VFL driver ID */
-
- /* Get the transfer mode for MPIO transfers */
- if(IS_H5FD_MPIO(f)) {
- /* Get the plist structure */
- if(NULL == (plist = H5I_object(dxpl_id)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
-
- /* Get the driver ID */
- if(H5P_get(plist, H5D_XFER_VFL_ID_NAME, &driver_id)<0)
- HGOTO_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve VFL driver ID");
-
- /* Check if we are using the MPIO driver (for the DXPL) */
- if(H5FD_MPIO==driver_id) {
- /* Get the driver information */
- if(H5P_get(plist, H5D_XFER_VFL_INFO_NAME, &dx)<0)
- HGOTO_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve VFL driver info");
-
- /* Check if we are not using independent I/O */
- if(H5FD_MPIO_INDEPENDENT!=dx->xfer_mode)
- xfer_mode = dx->xfer_mode;
- } /* end if */
+ /* Get the transfer mode for MPIO transfers */
+ if(IS_H5FD_MPIO(f)) {
+ hid_t driver_id; /* VFL driver ID */
+ H5P_genplist_t *plist; /* Property list */
+
+ /* Get the plist structure */
+ if(NULL == (plist = H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
+
+ /* Get the driver ID */
+ if(H5P_get(plist, H5D_XFER_VFL_ID_NAME, &driver_id)<0)
+ HGOTO_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve VFL driver ID");
+
+ /* Check if we are using the MPIO driver (for the DXPL) */
+ if(H5FD_MPIO==driver_id) {
+ /* Get the transfer mode */
+ xfer_mode=H5P_peek_unsigned(plist, H5D_XFER_IO_XFER_MODE_NAME);
} /* end if */
- }
+ } /* end if */
/* Collective MPIO access is unsupported for non-contiguous datasets */
if (H5D_CONTIGUOUS!=layout->type && H5FD_MPIO_COLLECTIVE==xfer_mode)
@@ -334,7 +326,6 @@ H5F_arr_write(H5F_t *f, hid_t dxpl_id, H5O_layout_t *layout,
struct H5O_efl_t efl; /* External File List info */
#ifdef H5_HAVE_PARALLEL
H5FD_mpio_xfer_t xfer_mode=H5FD_MPIO_INDEPENDENT;
- H5P_genplist_t *plist=NULL; /* Property list */
#endif /* H5_HAVE_PARALLEL */
herr_t ret_value = SUCCEED; /* Return value */
@@ -355,32 +346,25 @@ H5F_arr_write(H5F_t *f, hid_t dxpl_id, H5O_layout_t *layout,
H5V_vector_cpy(layout->ndims, hslab_size, _hslab_size);
#ifdef H5_HAVE_PARALLEL
- {
- H5FD_mpio_dxpl_t *dx;
+ /* Get the transfer mode for MPIO transfers */
+ if(IS_H5FD_MPIO(f)) {
hid_t driver_id; /* VFL driver ID */
+ H5P_genplist_t *plist; /* Property list */
- /* Get the transfer mode for MPIO transfers */
- if(IS_H5FD_MPIO(f)) {
- /* Get the plist structure */
- if(NULL == (plist = H5I_object(dxpl_id)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
-
- /* Get the driver ID */
- if(H5P_get(plist, H5D_XFER_VFL_ID_NAME, &driver_id)<0)
- HGOTO_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve VFL driver ID");
-
- /* Check if we are using the MPIO driver (for the DXPL) */
- if(H5FD_MPIO==driver_id) {
- /* Get the driver information */
- if(H5P_get(plist, H5D_XFER_VFL_INFO_NAME, &dx)<0)
- HGOTO_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve VFL driver info");
-
- /* Check if we are not using independent I/O */
- if(H5FD_MPIO_INDEPENDENT!=dx->xfer_mode)
- xfer_mode = dx->xfer_mode;
- } /* end if */
+ /* Get the plist structure */
+ if(NULL == (plist = H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
+
+ /* Get the driver ID */
+ if(H5P_get(plist, H5D_XFER_VFL_ID_NAME, &driver_id)<0)
+ HGOTO_ERROR (H5E_PLIST, H5E_CANTGET, FAIL, "Can't retrieve VFL driver ID");
+
+ /* Check if we are using the MPIO driver (for the DXPL) */
+ if(H5FD_MPIO==driver_id) {
+ /* Get the transfer mode */
+ xfer_mode=H5P_peek_unsigned(plist, H5D_XFER_IO_XFER_MODE_NAME);
} /* end if */
- }
+ } /* end if */
if (H5D_CONTIGUOUS!=layout->type && H5FD_MPIO_COLLECTIVE==xfer_mode)
HGOTO_ERROR (H5E_DATASET, H5E_WRITEERROR, FAIL, "collective access on non-contiguous datasets not supported yet");