summaryrefslogtreecommitdiffstats
path: root/src/H5CX.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-03-18 23:36:49 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-03-18 23:36:49 (GMT)
commitf38864920d4e0bc8adaf9a23fd3f775ad90cb3f7 (patch)
treeb5f709e5415db2f1a9287b43565fea826b3018f5 /src/H5CX.c
parent4a17aff4085ad6ee265b95730aca3f493056dec8 (diff)
parent7aa4eb1b04014f1ad7e1c857ca6509aeeb6c0ae7 (diff)
downloadhdf5-f38864920d4e0bc8adaf9a23fd3f775ad90cb3f7.zip
hdf5-f38864920d4e0bc8adaf9a23fd3f775ad90cb3f7.tar.gz
hdf5-f38864920d4e0bc8adaf9a23fd3f775ad90cb3f7.tar.bz2
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/hdffv/hdf5 into merge_func_enter_vol
Plus initial steps toward merging API context push into FUNC_ENTER_API* macros
Diffstat (limited to 'src/H5CX.c')
-rw-r--r--src/H5CX.c57
1 files changed, 56 insertions, 1 deletions
diff --git a/src/H5CX.c b/src/H5CX.c
index 3bf732b..406481a 100644
--- a/src/H5CX.c
+++ b/src/H5CX.c
@@ -83,13 +83,14 @@ typedef struct H5CX_t {
haddr_t tag; /* Current object's tag (ohdr chunk #0 address) */
/* Metadata cache info */
- H5AC_ring_t ring; /* Current metadata cache ring for entries*/
+ H5AC_ring_t ring; /* Current metadata cache ring for entries */
#ifdef H5_HAVE_PARALLEL
/* Parallel I/O settings */
hbool_t coll_metadata_read; /* Whether to use collective I/O for metadata read */
MPI_Datatype btype; /* MPI datatype for buffer, when using collective I/O */
MPI_Datatype ftype; /* MPI datatype for file, when using collective I/O */
+ hbool_t mpi_file_flushing; /* Whether an MPI-opened file is being flushed */
#endif /* H5_HAVE_PARALLEL */
/* Cached DXPL properties */
@@ -998,6 +999,32 @@ H5CX_get_mpi_coll_datatypes(MPI_Datatype *btype, MPI_Datatype *ftype)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5CX_get_mpi_coll_datatypes() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5CX_get_mpi_file_flushing
+ *
+ * Purpose: Retrieves the "flushing an MPI-opened file" flag for the current API call context.
+ *
+ * Return: TRUE / FALSE on success / <can't fail>
+ *
+ * Programmer: Quincey Koziol
+ * March 17, 2018
+ *
+ *-------------------------------------------------------------------------
+ */
+hbool_t
+H5CX_get_mpi_file_flushing(void)
+{
+ H5CX_node_t **head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ /* Sanity check */
+ HDassert(head && *head);
+
+ FUNC_LEAVE_NOAPI((*head)->ctx.mpi_file_flushing)
+} /* end H5CX_get_mpi_file_flushing() */
#endif /* H5_HAVE_PARALLEL */
@@ -2548,6 +2575,34 @@ H5CX_set_mpio_coll_opt(H5FD_mpio_collective_opt_t mpio_coll_opt)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5CX_set_mpio_coll_opt() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5CX_set_mpi_file_flushing
+ *
+ * Purpose: Sets the "flushing an MPI-opened file" flag for the current API call context.
+ *
+ * Return: <none>
+ *
+ * Programmer: Quincey Koziol
+ * March 170 2018
+ *
+ *-------------------------------------------------------------------------
+ */
+void
+H5CX_set_mpi_file_flushing(hbool_t flushing)
+{
+ H5CX_node_t **head = H5CX_get_my_context(); /* Get the pointer to the head of the API context, for this thread */
+
+ FUNC_ENTER_NOAPI_NOINIT_NOERR
+
+ /* Sanity check */
+ HDassert(head && *head);
+
+ (*head)->ctx.mpi_file_flushing = flushing;
+
+ FUNC_LEAVE_NOAPI_VOID
+} /* end H5CX_set_mpi_file_flushing() */
#endif /* H5_HAVE_PARALLEL */