summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2003-02-21 19:37:25 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2003-02-21 19:37:25 (GMT)
commitd45880ce1de770eae0b6e71cfdcf13ba40f8dea5 (patch)
tree340354cf40a2908bdc0bb9dc4fa87a9efad15e84 /src
parentd84e6e525e28ace2f9163253212436fc09d30b8c (diff)
downloadhdf5-d45880ce1de770eae0b6e71cfdcf13ba40f8dea5.zip
hdf5-d45880ce1de770eae0b6e71cfdcf13ba40f8dea5.tar.gz
hdf5-d45880ce1de770eae0b6e71cfdcf13ba40f8dea5.tar.bz2
[svn-r6427] Purpose:
Update Description: Changed the H5FPinit() function to accept pointers to what the SAP Comm and SAP Barrier Comm should be assigned to. This is the first step in hopefully getting rid of the global versions of them altogether (but we'll see). Platforms tested: Linux
Diffstat (limited to 'src')
-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