From bb964e0e1c59599be04f41ed4fd7a9a0f251a8e0 Mon Sep 17 00:00:00 2001 From: Ian Hinder Date: Fri, 25 Oct 2013 16:14:15 +0200 Subject: Carpet: Add a barrier between prolongation and sync controlled by sync_barriers parameter --- Carpet/Carpet/src/Comm.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Carpet/Carpet/src/Comm.cc b/Carpet/Carpet/src/Comm.cc index b1c5cf2ab..4d23b6754 100644 --- a/Carpet/Carpet/src/Comm.cc +++ b/Carpet/Carpet/src/Comm.cc @@ -163,7 +163,15 @@ namespace Carpet { Carpet::NamedBarrier(cctkGH, 8472211063, "CARPET_MPI_BARRIER_PROLONGATE_SYNC"); #endif - + + if (sync_barriers) + { + static Timers::Timer barrier_timer ("ProlongateSyncBarrier",0,true); + barrier_timer.start(); + CCTK_Barrier(cctkGH); + barrier_timer.stop(); + } + // synchronise ghostzones if (sync_during_time_integration or local_do_prolongate) { static Timers::Timer timer ("Sync"); -- cgit v1.2.3