summaryrefslogtreecommitdiffstats
path: root/src/H5D.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2000-03-24 02:12:44 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2000-03-24 02:12:44 (GMT)
commite2c95c478aeb1fbf31b06f6bfcea4b750d414df6 (patch)
tree115fa55209fb1c04d0c60682050277bc0cc2aaef /src/H5D.c
parentf5111838893288dc6f52e19e62b417b9d9dd85cf (diff)
downloadhdf5-e2c95c478aeb1fbf31b06f6bfcea4b750d414df6.zip
hdf5-e2c95c478aeb1fbf31b06f6bfcea4b750d414df6.tar.gz
hdf5-e2c95c478aeb1fbf31b06f6bfcea4b750d414df6.tar.bz2
[svn-r2057] Purpose:
Bug fix for parallel mode. Description: H5FD_mpio_tas_allsame was called for all cases, even when MPIO is not used for access. That corrupted the internal file handle structure. Solution: Define a macro, IS_H5FD_MPIO(f), for testing if f is opened with MPIO access. Will call H5FD_mpio_tas_allsame only if this condition is true. Platform tested: O2K, both -64 and -n32 modes.
Diffstat (limited to 'src/H5D.c')
-rw-r--r--src/H5D.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/H5D.c b/src/H5D.c
index 030a973..2372c76 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -904,7 +904,7 @@ H5D_create(H5G_entry_t *loc, const char *name, const H5T_t *type,
#ifdef H5_HAVE_PARALLEL
/* If MPIO is used, no filter support yet. */
- if (H5FD_MPIO==f->shared->lf->driver_id &&
+ if (IS_H5FD_MPIO(f) &&
create_parms->pline.nfilters>0) {
HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, NULL,
"Parallel IO does not support filters yet");
@@ -1292,7 +1292,7 @@ H5D_open_oid(H5G_entry_t *ent)
#ifdef H5_HAVE_PARALLEL
/* If MPIO is used, no filter support yet. */
- if (H5FD_MPIO==dataset->ent.file->shared->lf->driver_id &&
+ if (IS_H5FD_MPIO(dataset->ent.file) &&
dataset->create_parms->pline.nfilters>0){
HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, NULL,
"Parallel IO does not support filters yet");
@@ -1529,7 +1529,7 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
if (H5FD_MPIO==xfer_parms->driver_id &&
(dx=xfer_parms->driver_info) &&
H5FD_MPIO_COLLECTIVE==dx->xfer_mode) {
- if (H5FD_MPIO!=dataset->ent.file->shared->lf->driver_id)
+ if (!(IS_H5FD_MPIO(dataset->ent.file)))
HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL,
"collective access for MPIO driver only");
}
@@ -1572,7 +1572,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->lf->driver_id) {
+ IS_H5FD_MPIO(dataset->ent.file)) {
sconv->read = H5S_mpio_spaces_read;
}
#endif /*HAVE_PARALLEL*/
@@ -1883,7 +1883,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->lf->driver_id &&
+ if (IS_H5FD_MPIO(dataset->ent.file) &&
H5T_get_class(mem_type)==H5T_VLEN) {
HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL,
"Parallel IO does not support writing VL datatypes yet");
@@ -1893,7 +1893,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->lf->driver_id &&
+ if (IS_H5FD_MPIO(dataset->ent.file) &&
H5T_get_class(mem_type)==H5T_REFERENCE &&
H5T_get_ref_type(mem_type)==H5R_DATASET_REGION) {
HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL,
@@ -1939,7 +1939,7 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
if (H5FD_MPIO==xfer_parms->driver_id &&
(dx=xfer_parms->driver_info) &&
H5FD_MPIO_COLLECTIVE==dx->xfer_mode) {
- if (H5FD_MPIO!=dataset->ent.file->shared->lf->driver_id)
+ if (!(IS_H5FD_MPIO(dataset->ent.file)))
HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, FAIL,
"collective access for MPIO driver only");
}
@@ -1989,7 +1989,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->lf->driver_id) {
+ IS_H5FD_MPIO(dataset->ent.file)) {
sconv->write = H5S_mpio_spaces_write;
}
#endif /*HAVE_PARALLEL*/
@@ -2494,7 +2494,7 @@ H5D_init_storage(H5D_t *dset, const H5S_t *space)
* If the dataset is accessed via parallel I/O, allocate file space
* for all chunks now and initialize each chunk with the fill value.
*/
- if (H5FD_MPIO==dset->ent.file->shared->lf->driver_id) {
+ if (IS_H5FD_MPIO(dset->ent.file)) {
/* We only handle simple data spaces so far */
intn ndims;
hsize_t dim[H5O_LAYOUT_NDIMS];