summaryrefslogtreecommitdiffstats
path: root/src/H5Fmpi.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2015-06-21 21:45:01 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2015-06-21 21:45:01 (GMT)
commitcf07aa6803a70f52f6a178219097e9f9e6ee1a51 (patch)
tree38bbce437bb596ee74745a550d37a61260610cf4 /src/H5Fmpi.c
parent48e1bbb0f87c6712189f82a7c5d8835a87d21ee2 (diff)
downloadhdf5-cf07aa6803a70f52f6a178219097e9f9e6ee1a51.zip
hdf5-cf07aa6803a70f52f6a178219097e9f9e6ee1a51.tar.gz
hdf5-cf07aa6803a70f52f6a178219097e9f9e6ee1a51.tar.bz2
[svn-r27261] apply metadata enhancement patch that was based on the mdc 3 branch.
Diffstat (limited to 'src/H5Fmpi.c')
-rw-r--r--src/H5Fmpi.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/H5Fmpi.c b/src/H5Fmpi.c
index 39b8dfa..9f7d316 100644
--- a/src/H5Fmpi.c
+++ b/src/H5Fmpi.c
@@ -77,6 +77,35 @@
#ifdef H5_HAVE_PARALLEL
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_get_mpi_handle
+ *
+ * Purpose: Retrieves MPI File handle.
+ *
+ * Return: Success: The size (positive)
+ * Failure: Negative
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F_get_mpi_handle(const H5F_t *f, MPI_File **f_handle)
+{
+ herr_t ret_value = SUCCEED;
+ hid_t fapl = -1;
+
+ FUNC_ENTER_NOAPI(FAIL)
+
+ assert(f && f->shared);
+
+ /* Dispatch to driver */
+ if ((ret_value = H5FD_get_vfd_handle(f->shared->lf, fapl, (void **)f_handle)) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get mpi file handle")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5F_get_mpi_handle() */
+
/*-------------------------------------------------------------------------
* Function: H5F_mpi_get_rank