diff options
author | Robb Matzke <matzke@llnl.gov> | 1999-08-17 19:44:03 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1999-08-17 19:44:03 (GMT) |
commit | 0b7babc994e59b88a10fb55345159ea6951e72b1 (patch) | |
tree | b7780802df93acfa6a6ed09d84b17002c516e599 /src | |
parent | cc89b8a605dfc7370cb760e6c3d7339cbf1e9884 (diff) | |
download | hdf5-0b7babc994e59b88a10fb55345159ea6951e72b1.zip hdf5-0b7babc994e59b88a10fb55345159ea6951e72b1.tar.gz hdf5-0b7babc994e59b88a10fb55345159ea6951e72b1.tar.bz2 |
[svn-r1573] Changes since 19990817
----------------------
./src/H5D.c
./src/H5F.c
./src/H5Fistore.c
./src/H5Smpio.c
Incorporated previous changes into MPIO special cases. These
are mostly due to the fact that most of the members of the
file->shared->fapl struct have been moved into the
file->shared->file->shared struct (`file' is an H5F_t*).
./src/H5I.c
Fixed a bug with closing the library w.r.t. the VFL stuff. The
VFL layer introduced reference counts on object ID's and the
library termination functions freed these objects in the wrong
order. Now H5I_clear_group() does not normally remove objects
with a reference count larger than one because it assumes that
those objects are currently in use by the library.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5.c | 7 | ||||
-rw-r--r-- | src/H5D.c | 22 | ||||
-rw-r--r-- | src/H5Distore.c | 4 | ||||
-rw-r--r-- | src/H5F.c | 6 | ||||
-rw-r--r-- | src/H5Fistore.c | 4 | ||||
-rw-r--r-- | src/H5I.c | 13 | ||||
-rw-r--r-- | src/H5Smpio.c | 2 |
7 files changed, 39 insertions, 19 deletions
@@ -101,8 +101,13 @@ H5_init_library(void) /* * Initialize interfaces that might not be able to initialize themselves - * soon enough. + * soon enough. The file interface must be initialized because calling + * H5Pcreate() might require the H5F_access_dflt to be initialized. */ + if (H5F_init()<0) { + HRETURN_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, + "unable to initialize file interface"); + } if (H5T_init()<0) { HRETURN_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to initialize type interface"); @@ -900,7 +900,7 @@ H5D_create(H5G_entry_t *loc, const char *name, const H5T_t *type, #ifdef HAVE_PARALLEL /* If MPIO is used, no filter support yet. */ - if (H5FD_MPIO==f->shared->fapl->driver_id && + if (H5FD_MPIO==f->shared->driver_id && create_parms->pline.nfilters>0) { HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, NULL, "Parallel IO does not support filters yet"); @@ -1277,7 +1277,7 @@ H5D_open_oid(H5G_entry_t *ent) #ifdef HAVE_PARALLEL /* If MPIO is used, no filter support yet. */ - if (H5FD_MPIO==dataset->ent.file->shared->fapl->driver_id && + if (H5FD_MPIO==dataset->ent.file->shared->driver_id && dataset->create_parms->pline.nfilters>0){ HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, NULL, "Parallel IO does not support filters yet"); @@ -1511,8 +1511,9 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, { /* Collective access is not permissible with the MPIO driver */ H5FD_mpio_dxpl_t *dx; - if (H5FD_MPIO==dataset->ent.file->shared->fapl->driver_id && - (dx=dataset->ent.file->shared->fapl->driver_info) && + if (H5FD_MPIO==dataset->ent.file->shared->driver_id && + H5FD_MPIO==xfer_parms->driver_id && + (dx=xfer_parms->driver_info) && H5FD_MPIO_COLLECTIVE==dx->xfer_mode) { HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL, "collective access not permissible"); @@ -1556,7 +1557,7 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, * (the latter in case the arguments to sconv_funcs * turn out to be inappropriate for MPI-IO). */ if (H5_mpi_opt_types_g && - H5FD_MPIO==dataset->ent.file->shared->fapl->driver_id) { + H5FD_MPIO==dataset->ent.file->shared->driver_id) { sconv->read = H5S_mpio_spaces_read; } #endif /*HAVE_PARALLEL*/ @@ -1867,7 +1868,7 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, /* If MPIO is used, no VL datatype support yet. */ /* This is because they use the global heap in the file and we don't */ /* support parallel access of that yet */ - if (H5FD_MPIO==dataset->ent.file->shared->fapl->driver_id && + if (H5FD_MPIO==dataset->ent.file->shared->driver_id && H5T_get_class(mem_type)==H5T_VLEN) { HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL, "Parallel IO does not support writing VL datatypes yet"); @@ -1877,7 +1878,7 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, /* If MPIO is used, no dataset region reference support yet. */ /* This is because they use the global heap in the file and we don't */ /* support parallel access of that yet */ - if (H5FD_MPIO==dataset->ent.file->shared->fapl->driver_id && + if (H5FD_MPIO==dataset->ent.file->shared->driver_id && H5T_get_class(mem_type)==H5T_REFERENCE && H5T_get_ref_type(mem_type)==H5R_DATASET_REGION) { HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL, @@ -1917,8 +1918,9 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, { /* Collective access is not permissible with the MPIO driver */ H5FD_mpio_dxpl_t *dx; - if (H5FD_MPIO==dataset->ent.file->shared->fapl->driver_id && - (dx=dataset->ent.file->shared->fapl->driver_info) && + if (H5FD_MPIO==dataset->ent.file->shared->driver_id && + H5FD_MPIO==xfer_parms->driver_id && + (dx=xfer_parms->driver_info) && H5FD_MPIO_COLLECTIVE==dx->xfer_mode) { HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL, "collective access not permissible"); @@ -1969,7 +1971,7 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, * (the latter in case the arguments to sconv_funcs * turn out to be inappropriate for MPI-IO). */ if (H5_mpi_opt_types_g && - H5FD_MPIO==dataset->ent.file->shared->fapl->driver_id) { + H5FD_MPIO==dataset->ent.file->shared->driver_id) { sconv->write = H5S_mpio_spaces_write; } #endif /*HAVE_PARALLEL*/ diff --git a/src/H5Distore.c b/src/H5Distore.c index eca1cd2..acbc4a2 100644 --- a/src/H5Distore.c +++ b/src/H5Distore.c @@ -1675,7 +1675,7 @@ H5F_istore_read(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, * MPI processes could be writing to other elements in the same chunk. * Do a direct write-through of only the elements requested. */ - if (H5FD_MPIO==f->shared->fapl->driver_id) { + if (H5FD_MPIO==f->shared->driver_id) { H5F_istore_ud1_t udata; H5O_layout_t l; /* temporary layout */ @@ -1849,7 +1849,7 @@ H5F_istore_write(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, * MPI processes could be writing to other elements in the same chunk. * Do a direct write-through of only the elements requested. */ - if (H5FD_MPIO==f->shared->fapl->driver_id) { + if (H5FD_MPIO==f->shared->driver_id) { H5F_istore_ud1_t udata; H5O_layout_t l; /* temporary layout */ if (H5F_istore_get_addr(f, layout, chunk_offset, &udata)<0){ @@ -719,9 +719,9 @@ H5F_new(H5F_file_t *shared, hid_t fcpl_id, hid_t fapl_id) * does not permit caching. (maybe able to relax it for * read only open.) */ - if (H5FD_MPIO==f->shared->fapl->driver_id){ - f->shared->fapl->rdcc_nbytes = 0; - f->shared->fapl->mdc_nelmts = 0; + if (H5FD_MPIO==f->shared->driver_id){ + f->shared->rdcc_nbytes = 0; + f->shared->mdc_nelmts = 0; } #endif diff --git a/src/H5Fistore.c b/src/H5Fistore.c index eca1cd2..acbc4a2 100644 --- a/src/H5Fistore.c +++ b/src/H5Fistore.c @@ -1675,7 +1675,7 @@ H5F_istore_read(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, * MPI processes could be writing to other elements in the same chunk. * Do a direct write-through of only the elements requested. */ - if (H5FD_MPIO==f->shared->fapl->driver_id) { + if (H5FD_MPIO==f->shared->driver_id) { H5F_istore_ud1_t udata; H5O_layout_t l; /* temporary layout */ @@ -1849,7 +1849,7 @@ H5F_istore_write(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout, * MPI processes could be writing to other elements in the same chunk. * Do a direct write-through of only the elements requested. */ - if (H5FD_MPIO==f->shared->fapl->driver_id) { + if (H5FD_MPIO==f->shared->driver_id) { H5F_istore_ud1_t udata; H5O_layout_t l; /* temporary layout */ if (H5F_istore_get_addr(f, layout, chunk_offset, &udata)<0){ @@ -368,6 +368,13 @@ H5I_nmembers(H5I_type_t grp) * failed is not removed. This function returns failure if * items could not be removed. * + * Robb Matzke, 1999-08-17 + * If the object reference count is larger than one then it must + * be because the library is using the object internally. This + * happens for instance for file driver ID's which are stored in + * things like property lists, files, etc. Objects that have a + * reference count larger than one are not affected unless FORCE + * is non-zero. *------------------------------------------------------------------------- */ herr_t @@ -407,6 +414,12 @@ H5I_clear_group(H5I_type_t grp, hbool_t force) */ for (i=0; i<grp_ptr->hash_size; i++) { for (cur=grp_ptr->id_list[i]; cur; cur=next) { + /* + * Do nothing to the object if the reference count is larger than + * one and forcing is off. + */ + if (!force && cur->count>1) continue; + /* Free the object regardless of reference count */ if (grp_ptr->free_func && (grp_ptr->free_func)(cur->obj_ptr)<0) { if (force) { diff --git a/src/H5Smpio.c b/src/H5Smpio.c index e2c1375..d75c5cc 100644 --- a/src/H5Smpio.c +++ b/src/H5Smpio.c @@ -539,7 +539,7 @@ H5S_mpio_spaces_xfer(H5F_t *f, const struct H5O_layout_t *layout, assert (file_space); assert (mem_space); assert (buf); - assert (H5FD_MPIO==f->shared->fapl->driver_id); + assert (H5FD_MPIO==f->shared->driver_id); /* INCOMPLETE!!! rky 980816 */ /* Currently can only handle H5D_CONTIGUOUS layout */ |