From 27a91f2684e7af8f124cdc4af0d1421b194262f5 Mon Sep 17 00:00:00 2001
From: Pietro Incardona <i-bird@private-incardon-3.mpi-cbg.de>
Date: Thu, 9 Jun 2016 17:48:02 +0200
Subject: [PATCH] Fixing installation

---
 example/Vector/2_molecular_dynamic/main.cpp | 7 +++++--
 script/install_PETSC.sh                     | 4 +++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/example/Vector/2_molecular_dynamic/main.cpp b/example/Vector/2_molecular_dynamic/main.cpp
index d07b0ffd3..b8ae1efe0 100644
--- a/example/Vector/2_molecular_dynamic/main.cpp
+++ b/example/Vector/2_molecular_dynamic/main.cpp
@@ -335,13 +335,16 @@ int main(int argc, char* argv[])
 		}
 
 		if (i % 100 == 0)
-		{
-			vd.write("particles",f);
+		{	
+			vd.deleteGhost();
+			vd.write("particles_",f);
 			double energy = calc_energy(vd,NN,L);
 			auto & vcl = create_vcluster();
 			vcl.sum(energy);
 			vcl.execute();
 
+			vd.ghost_get<>();
+
 			x.add(i);
 			y.add({energy});
 			if (vcl.getProcessUnitID() == 0)
diff --git a/script/install_PETSC.sh b/script/install_PETSC.sh
index 4c1b8e071..cbc08d16f 100755
--- a/script/install_PETSC.sh
+++ b/script/install_PETSC.sh
@@ -103,8 +103,10 @@ if [ ! -d "$1/TRILINOS" ]; then
   cd build
 
   ### On clang we have no openMP
+  petsc_openmp=""
   if [ x"$dgc_compiler" == x"clang++" ]; then
     conf_trl_openmp="-D Trilinos_ENABLE_OpenMP=OFF"
+    petsc_openmp="--with-openmp=yes"
   else
     conf_trl_openmp="-D Trilinos_ENABLE_OpenMP=ON"
   fi
@@ -286,7 +288,7 @@ cd petsc-3.6.4
 
 echo "./configure --with-cxx-dialect=C++11 --with-mpi-dir=$1/MPI  $configure_options  --prefix=$1/PETSC"
 
-./configure --with-cxx-dialect=C++11 --with-openmp=yes  --with-mpi-dir=$1/MPI  $configure_options --with-mumps-lib="$MUMPS_extra_lib"  --prefix=$1/PETSC
+./configure --with-cxx-dialect=C++11 $petsc_openmp --with-mpi-dir=$1/MPI  $configure_options --with-mumps-lib="$MUMPS_extra_lib"  --prefix=$1/PETSC
 make all test
 make install
 
-- 
GitLab