diff options
author | Robb Matzke <matzke@llnl.gov> | 1999-08-10 20:21:32 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1999-08-10 20:21:32 (GMT) |
commit | cbf68fc824f69dcdc0fcd38a83a3fee8c7093c28 (patch) | |
tree | b7075c9f11db1b343593b5e0619a285ccc8418af /src/H5Farray.c | |
parent | 7d949c9da91b33955d4e253c1093a4f23fb63523 (diff) | |
download | hdf5-cbf68fc824f69dcdc0fcd38a83a3fee8c7093c28.zip hdf5-cbf68fc824f69dcdc0fcd38a83a3fee8c7093c28.tar.gz hdf5-cbf68fc824f69dcdc0fcd38a83a3fee8c7093c28.tar.bz2 |
[svn-r1568] Changes since 19990730
----------------------
This extensive change is the virtual file layer implementation. I've
ported and tested the sec2, family, and core drivers and only ported
the mpio driver (Albert will test it). So if you need MPIO I would
recommend sticking with the previous version for a while.
You will get a few compile warnings about split and stdio drivers not
being implemented and possibly tracing information not inserted in
some of the drivers. You can safely ignore them but I plan to fix
them.
I'm still working on the split driver because I just realized that it
needs a part of the VFL that isn't written yet.
Documentation is being updated also because there were some minor
changes (mostly just name changes). It should be available on my web
site later this week.
./MANIFEST
./src/Makefile.in
./src/hdf5.h
./src/H5Flow.c [REMOVED]
./src/H5Fstdio.c [REMOVED]
./src/H5Fsec2.c [REMOVED]
./src/H5Fsplit.c [REMOVED]
./src/H5Fmpio.c [REMOVED]
./src/H5Ffamily.c [REMOVED]
./src/H5Fcore.c [REMOVED]
./src/H5MFpublic.h [REMOVED]
./src/H5FD.c [NEW]
./src/H5FDcore.c [NEW]
./src/H5FDcore.h [NEW]
./src/H5FDfamily.c [NEW]
./src/H5FDfamily.h [NEW]
./src/H5FDmpio.c [NEW]
./src/H5FDmpio.h [NEW]
./src/H5FDprivate.h [NEW]
./src/H5FDpublic.h [NEW]
./src/H5FDsec2.c [NEW]
./src/H5FDsec2.h [NEW]
Removed/added files for virtual file layer.
./bin/trace
./src/H5.c
Removed unused public datatypes and added new VFL public
datatypes.
Changed an error message.
./config/BlankForm
./config/dec-flags
./config/gnu-flags
./config/hpux10.20
./config/hpux9.03
./config/irix5.x
./config/irix6.x
./config/solaris2.x
./config/unicosmk
Removed the H5F_OPT_SEEK and H5F_LOW_DFLT constants from the
configuration since they're no longer applicable. The default
file driver is always the sec2 driver and it always optimizes
calls to lseek() or lseek64().
./config/depend.in
C preprocessor errors generated during automatic dependency
building are sent to /dev/null to prevent them from appearing
twice in the make output.
./src/H5AC.c
./src/H5B.c
./src/H5D.c
./src/H5F.c
./src/H5G.c
./src/H5Gent.c
./src/H5Gnode.c
./src/H5HG.c
./src/H5HL.c
./src/H5O.c
./src/H5Oattr.c
./src/H5Odtype.c
./src/H5Oefl.c
./src/H5Oshared.c
./src/H5T.c
./src/H5detect.c
./test/ohdr.c
Changed H5F_ADDR_UNDEF to HADDR_UNDEF to be more consistent
with the `haddr_t' datatype which is now a public type.
./src/H5D.c
./src/H5P.c
./src/H5Ppublic.h
./src/H5Tconv.c
./test/cmpd_dset.c
./test/dsets.c
./test/overhead.c
./test/tselect.c
./test/tvltypes.c
The H5P_DATASET_XFER constant was changed to H5P_DATA_XFER
because the properties apply to all types of I/O operations,
not just datasets.
./src/H5B.c
./src/H5Bprivate.h
./src/H5D.c
./src/H5Dpublic.h
./src/H5F.c
./src/H5Farray.c
./src/H5Fistore.c
./src/H5Fprivate.h
./src/H5Fpublic.h
./src/H5Gnode.c
./src/H5Gpkg.h
./src/H5HG.c
./src/H5HL.c
./src/H5O.c
./src/H5R.c
./src/H5Sall.c
./src/H5Shyper.c
./src/H5Smpio.c
./src/H5Spoint.c
./src/H5Sprivate.h
./test/big.c
./test/h5test.c
./test/istore.c
./testpar/t_dset.c
./testpar/t_file.c
./tools/h5debug.c
./tools/h5ls.c
Modified to work with the virtual file layer by calling H5FD_*
functions instead of H5F_low_* functions and by passing file
access and data transfer properties by object ID instead of
pointer.
Changed H5D_transfer_t to H5FD_mpio_xfer_t since the
COLLECTIVE vs. INDEPENDENT transfer mode is specific to the
MPIO file driver.
Moved MPIO-specific stuff into the MPIO driver.
./src/H5B.c
./src/H5D.c
./src/H5Fprivate.h
The H5F_mpio_* private functions were renamed and placed in
the H5FDmpio driver except those which appeared in H5Smpio.c.
./src/H5E.c
./src/H5Epublic.h
Added major error number H5E_VFL for virtual file layer
related errors.
./src/H5F.c
./src/H5Fprivate.h
Changed the logic that controls whether the boot block is
written. Instead of assuming that the first call to write the
boot block is only to allocate space, I've added a function
argument which makes this explicit.
Changed the way files are compared so that a driver-defined
comparison function can be called. Files which belong to
different drivers are always considered different.
Removed H5F_driver_t since file drivers are now identified by
object ID instead of a special non-user-extendible datatype.
Removed all the hard-coded low-level file properties which
have been replaced by the various file drivers.
./src/H5I.c
./src/H5Iprivate.h
Added the H5I_inc_ref() which was removed a few months ago
since we finally have a use for it.
./src/H5Ipublic.h
Added the H5I_VFL object ID type to identify file drivers in
the virtual file layer.
./src/H5MF.c
./src/H5MFprivate.h
Moved all the allocation/deallocation code into the virtual
file layer which allows file drivers to override much of it.
./src/H5P.c
./src/H5Ppublic.h
Moved file driver-specific code into the various file driver
files.
The H5Pcopy() and H5Pclose() functions make calls into the
virtual file driver to manage the memory for driver-specific
file access and data transfer properties.
./src/H5private.h
./src/H5public.h
The `haddr_t' type is now public.
./test/tfile.c
Added a few more comments.
Diffstat (limited to 'src/H5Farray.c')
-rw-r--r-- | src/H5Farray.c | 266 |
1 files changed, 153 insertions, 113 deletions
diff --git a/src/H5Farray.c b/src/H5Farray.c index 67c0446..6019f1e 100644 --- a/src/H5Farray.c +++ b/src/H5Farray.c @@ -15,10 +15,15 @@ #include <H5Dprivate.h> #include <H5Eprivate.h> #include <H5Fprivate.h> +#include <H5Iprivate.h> #include <H5MFprivate.h> #include <H5Oprivate.h> +#include <H5Pprivate.h> #include <H5Vprivate.h> +/* MPIO driver functions are needed for some special checks */ +#include <H5FDmpio.h> + /* Interface initialization */ #define PABLO_MASK H5Farray_mask #define INTERFACE_INIT NULL @@ -51,14 +56,14 @@ H5F_arr_create (H5F_t *f, struct H5O_layout_t *layout/*in,out*/) /* check args */ assert (f); assert (layout); - layout->addr = H5F_ADDR_UNDEF; /*just in case we fail*/ + layout->addr = HADDR_UNDEF; /*just in case we fail*/ switch (layout->type) { case H5D_CONTIGUOUS: /* Reserve space in the file for the entire array */ for (i=0, nbytes=1; i<layout->ndims; i++) nbytes *= layout->dim[i]; assert (nbytes>0); - if (H5MF_alloc (f, H5MF_RAW, nbytes, &(layout->addr)/*out*/)<0) { + if (HADDR_UNDEF==(layout->addr=H5MF_alloc(f, H5FD_MEM_DRAW, nbytes))) { HRETURN_ERROR (H5E_IO, H5E_NOSPACE, FAIL, "unable to reserve file space"); } @@ -103,22 +108,24 @@ H5F_arr_create (H5F_t *f, struct H5O_layout_t *layout/*in,out*/) * Friday, January 16, 1998 * * Modifications: - * June 2, 1998 Albert Cheng + * Albert Cheng, 1998-06-02 * Added xfer_mode argument * - * Sep 28, 1998 Robb Matzke + * Robb Matzke, 1998-09-28 * Added the `xfer' argument and removed the `xfer_mode' * argument since it's a field of `xfer'. * + * Robb Matzke, 1999-08-02 + * Data transfer properties are passed by ID since that's how + * the virtual file layer wants them. *------------------------------------------------------------------------- */ herr_t -H5F_arr_read (H5F_t *f, const H5F_xfer_t *xfer, - const struct H5O_layout_t *layout, - const struct H5O_pline_t *pline, const H5O_fill_t *fill, - const struct H5O_efl_t *efl, const hsize_t _hslab_size[], - const hsize_t mem_size[], const hssize_t mem_offset[], - const hssize_t file_offset[], void *_buf/*out*/) +H5F_arr_read(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout, + const struct H5O_pline_t *pline, const H5O_fill_t *fill, + const struct H5O_efl_t *efl, const hsize_t _hslab_size[], + const hsize_t mem_size[], const hssize_t mem_offset[], + const hssize_t file_offset[], void *_buf/*out*/) { uint8_t *buf = (uint8_t*)_buf; /*cast for arithmetic */ hssize_t file_stride[H5O_LAYOUT_NDIMS]; /*strides through file */ @@ -133,27 +140,43 @@ H5F_arr_read (H5F_t *f, const H5F_xfer_t *xfer, haddr_t addr; /*address in file */ intn i, j; /*counters */ hbool_t carray; /*carry for subtraction */ +#ifdef HAVE_PARALLEL + H5FD_mpio_xfer_t xfer_mode=H5FD_MPIO_INDEPENDENT; +#endif - FUNC_ENTER (H5F_arr_read, FAIL); + FUNC_ENTER(H5F_arr_read, FAIL); /* Check args */ - assert (f); - assert (layout); - assert (_hslab_size); - assert (file_offset); - assert (mem_offset); - assert (mem_size); - assert (buf); + assert(f); + assert(layout); + assert(_hslab_size); + assert(file_offset); + assert(mem_offset); + assert(mem_size); + assert(buf); /* Make a local copy of size so we can modify it */ - H5V_vector_cpy (layout->ndims, hslab_size, _hslab_size); + H5V_vector_cpy(layout->ndims, hslab_size, _hslab_size); #ifdef HAVE_PARALLEL - if (xfer->xfer_mode==H5D_XFER_COLLECTIVE){ - if (layout->type != H5D_CONTIGUOUS) - HRETURN_ERROR (H5E_DATASET, H5E_READERROR, FAIL, - "collective access on non-contiguous datasets not " - "supported yet"); + { + /* Get the transfer mode */ + H5F_xfer_t *dxpl; + H5FD_mpio_dxpl_t *dx; + if (H5P_DEFAULT!=dxpl_id && (dxpl=H5I_object(dxpl_id)) && + H5FD_MPIO==dxpl->driver_id && (dx=dxpl->driver_info) && + H5FD_MPIO_INDEPENDENT!=dx->xfer_mode) { + xfer_mode = dx->xfer_mode; + } + } +#endif + +#ifdef HAVE_PARALLEL + /* Collective MPIO access is unsupported for non-contiguous datasets */ + if (H5D_CONTIGUOUS!=layout->type && H5FD_MPIO_COLLECTIVE==xfer_mode) { + HRETURN_ERROR (H5E_DATASET, H5E_READERROR, FAIL, + "collective access on non-contiguous datasets not " + "supported yet"); } #endif #ifdef QAK @@ -177,8 +200,8 @@ H5F_arr_read (H5F_t *f, const H5F_xfer_t *xfer, */ for (i=0; i<ndims; i++) { if (mem_offset[i]<0 || file_offset[i]<0) { - HRETURN_ERROR (H5E_IO, H5E_READERROR, FAIL, - "negative offsets are not valid"); + HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, + "negative offsets are not valid"); } } @@ -186,8 +209,8 @@ H5F_arr_read (H5F_t *f, const H5F_xfer_t *xfer, * Filters cannot be used for contiguous data. */ if (pline && pline->nfilters>0) { - HRETURN_ERROR (H5E_IO, H5E_READERROR, FAIL, - "filters are not allowed for contiguous data"); + HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, + "filters are not allowed for contiguous data"); } /* @@ -195,12 +218,12 @@ H5F_arr_read (H5F_t *f, const H5F_xfer_t *xfer, * and memory. Optimize the strides to result in the fewest number of * I/O requests. */ - mem_start = H5V_hyper_stride (ndims, hslab_size, mem_size, - mem_offset, mem_stride/*out*/); - file_start = H5V_hyper_stride (ndims, hslab_size, layout->dim, - file_offset, file_stride/*out*/); - H5V_stride_optimize2 (&ndims, &elmt_size, hslab_size, - mem_stride, file_stride); + mem_start = H5V_hyper_stride(ndims, hslab_size, mem_size, + mem_offset, mem_stride/*out*/); + file_start = H5V_hyper_stride(ndims, hslab_size, layout->dim, + file_offset, file_stride/*out*/); + H5V_stride_optimize2(&ndims, &elmt_size, hslab_size, + mem_stride, file_stride); /* * Initialize loop variables. The loop is a multi-dimensional loop @@ -208,8 +231,8 @@ H5F_arr_read (H5F_t *f, const H5F_xfer_t *xfer, * element of IDX is treated as a digit with IDX[0] being the least * significant digit. */ - H5V_vector_cpy (ndims, idx, hslab_size); - nelmts = H5V_vector_reduce_product (ndims, hslab_size); + H5V_vector_cpy(ndims, idx, hslab_size); + nelmts = H5V_vector_reduce_product(ndims, hslab_size); if (efl && efl->nused>0) { addr = 0; } else { @@ -223,19 +246,20 @@ H5F_arr_read (H5F_t *f, const H5F_xfer_t *xfer, * memory. */ #ifdef HAVE_PARALLEL - if (xfer->xfer_mode==H5D_XFER_COLLECTIVE){ - /* Currently supports same number of collective access. - * Need to be changed LATER to combine all reads into one - * collective MPIO call. + if (H5FD_MPIO_COLLECTIVE==xfer_mode){ + /* + * Currently supports same number of collective access. Need to + * be changed LATER to combine all reads into one collective MPIO + * call. */ unsigned long max, min, temp; temp = nelmts; assert(temp==nelmts); /* verify no overflow */ MPI_Allreduce(&temp, &max, 1, MPI_UNSIGNED_LONG, MPI_MAX, - f->shared->access_parms->u.mpio.comm); + H5FD_mpio_communicator(f->shared->lf)); MPI_Allreduce(&temp, &min, 1, MPI_UNSIGNED_LONG, MPI_MIN, - f->shared->access_parms->u.mpio.comm); + H5FD_mpio_communicator(f->shared->lf)); #ifdef AKC printf("nelmts=%lu, min=%lu, max=%lu\n", temp, min, max); #endif @@ -250,18 +274,17 @@ H5F_arr_read (H5F_t *f, const H5F_xfer_t *xfer, /* Read from file */ if (efl && efl->nused>0) { - if (H5O_efl_read (f, efl, addr, elmt_size, buf)<0) { - HRETURN_ERROR (H5E_IO, H5E_READERROR, FAIL, - "external data read failed"); + if (H5O_efl_read(f, efl, addr, elmt_size, buf)<0) { + HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, + "external data read failed"); } - } else if (H5F_block_read (f, addr, elmt_size, xfer, buf)<0) { - HRETURN_ERROR (H5E_IO, H5E_READERROR, FAIL, - "block read failed"); + } else if (H5F_block_read(f, addr, elmt_size, dxpl_id, buf)<0) { + HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, + "block read failed"); } /* Decrement indices and advance pointers */ for (j=ndims-1, carray=TRUE; j>=0 && carray; --j) { - addr += file_stride[j]; buf += mem_stride[j]; @@ -277,29 +300,29 @@ H5F_arr_read (H5F_t *f, const H5F_xfer_t *xfer, * into a proper hyperslab. */ if (efl && efl->nused>0) { - HRETURN_ERROR (H5E_IO, H5E_UNSUPPORTED, FAIL, - "chunking and external files are mutually " - "exclusive"); + HRETURN_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, + "chunking and external files are mutually " + "exclusive"); } for (i=0; i<layout->ndims; i++) { if (0!=mem_offset[i] || hslab_size[i]!=mem_size[i]) { - HRETURN_ERROR (H5E_IO, H5E_UNSUPPORTED, FAIL, - "unable to copy into a proper hyperslab"); + HRETURN_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, + "unable to copy into a proper hyperslab"); } } - if (H5F_istore_read (f, xfer, layout, pline, fill, file_offset, + if (H5F_istore_read(f, dxpl_id, layout, pline, fill, file_offset, hslab_size, buf)<0) { - HRETURN_ERROR (H5E_IO, H5E_READERROR, FAIL, "chunked read failed"); + HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, "chunked read failed"); } break; default: - assert ("not implemented yet" && 0); - HRETURN_ERROR (H5E_IO, H5E_UNSUPPORTED, FAIL, - "unsupported storage layout"); + assert("not implemented yet" && 0); + HRETURN_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, + "unsupported storage layout"); } - FUNC_LEAVE (SUCCEED); + FUNC_LEAVE(SUCCEED); } @@ -324,23 +347,25 @@ H5F_arr_read (H5F_t *f, const H5F_xfer_t *xfer, * Friday, January 16, 1998 * * Modifications: - * June 2, 1998 Albert Cheng + * Albert Cheng, 1998-06-02 * Added xfer_mode argument * - * Sep 28, 1998 Robb Matzke + * Robb Matzke, 1998-09-28 * Added `xfer' argument, removed `xfer_mode' argument since it * is a member of H5F_xfer_t. * + * Robb Matzke, 1999-08-02 + * Data transfer properties are passed by ID since that's how + * the virtual file layer wants them. *------------------------------------------------------------------------- */ herr_t -H5F_arr_write (H5F_t *f, const H5F_xfer_t *xfer, - const struct H5O_layout_t *layout, - const struct H5O_pline_t *pline, - const struct H5O_fill_t *fill, const struct H5O_efl_t *efl, - const hsize_t _hslab_size[], const hsize_t mem_size[], - const hssize_t mem_offset[], const hssize_t file_offset[], - const void *_buf) +H5F_arr_write(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout, + const struct H5O_pline_t *pline, + const struct H5O_fill_t *fill, const struct H5O_efl_t *efl, + const hsize_t _hslab_size[], const hsize_t mem_size[], + const hssize_t mem_offset[], const hssize_t file_offset[], + const void *_buf) { const uint8_t *buf = (const uint8_t *)_buf; /*cast for arithmetic */ hssize_t file_stride[H5O_LAYOUT_NDIMS]; /*strides through file */ @@ -355,8 +380,11 @@ H5F_arr_write (H5F_t *f, const H5F_xfer_t *xfer, haddr_t addr; /*address in file */ intn i, j; /*counters */ hbool_t carray; /*carry for subtraction */ +#ifdef HAVE_PARALLEL + H5FD_mpio_xfer_t xfer_mode=H5FD_MPIO_INDEPENDENT; +#endif - FUNC_ENTER (H5F_arr_write, FAIL); + FUNC_ENTER(H5F_arr_write, FAIL); /* Check args */ assert(f); @@ -368,17 +396,29 @@ H5F_arr_write (H5F_t *f, const H5F_xfer_t *xfer, assert(buf); /* Make a local copy of _size so we can modify it */ - H5V_vector_cpy (layout->ndims, hslab_size, _hslab_size); + H5V_vector_cpy(layout->ndims, hslab_size, _hslab_size); #ifdef HAVE_PARALLEL - if (xfer->xfer_mode==H5D_XFER_COLLECTIVE) { - if (layout->type != H5D_CONTIGUOUS) { - HRETURN_ERROR (H5E_DATASET, H5E_WRITEERROR, FAIL, - "collective access on non-contiguous datasets not " - "supported yet"); + { + /* Get the transfer mode */ + H5F_xfer_t *dxpl; + H5FD_mpio_dxpl_t *dx; + if (H5P_DEFAULT!=dxpl_id && (dxpl=H5I_object(dxpl_id)) && + H5FD_MPIO==dxpl->driver_id && (dx=dxpl->driver_info) && + H5FD_MPIO_INDEPENDENT!=dx->xfer_mode) { + xfer_mode = dx->xfer_mode; } } #endif + +#ifdef HAVE_PARALLEL + if (H5D_CONTIGUOUS!=layout->type && H5FD_MPIO_COLLECTIVE==xfer_mode) { + HRETURN_ERROR (H5E_DATASET, H5E_WRITEERROR, FAIL, + "collective access on non-contiguous datasets not " + "supported yet"); + } +#endif + #ifdef QAK { extern int qak_debug; @@ -403,8 +443,8 @@ H5F_arr_write (H5F_t *f, const H5F_xfer_t *xfer, */ for (i=0; i<ndims; i++) { if (mem_offset[i]<0 || file_offset[i]<0) { - HRETURN_ERROR (H5E_IO, H5E_WRITEERROR, FAIL, - "negative offsets are not valid"); + HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, + "negative offsets are not valid"); } } @@ -412,8 +452,8 @@ H5F_arr_write (H5F_t *f, const H5F_xfer_t *xfer, * Filters cannot be used for contiguous data */ if (pline && pline->nfilters>0) { - HRETURN_ERROR (H5E_IO, H5E_WRITEERROR, FAIL, - "filters are not allowed for contiguous data"); + HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, + "filters are not allowed for contiguous data"); } /* @@ -421,12 +461,12 @@ H5F_arr_write (H5F_t *f, const H5F_xfer_t *xfer, * Optimize the strides to result in the fewest number of I/O * requests. */ - mem_start = H5V_hyper_stride (ndims, hslab_size, mem_size, - mem_offset, mem_stride/*out*/); - file_start = H5V_hyper_stride (ndims, hslab_size, layout->dim, - file_offset, file_stride/*out*/); - H5V_stride_optimize2 (&ndims, &elmt_size, hslab_size, - mem_stride, file_stride); + mem_start = H5V_hyper_stride(ndims, hslab_size, mem_size, + mem_offset, mem_stride/*out*/); + file_start = H5V_hyper_stride(ndims, hslab_size, layout->dim, + file_offset, file_stride/*out*/); + H5V_stride_optimize2(&ndims, &elmt_size, hslab_size, + mem_stride, file_stride); /* * Initialize loop variables. The loop is a multi-dimensional loop @@ -434,8 +474,8 @@ H5F_arr_write (H5F_t *f, const H5F_xfer_t *xfer, * element of IDX is treated as a digit with IDX[0] being the least * significant digit. */ - H5V_vector_cpy (ndims, idx, hslab_size); - nelmts = H5V_vector_reduce_product (ndims, hslab_size); + H5V_vector_cpy(ndims, idx, hslab_size); + nelmts = H5V_vector_reduce_product(ndims, hslab_size); if (efl && efl->nused>0) { addr = 0; } else { @@ -449,19 +489,20 @@ H5F_arr_write (H5F_t *f, const H5F_xfer_t *xfer, * disk. */ #ifdef HAVE_PARALLEL - if (xfer->xfer_mode==H5D_XFER_COLLECTIVE){ - /* Currently supports same number of collective access. - * Need to be changed LATER to combine all writes into one - * collective MPIO call. + if (H5FD_MPIO_COLLECTIVE==xfer_mode){ + /* + * Currently supports same number of collective access. Need to + * be changed LATER to combine all writes into one collective + * MPIO call. */ unsigned long max, min, temp; temp = nelmts; assert(temp==nelmts); /* verify no overflow */ MPI_Allreduce(&temp, &max, 1, MPI_UNSIGNED_LONG, MPI_MAX, - f->shared->access_parms->u.mpio.comm); + H5FD_mpio_communicator(f->shared->lf)); MPI_Allreduce(&temp, &min, 1, MPI_UNSIGNED_LONG, MPI_MIN, - f->shared->access_parms->u.mpio.comm); + H5FD_mpio_communicator(f->shared->lf)); #ifdef AKC printf("nelmts=%lu, min=%lu, max=%lu\n", temp, min, max); #endif @@ -477,18 +518,17 @@ H5F_arr_write (H5F_t *f, const H5F_xfer_t *xfer, /* Write to file */ if (efl && efl->nused>0) { - if (H5O_efl_write (f, efl, addr, elmt_size, buf)<0) { - HRETURN_ERROR (H5E_IO, H5E_READERROR, FAIL, - "external data write failed"); + if (H5O_efl_write(f, efl, addr, elmt_size, buf)<0) { + HRETURN_ERROR(H5E_IO, H5E_READERROR, FAIL, + "external data write failed"); } - } else if (H5F_block_write(f, addr, elmt_size, xfer, buf)<0) { - HRETURN_ERROR (H5E_IO, H5E_WRITEERROR, FAIL, - "block write failed"); + } else if (H5F_block_write(f, addr, elmt_size, dxpl_id, buf)<0) { + HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, + "block write failed"); } /* Decrement indices and advance pointers */ for (j=ndims-1, carray=TRUE; j>=0 && carray; --j) { - addr += file_stride[j]; buf += mem_stride[j]; @@ -505,27 +545,27 @@ H5F_arr_write (H5F_t *f, const H5F_xfer_t *xfer, * from a proper hyperslab. */ if (efl && efl->nused>0) { - HRETURN_ERROR (H5E_IO, H5E_UNSUPPORTED, FAIL, - "chunking and external files are mutually " - "exclusive"); + HRETURN_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, + "chunking and external files are mutually " + "exclusive"); } for (i=0; i<layout->ndims; i++) { if (0!=mem_offset[i] || hslab_size[i]!=mem_size[i]) { - HRETURN_ERROR (H5E_IO, H5E_UNSUPPORTED, FAIL, - "unable to copy from a proper hyperslab"); + HRETURN_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, + "unable to copy from a proper hyperslab"); } } - if (H5F_istore_write (f, xfer, layout, pline, fill, file_offset, - hslab_size, buf)<0) { - HRETURN_ERROR (H5E_IO, H5E_WRITEERROR, FAIL, - "chunked write failed"); + if (H5F_istore_write(f, dxpl_id, layout, pline, fill, file_offset, + hslab_size, buf)<0) { + HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, + "chunked write failed"); } break; default: - assert ("not implemented yet" && 0); - HRETURN_ERROR (H5E_IO, H5E_UNSUPPORTED, FAIL, - "unsupported storage layout"); + assert("not implemented yet" && 0); + HRETURN_ERROR(H5E_IO, H5E_UNSUPPORTED, FAIL, + "unsupported storage layout"); } FUNC_LEAVE (SUCCEED); |