summaryrefslogtreecommitdiff
path: root/src/main/WarnLevel.c
diff options
context:
space:
mode:
authortradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2007-12-06 10:46:32 +0000
committertradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac>2007-12-06 10:46:32 +0000
commit063c5c8385dedb21c61e6346470437a4ffdff669 (patch)
tree96ee939ff73370ded9c349c8c20016d82efd080a /src/main/WarnLevel.c
parente39ce419c4fdcb1c84311f5088781ff5ba7b547c (diff)
synchronise all processors after PARAM_CHECK to avoid race conditions in case
of parameter errors (see http://www.cactuscode.org/old/pipermail/developers/2007-December/005480.html) git-svn-id: http://svn.cactuscode.org/flesh/trunk@4440 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/WarnLevel.c')
-rw-r--r--src/main/WarnLevel.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/WarnLevel.c b/src/main/WarnLevel.c
index 457901b1..f0747dd0 100644
--- a/src/main/WarnLevel.c
+++ b/src/main/WarnLevel.c
@@ -1159,6 +1159,19 @@ void CCTKi_FinaliseParamWarn (void)
CCTK_INT cctk_strong_param_check;
+ /*
+ * Let all processors catch up before continuing.
+ *
+ * In case of parameter errors this should avoid racing problems
+ * in parallel simulations using a certain MPI implementation where
+ * the run would die prematurely because some processors called CCTK_Abort()
+ * earlier than others, and in the logfile one couldn't easily find the real
+ * reason for the abort anymore.
+ *
+ * (see http://www.cactuscode.org/old/pipermail/developers/2007-December/005480.html)
+ */
+ CCTK_Barrier(NULL);
+
if (param_errors)
{
cctk_strong_param_check_ptr =