summaryrefslogtreecommitdiffstats
path: root/src/H5FDmpio.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-05-20 16:01:57 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-05-20 16:01:57 (GMT)
commit86170c3d00011e9e323a2b5fcaa4fbfc318c7c9c (patch)
tree7e5a72d6fe88ff305cdd08eb801687d3ad991785 /src/H5FDmpio.c
parentc581a0723521cd20d62f16af39457106735a8629 (diff)
downloadhdf5-86170c3d00011e9e323a2b5fcaa4fbfc318c7c9c.zip
hdf5-86170c3d00011e9e323a2b5fcaa4fbfc318c7c9c.tar.gz
hdf5-86170c3d00011e9e323a2b5fcaa4fbfc318c7c9c.tar.bz2
[svn-r5440] Purpose:
New feature Description: Add 'closing' parameter to H5FDflush and VFL "flush" functions, per http://hdf.ncsa.uiuc.edu/RFC/VFLFlush/VFLFlush.html Platforms tested: IRIX64 6.5 (modi4)
Diffstat (limited to 'src/H5FDmpio.c')
-rw-r--r--src/H5FDmpio.c41
1 files changed, 3 insertions, 38 deletions
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 3572390..e2d0764 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -53,7 +53,6 @@ typedef struct H5FD_mpio_t {
int mpi_rank; /* This process's rank */
int mpi_size; /* Total number of processes */
int mpi_round; /* Current round robin process (for metadata I/O) */
- unsigned closing; /* Indicate that the file is closing immediately after call to flush */
haddr_t eof; /*end-of-file marker */
haddr_t eoa; /*end-of-address marker */
haddr_t last_eoa; /* Last known end-of-address marker */
@@ -83,7 +82,7 @@ static herr_t H5FD_mpio_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, hadd
size_t size, void *buf);
static herr_t H5FD_mpio_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr,
size_t size, const void *buf);
-static herr_t H5FD_mpio_flush(H5FD_t *_file);
+static herr_t H5FD_mpio_flush(H5FD_t *_file, unsigned closing);
/* MPIO-specific file access properties */
typedef struct H5FD_mpio_fapl_t {
@@ -635,37 +634,6 @@ H5FD_mpio_signal_right_neighbor(H5FD_t *_file)
/*-------------------------------------------------------------------------
- * Function: H5FD_mpio_closing
- *
- * Purpose: Indicate that next flush call is immediately prior to a
- * close on the file.
- *
- * Return: Success: non-negative
- * Failure: negative
- *
- * Programmer: Quincey Koziol, May 13, 2002
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5FD_mpio_closing(H5FD_t *_file)
-{
- H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
-
- FUNC_ENTER(H5FD_mpio_closing, FAIL);
- assert(file);
- assert(H5FD_MPIO==file->pub.driver_id);
-
- /* Set the 'closing' flag for this file */
- file->closing=TRUE;
-
- FUNC_LEAVE(SUCCEED);
-}
-
-
-/*-------------------------------------------------------------------------
* Function: H5FD_mpio_fapl_get
*
* Purpose: Returns a file access property list which could be used to
@@ -1638,7 +1606,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_mpio_flush(H5FD_t *_file)
+H5FD_mpio_flush(H5FD_t *_file, unsigned closing)
{
H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
int mpi_code; /* mpi return code */
@@ -1693,14 +1661,11 @@ H5FD_mpio_flush(H5FD_t *_file)
} /* end if */
/* Only sync the file if we are not going to immediately close it */
- if(!file->closing) {
+ if(!closing) {
if (MPI_SUCCESS != (mpi_code=MPI_File_sync(file->f)))
HMPI_GOTO_ERROR(FAIL, "MPI_File_sync failed", mpi_code);
} /* end if */
- /* Reset 'closing' flag now */
- file->closing=FALSE;
-
done:
#ifdef H5FDmpio_DEBUG
if (H5FD_mpio_Debug[(int)'t'])