summaryrefslogtreecommitdiffstats
path: root/src/H5R.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/H5R.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/H5R.c')
-rw-r--r--src/H5R.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/H5R.c b/src/H5R.c
index 57fd5b4..64fdb6a 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -35,10 +35,10 @@ static herr_t H5R_init_interface(void);
/* Static functions */
static herr_t H5R_create(void *ref, H5G_entry_t *loc, const char *name,
- H5R_type_t ref_type, H5S_t *space);
-static hid_t H5R_dereference(H5F_t *file, H5R_type_t ref_type, void *_ref);
-static H5S_t * H5R_get_region(H5F_t *file, H5R_type_t ref_type, void *_ref);
-static int H5R_get_obj_type(H5F_t *file, H5R_type_t ref_type, void *_ref);
+ H5R_type_t ref_type, H5S_t *space, hid_t dxpl_id);
+static hid_t H5R_dereference(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type, void *_ref);
+static H5S_t * H5R_get_region(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type, void *_ref);
+static int H5R_get_obj_type(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type, void *_ref);
/*--------------------------------------------------------------------------
@@ -136,7 +136,7 @@ H5R_term_interface(void)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5R_create(void *_ref, H5G_entry_t *loc, const char *name, H5R_type_t ref_type, H5S_t *space)
+H5R_create(void *_ref, H5G_entry_t *loc, const char *name, H5R_type_t ref_type, H5S_t *space, hid_t dxpl_id)
{
H5G_stat_t sb; /* Stat buffer for retrieving OID */
herr_t ret_value=SUCCEED; /* Return value */
@@ -148,7 +148,7 @@ H5R_create(void *_ref, H5G_entry_t *loc, const char *name, H5R_type_t ref_type,
assert(name);
assert(ref_type>H5R_BADTYPE || ref_type<H5R_MAXTYPE);
- if (H5G_get_objinfo (loc, name, 0, &sb)<0)
+ if (H5G_get_objinfo (loc, name, 0, &sb, dxpl_id)<0)
HGOTO_ERROR (H5E_REFERENCE, H5E_NOTFOUND, FAIL, "unable to stat object");
switch(ref_type) {
@@ -218,7 +218,7 @@ H5R_create(void *_ref, H5G_entry_t *loc, const char *name, H5R_type_t ref_type,
/* Save the serialized buffer for later */
H5_CHECK_OVERFLOW(buf_size,hssize_t,size_t);
- if(H5HG_insert(loc->file,(size_t)buf_size,buf,&hobjid)<0)
+ if(H5HG_insert(loc->file,dxpl_id,(size_t)buf_size,buf,&hobjid)<0)
HGOTO_ERROR(H5E_REFERENCE, H5E_WRITEERROR, FAIL, "Unable to serialize selection");
/* Serialize the heap ID and index for storage in the file */
@@ -298,7 +298,7 @@ H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t
HGOTO_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace");
/* Create reference */
- if ((ret_value=H5R_create(ref,loc,name,ref_type,space))<0)
+ if ((ret_value=H5R_create(ref,loc,name,ref_type,space, H5AC_dxpl_id))<0)
HGOTO_ERROR (H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable to create reference");
done:
@@ -329,7 +329,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static hid_t
-H5R_dereference(H5F_t *file, H5R_type_t ref_type, void *_ref)
+H5R_dereference(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type, void *_ref)
{
H5G_t *group; /* Pointer to group to open */
H5T_t *datatype; /* Pointer to datatype to open */
@@ -375,7 +375,7 @@ H5R_dereference(H5F_t *file, H5R_type_t ref_type, void *_ref)
INT32DECODE(p,hobjid.idx);
/* Get the dataset region from the heap (allocate inside routine) */
- if((buf=H5HG_read(ent.file,&hobjid,NULL))==NULL)
+ if((buf=H5HG_read(ent.file,dxpl_id,&hobjid,NULL))==NULL)
HGOTO_ERROR(H5E_REFERENCE, H5E_READERROR, FAIL, "Unable to read dataset region information");
/* Get the object oid for the dataset */
@@ -398,14 +398,14 @@ H5R_dereference(H5F_t *file, H5R_type_t ref_type, void *_ref)
} /* end switch */
/* Check to make certain that this object hasn't been deleted since the reference was created */
- if(H5O_link(&ent,0)<=0)
+ if(H5O_link(&ent,0,dxpl_id)<=0)
HGOTO_ERROR(H5E_REFERENCE, H5E_LINKCOUNT, FAIL, "dereferencing deleted object");
/* Open the dataset object */
- oid_type=H5G_get_type(&ent);
+ oid_type=H5G_get_type(&ent,dxpl_id);
switch(oid_type) {
case H5G_GROUP:
- if ((group=H5G_open_oid(&ent)) == NULL)
+ if ((group=H5G_open_oid(&ent,dxpl_id)) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "not found");
/* Create an atom for the dataset */
@@ -416,7 +416,7 @@ H5R_dereference(H5F_t *file, H5R_type_t ref_type, void *_ref)
break;
case H5G_TYPE:
- if ((datatype=H5T_open_oid(&ent)) == NULL)
+ if ((datatype=H5T_open_oid(&ent, dxpl_id)) == NULL)
HGOTO_ERROR(H5E_DATATYPE, H5E_NOTFOUND, FAIL, "not found");
/* Create an atom for the dataset */
@@ -428,7 +428,7 @@ H5R_dereference(H5F_t *file, H5R_type_t ref_type, void *_ref)
case H5G_DATASET:
/* Open the dataset */
- if ((ret_value=H5D_open(&ent)) < 0)
+ if ((ret_value=H5D_open(&ent,dxpl_id)) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, FAIL, "not found");
break;
@@ -485,7 +485,7 @@ H5Rdereference(hid_t id, H5R_type_t ref_type, void *_ref)
file=loc->file;
/* Create reference */
- if ((ret_value=H5R_dereference(file, ref_type, _ref))<0)
+ if ((ret_value=H5R_dereference(file, H5AC_dxpl_id, ref_type, _ref))<0)
HGOTO_ERROR (H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable dereference object");
done:
@@ -516,7 +516,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static H5S_t *
-H5R_get_region(H5F_t *file, H5R_type_t UNUSED ref_type, void *_ref)
+H5R_get_region(H5F_t *file, hid_t dxpl_id, H5R_type_t UNUSED ref_type, void *_ref)
{
H5G_entry_t ent; /* Symbol table entry */
uint8_t *p; /* Pointer to OID to store */
@@ -542,7 +542,7 @@ H5R_get_region(H5F_t *file, H5R_type_t UNUSED ref_type, void *_ref)
INT32DECODE(p,hobjid.idx);
/* Get the dataset region from the heap (allocate inside routine) */
- if((buf=H5HG_read(ent.file,&hobjid,NULL))==NULL)
+ if((buf=H5HG_read(ent.file,dxpl_id,&hobjid,NULL))==NULL)
HGOTO_ERROR(H5E_REFERENCE, H5E_READERROR, NULL, "Unable to read dataset region information");
/* Get the object oid for the dataset */
@@ -550,7 +550,7 @@ H5R_get_region(H5F_t *file, H5R_type_t UNUSED ref_type, void *_ref)
H5F_addr_decode(ent.file,(const uint8_t **)&p,&(ent.header));
/* Open and copy the dataset's dataspace */
- if ((ret_value=H5S_read(&ent)) == NULL)
+ if ((ret_value=H5S_read(&ent, dxpl_id)) == NULL)
HGOTO_ERROR(H5E_DATASPACE, H5E_NOTFOUND, NULL, "not found");
/* Unserialize the selection */
@@ -611,7 +611,7 @@ H5Rget_region(hid_t id, H5R_type_t ref_type, void *_ref)
file=loc->file;
/* Get the dataspace with the correct region selected */
- if ((space=H5R_get_region(file,ref_type,_ref))==NULL)
+ if ((space=H5R_get_region(file,H5AC_dxpl_id,ref_type,_ref))==NULL)
HGOTO_ERROR (H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create dataspace");
/* Atomize */
@@ -751,7 +751,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static int
-H5R_get_obj_type(H5F_t *file, H5R_type_t ref_type, void *_ref)
+H5R_get_obj_type(H5F_t *file, hid_t dxpl_id, H5R_type_t ref_type, void *_ref)
{
H5G_entry_t ent; /* Symbol table entry */
uint8_t *p; /* Pointer to OID to store */
@@ -790,7 +790,7 @@ H5R_get_obj_type(H5F_t *file, H5R_type_t ref_type, void *_ref)
INT32DECODE(p,hobjid.idx);
/* Get the dataset region from the heap (allocate inside routine) */
- if((buf=H5HG_read(ent.file,&hobjid,NULL))==NULL)
+ if((buf=H5HG_read(ent.file,dxpl_id,&hobjid,NULL))==NULL)
HGOTO_ERROR(H5E_REFERENCE, H5E_READERROR, H5G_UNKNOWN, "Unable to read dataset region information");
/* Get the object oid for the dataset */
@@ -813,11 +813,11 @@ H5R_get_obj_type(H5F_t *file, H5R_type_t ref_type, void *_ref)
} /* end switch */
/* Check to make certain that this object hasn't been deleted since the reference was created */
- if(H5O_link(&ent,0)<=0)
+ if(H5O_link(&ent,0,dxpl_id)<=0)
HGOTO_ERROR(H5E_REFERENCE, H5E_LINKCOUNT, H5G_UNKNOWN, "dereferencing deleted object");
/* Get the OID type */
- ret_value=H5G_get_type(&ent);
+ ret_value=H5G_get_type(&ent,dxpl_id);
done:
FUNC_LEAVE_NOAPI(ret_value);
@@ -869,7 +869,7 @@ H5Rget_obj_type(hid_t id, H5R_type_t ref_type, void *_ref)
file=loc->file;
/* Get the object information */
- if ((ret_value=H5R_get_obj_type(file,ref_type,_ref))<0)
+ if ((ret_value=H5R_get_obj_type(file,H5AC_dxpl_id,ref_type,_ref))<0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, H5G_UNKNOWN, "unable to determine object type");
done: