From e5a4072babaaeaccfd96d9857d433deaa417503f Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 29 Nov 2011 19:02:14 -0500 Subject: Improve named barriers Introduce dist::barrier as low-level implementation of a named barrier. Use it in Carpet::NamedBarrier. Use the above in almost all barrier calls. --- Carpet/CarpetInterp/src/interp.cc | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'Carpet/CarpetInterp') diff --git a/Carpet/CarpetInterp/src/interp.cc b/Carpet/CarpetInterp/src/interp.cc index b1cc62348..2a7a62fdb 100644 --- a/Carpet/CarpetInterp/src/interp.cc +++ b/Carpet/CarpetInterp/src/interp.cc @@ -329,15 +329,9 @@ namespace CarpetInterp { if (barriers) { - static unsigned int magic = 0x2ad072fbUL; // a random starting value - unsigned int recv = magic; - MPI_Bcast (& recv, 1, MPI_UNSIGNED, 0, dist::comm()); - if (recv != magic) { - CCTK_WARN (CCTK_WARN_ABORT, - "Inconsistent communication schedule: not all processes call CarpetInterp"); - } - ++ magic; - MPI_Barrier (dist::comm()); + Carpet::NamedBarrier (cctkGH, + 696681976, + "CarpetInterp::Carpet_DriverInterpolate"); } ////////////////////////////////////////////////////////////////////// -- cgit v1.2.3