diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-02-10 17:26:09 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-02-10 17:26:09 (GMT) |
commit | 24d8506dd564c5cc0fdebb5ebdfaec7bda5a7435 (patch) | |
tree | 6b2eb3bb1e782c40718204882428e6471b6281ac /src/H5Fseq.c | |
parent | 738661ab9f409b8d961ba1402d6c4dd5f99ecb43 (diff) | |
download | hdf5-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/H5Fseq.c')
-rw-r--r-- | src/H5Fseq.c | 80 |
1 files changed, 32 insertions, 48 deletions
diff --git a/src/H5Fseq.c b/src/H5Fseq.c index 15cb668..fddf48f 100644 --- a/src/H5Fseq.c +++ b/src/H5Fseq.c @@ -176,7 +176,6 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, int i,j; /*counters */ #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 */ @@ -191,32 +190,25 @@ H5F_seq_readv(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, assert(TRUE==H5P_isa_class(dxpl_id,H5P_DATASET_XFER)); #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 */ /* Collective MPIO access is unsupported for non-contiguous datasets */ if (H5D_CHUNKED==layout->type && H5FD_MPIO_COLLECTIVE==xfer_mode) @@ -563,7 +555,6 @@ H5F_seq_writev(H5F_t *f, hid_t dxpl_id, H5O_layout_t *layout, int i,j; /*counters */ #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 */ @@ -578,32 +569,25 @@ H5F_seq_writev(H5F_t *f, hid_t dxpl_id, H5O_layout_t *layout, assert(TRUE==H5P_isa_class(dxpl_id,H5P_DATASET_XFER)); #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=NULL; /* 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"); - /* 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 */ + /* 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_CHUNKED==layout->type && H5FD_MPIO_COLLECTIVE==xfer_mode) |