summaryrefslogtreecommitdiffstats
path: root/src/H5Fistore.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-07-15 15:21:32 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-07-15 15:21:32 (GMT)
commit363ec52b7cab5638e3d1479b67068754a2e10011 (patch)
tree23fb21609fb9a9bbadfee4c13d27326df0413d4b /src/H5Fistore.c
parentc3b0c0f3c4ed622450862fdfd2ade5eb96d4ef1a (diff)
downloadhdf5-363ec52b7cab5638e3d1479b67068754a2e10011.zip
hdf5-363ec52b7cab5638e3d1479b67068754a2e10011.tar.gz
hdf5-363ec52b7cab5638e3d1479b67068754a2e10011.tar.bz2
[svn-r5799] Purpose:
New feature. Description: Added MPI-posix VFL driver. This driver uses MPI to coordinate actions, but performs I/O directly with posix sec(2) I/O functions. This driver should _NOT_ be used if the file accessed is not on a parallel filesystem. Platforms tested: FreeBSD 4.6 (sleipnir) w/parallel & IRIX64 6.5 (modi4) w/parallel
Diffstat (limited to 'src/H5Fistore.c')
-rw-r--r--src/H5Fistore.c44
1 files changed, 33 insertions, 11 deletions
diff --git a/src/H5Fistore.c b/src/H5Fistore.c
index a44ce5a..a9f7f56 100644
--- a/src/H5Fistore.c
+++ b/src/H5Fistore.c
@@ -45,8 +45,9 @@
#include "H5Sprivate.h" /* Dataspaces */
#include "H5Vprivate.h"
-/* MPIO driver needed for special checks */
+/* MPIO & MPIPOSIX drivers needed for special checks */
#include "H5FDmpio.h"
+#include "H5FDmpiposix.h"
/*
* Feature: If this constant is defined then every cache preemption and load
@@ -1781,12 +1782,12 @@ H5F_istore_read(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
#ifdef H5_HAVE_PARALLEL
/*
- * If MPIO is used and file can be written to, we must bypass the
+ * If MPIO or MPIPOSIX is used and file can be written to, we must bypass the
* chunk-cache scheme because other MPI processes could be writing to
* other elements in the same chunk.
* Do a direct write-through of only the elements requested.
*/
- || (IS_H5FD_MPIO(f) && (H5F_ACC_RDWR & f->shared->flags))
+ || ((IS_H5FD_MPIO(f) ||IS_H5FD_MPIPOSIX(f)) && (H5F_ACC_RDWR & f->shared->flags))
#endif /* H5_HAVE_PARALLEL */
) {
H5O_layout_t l; /* temporary layout */
@@ -1965,11 +1966,11 @@ H5F_istore_write(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
#ifdef H5_HAVE_PARALLEL
/*
- * If MPIO is used, must bypass the chunk-cache scheme because other
+ * If MPIO or MPIPOSIX is used, must bypass the chunk-cache scheme because other
* MPI processes could be writing to other elements in the same chunk.
* Do a direct write-through of only the elements requested.
*/
- || (IS_H5FD_MPIO(f) && (H5F_ACC_RDWR & f->shared->flags))
+ || ((IS_H5FD_MPIO(f) ||IS_H5FD_MPIPOSIX(f)) && (H5F_ACC_RDWR & f->shared->flags))
#endif /* H5_HAVE_PARALLEL */
) {
H5O_layout_t l; /* temporary layout */
@@ -2416,10 +2417,22 @@ H5F_istore_allocate(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
} /* end if */
/* Retrieve up MPI parameters */
- if ((mpi_rank=H5FD_mpio_mpi_rank(f->shared->lf))<0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI rank");
- if ((mpi_size=H5FD_mpio_mpi_size(f->shared->lf))<0)
- HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI size");
+ if(IS_H5FD_MPIO(f)) {
+ if ((mpi_rank=H5FD_mpio_mpi_rank(f->shared->lf))<0)
+ HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI rank");
+ if ((mpi_size=H5FD_mpio_mpi_size(f->shared->lf))<0)
+ HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI size");
+ } /* end if */
+ else {
+ /* Sanity Check */
+ assert(IS_H5FD_MPIPOSIX(f));
+
+ /* Get the MPI rank & size */
+ if ((mpi_rank=H5FD_mpiposix_mpi_rank(f->shared->lf))<0)
+ HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI rank");
+ if ((mpi_size=H5FD_mpiposix_mpi_size(f->shared->lf))<0)
+ HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "Can't retrieve MPI size");
+ } /* end else */
/* Loop over all chunks */
carry=0;
@@ -2469,8 +2482,17 @@ H5F_istore_allocate(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
* still writing out chunks and other processes race ahead to read
* them in, getting bogus data.
*/
- if (MPI_Barrier(H5FD_mpio_communicator(f->shared->lf)))
- HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "MPI_Barrier failed");
+ if(IS_H5FD_MPIO(f)) {
+ if (MPI_Barrier(H5FD_mpio_communicator(f->shared->lf)))
+ HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "MPI_Barrier failed");
+ } /* end if */
+ else {
+ /* Sanity Check */
+ assert(IS_H5FD_MPIPOSIX(f));
+
+ if (MPI_Barrier(H5FD_mpiposix_communicator(f->shared->lf)))
+ HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "MPI_Barrier failed");
+ } /* end else */
} /* end if */
done: