From c9e9c366c890d62b5d521a07b8920b818d4a49cc Mon Sep 17 00:00:00 2001
From: Giovanni Bussi <giovanni.bussi@gmail.com>
Date: Mon, 1 Feb 2016 15:58:21 +0100
Subject: [PATCH] Added Barrier

This barrier is apparently useless since it comes
just before a Bcast.

Anyway, it looks like it is solving an issue that appeared on
TRAVIS (at least on my laptop) so I add it here.

Related to #183
---
 src/tools/OFile.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/tools/OFile.cpp b/src/tools/OFile.cpp
index 2f9c587cb..ebd837a21 100644
--- a/src/tools/OFile.cpp
+++ b/src/tools/OFile.cpp
@@ -55,6 +55,15 @@ size_t OFile::llwrite(const char*ptr,size_t s){
       r=fwrite(ptr,1,s,fp);
     }
   }
+//  This barrier is apparently useless since it comes
+//  just before a Bcast.
+//  
+//  Anyway, it looks like it is solving an issue that appeared on
+//  TRAVIS (at least on my laptop) so I add it here.
+//  GB
+  if(comm) comm->Barrier();
+
+
   if(comm) comm->Bcast(r,0);
   return r;
 }
-- 
GitLab