diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5D.c | 4 | ||||
-rw-r--r-- | src/H5Dio.c | 2 | ||||
-rw-r--r-- | src/H5Distore.c | 28 | ||||
-rw-r--r-- | src/H5Dmpio.c | 15 | ||||
-rw-r--r-- | src/H5Dpkg.h | 4 |
5 files changed, 26 insertions, 27 deletions
@@ -2537,10 +2537,6 @@ H5D_open_oid(const H5G_entry_t *ent, hid_t dxpl_id) if(H5P_set(plist, H5D_CRT_DATA_PIPELINE_NAME, &pline) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, NULL, "can't set pipeline") - /* If MPI VFD is used, no filter support yet. */ - if(IS_H5FD_MPI(dataset->ent.file) && pline.nused > 0) - HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, NULL, "Parallel IO does not support filters yet") - /* * Get the raw data layout info. It's actually stored in two locations: * the storage message of the dataset (dataset->storage) and certain diff --git a/src/H5Dio.c b/src/H5Dio.c index 9d5226f..d61ea11 100644 --- a/src/H5Dio.c +++ b/src/H5Dio.c @@ -3266,7 +3266,7 @@ H5D_ioinfo_init(H5D_t *dset, const H5D_dxpl_cache_t *dxpl_cache, hid_t dxpl_id, /* * Check if we can set direct MPI-IO read/write functions */ - opt=H5D_mpio_opt_possible(dset->ent.file,mem_space,file_space,flags,&dset->shared->layout); + opt=H5D_mpio_opt_possible(dset,mem_space,file_space,flags); if(opt==FAIL) HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE, NULL, "invalid check for direct IO dataspace "); diff --git a/src/H5Distore.c b/src/H5Distore.c index 9d991d3..3673cad 100644 --- a/src/H5Distore.c +++ b/src/H5Distore.c @@ -1922,17 +1922,11 @@ HDfprintf(stderr,"%s: buf=%p\n",FUNC,buf); * writing to other elements in the same chunk. Do a direct * read-through of only the elements requested. */ - if ((dset->shared->layout.u.chunk.size>dset->shared->cache.chunk.nbytes && dset->shared->dcpl_cache.pline.nused==0 && chunk_addr!=HADDR_UNDEF) - || (IS_H5FD_MPI(dset->ent.file) && (H5F_ACC_RDWR & H5F_get_intent(dset->ent.file)))) { + if (dset->shared->dcpl_cache.pline.nused==0 && ((dset->shared->layout.u.chunk.size>dset->shared->cache.chunk.nbytes && chunk_addr!=HADDR_UNDEF) + || (IS_H5FD_MPI(dset->ent.file) && (H5F_ACC_RDWR & H5F_get_intent(dset->ent.file))))) { H5D_io_info_t chk_io_info; /* Temporary I/O info object */ H5D_storage_t chk_store; /* Chunk storage information */ -#ifdef H5_HAVE_PARALLEL - /* Additional sanity check when operating in parallel */ - if (chunk_addr==HADDR_UNDEF || dset->shared->dcpl_cache.pline.nused>0) - HGOTO_ERROR (H5E_IO, H5E_WRITEERROR, FAIL, "unable to locate raw data chunk"); -#endif /* H5_HAVE_PARALLEL */ - /* Set up the storage information for the chunk */ chk_store.contig.dset_addr=chunk_addr; chk_store.contig.dset_size=(hsize_t)dset->shared->layout.u.chunk.size; @@ -2125,17 +2119,21 @@ HDfprintf(stderr,"%s: mem_offset_arr[%Zu]=%Hu\n",FUNC,*mem_curr_seq,mem_offset_a * writing to other elements in the same chunk. Do a direct * write-through of only the elements requested. */ - if ((dset->shared->layout.u.chunk.size>dset->shared->cache.chunk.nbytes && dset->shared->dcpl_cache.pline.nused==0 && chunk_addr!=HADDR_UNDEF) - || (IS_H5FD_MPI(dset->ent.file) && (H5F_ACC_RDWR & H5F_get_intent(dset->ent.file)))) { - H5D_io_info_t chk_io_info; /* Temporary I/O info object */ - H5D_storage_t chk_store; /* Chunk storage information */ - #ifdef H5_HAVE_PARALLEL - /* Additional sanity check when operating in parallel */ - if (chunk_addr==HADDR_UNDEF || dset->shared->dcpl_cache.pline.nused>0) + /* Additional sanity checks when operating in parallel */ + if(IS_H5FD_MPI(dset->ent.file)) { + if (chunk_addr==HADDR_UNDEF) HGOTO_ERROR (H5E_IO, H5E_WRITEERROR, FAIL, "unable to locate raw data chunk"); + if (dset->shared->dcpl_cache.pline.nused>0) + HGOTO_ERROR (H5E_IO, H5E_WRITEERROR, FAIL, "cannot write to chunked storage with filters in parallel"); + } /* end if */ #endif /* H5_HAVE_PARALLEL */ + if (dset->shared->dcpl_cache.pline.nused==0 && ((dset->shared->layout.u.chunk.size>dset->shared->cache.chunk.nbytes && chunk_addr!=HADDR_UNDEF) + || (IS_H5FD_MPI(dset->ent.file) && (H5F_ACC_RDWR & H5F_get_intent(dset->ent.file))))) { + H5D_io_info_t chk_io_info; /* Temporary I/O info object */ + H5D_storage_t chk_store; /* Chunk storage information */ + /* Set up the storage information for the chunk */ chk_store.contig.dset_addr=chunk_addr; chk_store.contig.dset_size=(hsize_t)dset->shared->layout.u.chunk.size; diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index 37a49ca..b96d32e 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -67,7 +67,7 @@ H5D_mpio_spaces_xfer(H5D_io_info_t *io_info, size_t elmt_size, *------------------------------------------------------------------------- */ htri_t -H5D_mpio_opt_possible( const H5F_t *file, const H5S_t *mem_space, const H5S_t *file_space, const unsigned flags,const H5O_layout_t *layout) +H5D_mpio_opt_possible( const H5D_t *dset, const H5S_t *mem_space, const H5S_t *file_space, const unsigned flags) { htri_t c1,c2; /* Flags whether a selection is optimizable */ htri_t ret_value=TRUE; @@ -75,6 +75,7 @@ H5D_mpio_opt_possible( const H5F_t *file, const H5S_t *mem_space, const H5S_t *f FUNC_ENTER_NOAPI(H5D_mpio_opt_possible, FAIL); /* Check args */ + assert(dset); assert(mem_space); assert(file_space); @@ -120,10 +121,14 @@ H5D_mpio_opt_possible( const H5F_t *file, const H5S_t *mem_space, const H5S_t *f int mpi_code; /* MPI return code */ unsigned u; /* Local index variable */ + /* Disallow collective I/O if there are any I/O filters on chunks */ + if(dset->shared->dcpl_cache.pline.nused>0) + HGOTO_DONE(FALSE) + /* Getting MPI communicator and rank */ - if((comm = H5F_mpi_get_comm(file))==MPI_COMM_NULL) + if((comm = H5F_mpi_get_comm(dset->ent.file))==MPI_COMM_NULL) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve MPI communicator") - if((mpi_rank = H5F_mpi_get_rank(file))<0) + if((mpi_rank = H5F_mpi_get_rank(dset->ent.file))<0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTGET, FAIL, "can't retrieve MPI rank") /* Currently collective chunking storage @@ -154,8 +159,8 @@ H5D_mpio_opt_possible( const H5F_t *file, const H5S_t *mem_space, const H5S_t *f if(H5S_SELECT_BOUNDS(file_space,startf,endf)==FAIL) HGOTO_ERROR(H5E_DATASPACE, H5E_BADRANGE,FAIL, "invalid check for single selection blocks"); - for(u=0; u < layout->u.chunk.ndims; u++) - chunk_dim[u] = layout->u.chunk.dim[u]; + for(u=0; u < dset->shared->layout.u.chunk.ndims; u++) + chunk_dim[u] = dset->shared->layout.u.chunk.dim[u]; /* Case 1: check whether all hyperslab in this process is inside one chunk. Note: we don't handle when starting point is less than zero since that may cover diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index a5bbeaf..52664f3 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -290,8 +290,8 @@ H5_DLL herr_t H5D_mpio_spaces_write(H5D_io_info_t *io_info, /* MPI-IO function to check if a direct I/O transfer is possible between * memory and the file */ -H5_DLL htri_t H5D_mpio_opt_possible(const H5F_t *file, const H5S_t *mem_space, - const H5S_t *file_space, const unsigned flags, const H5O_layout_t *layout); +H5_DLL htri_t H5D_mpio_opt_possible(const H5D_t *dset, const H5S_t *mem_space, + const H5S_t *file_space, const unsigned flags); #endif /* H5_HAVE_PARALLEL */ /* Testing functions */ |