summaryrefslogtreecommitdiffstats
path: root/src/H5Fmpi.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2019-08-23 15:21:08 (GMT)
committerQuincey Koziol <koziol@lbl.gov>2019-08-23 15:21:08 (GMT)
commit884ad149e29f7c99487af676f0bbcd88cbf2735f (patch)
treee68eda1f03f26c2c6a08b638b78e5b4ea71d3caf /src/H5Fmpi.c
parentf0272e4945f047f17043b484db594df131222f1e (diff)
parentf42c7cc0d85cc5b232afd621711fdbd64f6e19d9 (diff)
downloadhdf5-884ad149e29f7c99487af676f0bbcd88cbf2735f.zip
hdf5-884ad149e29f7c99487af676f0bbcd88cbf2735f.tar.gz
hdf5-884ad149e29f7c99487af676f0bbcd88cbf2735f.tar.bz2
Merge pull request #1889 in HDFFV/hdf5 from ~KOZIOL/hdf5:shared_file_ptr to develop
* commit 'f42c7cc0d85cc5b232afd621711fdbd64f6e19d9': Fix major error codes Switch shared file struct name from 'H5F_file_t' to 'H5F_shared_t', to match naming convention for shared structs in rest of library data structures. Small tidy up. Progress toward movig H5MF* API to use shared file pointers instead of top file pointers. Progress on moving the H5MF* interface to using shared file pointers instead of top file pointers. Begin converting the H5MF interface to use shared file pointers instead of top file pointers. Progress toward moving the dataset routines to using the 'shared' file pointer instead of the 'top' file pointer. Begin converting dataset code to use shared file pointer instead of top file pointer. Finish converting H5PB_* routines to use shared file pointer, instead of top file pointer. First pass of converting H5PB_* routines to use shared file pointers. Rest of changes for 'top' file pointer to 'shared' file pointer for H5F__accum routines. Partial H5F__accum_* routines.
Diffstat (limited to 'src/H5Fmpi.c')
-rw-r--r--src/H5Fmpi.c38
1 files changed, 35 insertions, 3 deletions
diff --git a/src/H5Fmpi.c b/src/H5Fmpi.c
index 12bcbc0..470241b 100644
--- a/src/H5Fmpi.c
+++ b/src/H5Fmpi.c
@@ -130,7 +130,7 @@ H5F_mpi_get_rank(const H5F_t *f)
/* Dispatch to driver */
if ((ret_value = H5FD_mpi_get_rank(f->shared->lf)) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTGET, (-1), "driver get_rank request failed")
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "driver get_rank request failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -162,7 +162,7 @@ H5F_mpi_get_comm(const H5F_t *f)
/* Dispatch to driver */
if ((ret_value = H5FD_mpi_get_comm(f->shared->lf)) == MPI_COMM_NULL)
- HGOTO_ERROR(H5E_VFL, H5E_CANTGET, MPI_COMM_NULL, "driver get_comm request failed")
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, MPI_COMM_NULL, "driver get_comm request failed")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -170,6 +170,38 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5F_shared_mpi_get_size
+ *
+ * Purpose: Retrieves the size of an MPI process.
+ *
+ * Return: Success: The size (positive)
+ *
+ * Failure: Negative
+ *
+ * Programmer: John Mainzer
+ * Friday, May 6, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+int
+H5F_shared_mpi_get_size(const H5F_shared_t *f_sh)
+{
+ int ret_value = -1;
+
+ FUNC_ENTER_NOAPI((-1))
+
+ HDassert(f_sh);
+
+ /* Dispatch to driver */
+ if((ret_value = H5FD_mpi_get_size(f_sh->lf)) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "driver get_size request failed")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5F_shared_mpi_get_size() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5F_mpi_get_size
*
* Purpose: Retrieves the size of an MPI process.
@@ -194,7 +226,7 @@ H5F_mpi_get_size(const H5F_t *f)
/* Dispatch to driver */
if ((ret_value = H5FD_mpi_get_size(f->shared->lf)) < 0)
- HGOTO_ERROR(H5E_VFL, H5E_CANTGET, (-1), "driver get_size request failed")
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, (-1), "driver get_size request failed")
done:
FUNC_LEAVE_NOAPI(ret_value)