aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364>2007-12-06 10:46:32 +0000
committertradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364>2007-12-06 10:46:32 +0000
commitac0441559f03fa142c708a7ccac8024817de9781 (patch)
tree65f7c24f21530ed1da6f883e45a074e776511c6e
parentfd167c4784f1bb960cbc082ef335a2318aa4a54c (diff)
Use MPI_COMM_WORLD as communicator if a NULL pointer was passed for the cGH
argument into PUGH's overloadable for CCTK_Barrier(). This allows CCTK_Barrier() to be called even before a grid hierarchy exists (eg. during PARAM_CHECK). git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@488 b61c5cb5-eaca-4651-9a7a-d64986f99364
-rw-r--r--src/Comm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Comm.c b/src/Comm.c
index fdcde7c..68e8fa7 100644
--- a/src/Comm.c
+++ b/src/Comm.c
@@ -510,7 +510,8 @@ int PUGH_DisableGArrayGroupComm(pGH *pughGH, int first_var, pComm *groupcomm)
int PUGH_Barrier(const cGH *GH)
{
#ifdef CCTK_MPI
- CACTUS_MPI_ERROR (MPI_Barrier (PUGH_pGH (GH)->PUGH_COMM_WORLD));
+ CACTUS_MPI_ERROR (MPI_Barrier (GH ? PUGH_pGH (GH)->PUGH_COMM_WORLD :
+ MPI_COMM_WORLD));
#else
GH = GH;
#endif