diff --git a/example/Vector/2_molecular_dynamic/main.cpp b/example/Vector/2_molecular_dynamic/main.cpp index d07b0ffd3906c89f943cc35f6fe8c5903030639e..b8ae1efe0cfe4c2d06df9f8e827cf0b979c2a243 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 4c1b8e0714b64e29fe89285909e39a16fea0be84..cbc08d16fd2297b67f93b0466c4d3d3f71b15152 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