summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5FP.c12
-rw-r--r--src/H5FPpublic.h3
2 files changed, 10 insertions, 5 deletions
diff --git a/src/H5FP.c b/src/H5FP.c
index c73c923..16eff94 100644
--- a/src/H5FP.c
+++ b/src/H5FP.c
@@ -61,14 +61,14 @@ static herr_t H5FP_request_sap_stop(void);
* Modifications:
*/
herr_t
-H5FPinit(MPI_Comm comm, int sap_rank)
+H5FPinit(MPI_Comm comm, int sap_rank, MPI_Comm *sap_comm, MPI_Comm *sap_barrier_comm)
{
MPI_Group sap_group = MPI_GROUP_NULL, sap_barrier_group = MPI_GROUP_NULL;
int mrc, comm_size, my_rank;
herr_t ret_value = SUCCEED;
FUNC_ENTER_API(H5FPinit, FAIL);
- H5TRACE2("e","McIs",comm,sap_rank);
+ H5TRACE4("e","McIs*Mc*Mc",comm,sap_rank,sap_comm,sap_barrier_comm);
/* initialize to NULL so that we can release if an error occurs */
H5FP_request_t = MPI_DATATYPE_NULL;
@@ -76,8 +76,8 @@ H5FPinit(MPI_Comm comm, int sap_rank)
H5FP_read_t = MPI_DATATYPE_NULL;
H5FP_alloc_t = MPI_DATATYPE_NULL;
- H5FP_SAP_COMM = MPI_COMM_NULL;
- H5FP_SAP_BARRIER_COMM = MPI_COMM_NULL;
+ *sap_comm = H5FP_SAP_COMM = MPI_COMM_NULL;
+ *sap_barrier_comm = H5FP_SAP_BARRIER_COMM = MPI_COMM_NULL;
/* Set the global variable to track the SAP's rank */
H5FP_sap_rank = sap_rank;
@@ -86,6 +86,8 @@ H5FPinit(MPI_Comm comm, int sap_rank)
if (MPI_Comm_dup(comm, &H5FP_SAP_COMM) != MPI_SUCCESS)
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "MPI_Comm_dup failed");
+ *sap_comm = H5FP_SAP_COMM;
+
if (MPI_Comm_group(H5FP_SAP_COMM, &sap_group) != MPI_SUCCESS)
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "MPI_Comm_group failed");
@@ -99,6 +101,8 @@ H5FPinit(MPI_Comm comm, int sap_rank)
&H5FP_SAP_BARRIER_COMM) != MPI_SUCCESS)
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "MPI_Comm_create failed");
+ *sap_barrier_comm = H5FP_SAP_BARRIER_COMM;
+
/* Get the size of all the processes (including the SAP) */
if (MPI_Comm_size(H5FP_SAP_COMM, &comm_size) != MPI_SUCCESS)
HGOTO_ERROR(H5E_INTERNAL, H5E_MPI, FAIL, "MPI_Comm_size failed");
diff --git a/src/H5FPpublic.h b/src/H5FPpublic.h
index f282e23..644c363 100644
--- a/src/H5FPpublic.h
+++ b/src/H5FPpublic.h
@@ -20,7 +20,8 @@
extern "C" {
#endif
-H5_DLL herr_t H5FPinit(MPI_Comm comm, int sap_rank);
+H5_DLL herr_t H5FPinit(MPI_Comm comm, int sap_rank,
+ MPI_Comm *FP_comm, MPI_Comm *FP_barrier_comm);
H5_DLL herr_t H5FPfinalize(void);
#ifdef __cplusplus