diff options
author | tradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2007-12-06 10:46:32 +0000 |
---|---|---|
committer | tradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364> | 2007-12-06 10:46:32 +0000 |
commit | ac0441559f03fa142c708a7ccac8024817de9781 (patch) | |
tree | 65f7c24f21530ed1da6f883e45a074e776511c6e /src | |
parent | fd167c4784f1bb960cbc082ef335a2318aa4a54c (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
Diffstat (limited to 'src')
-rw-r--r-- | src/Comm.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |