#!/bin/bash # remove old precice install rm -rf precice-2.1.1 # unpack the tarball tar xvfz precice-2.1.1.tar.gz # set up openfoam environment module purge; module load modules gcc/7.3.0 openmpi/1.10.7 cmake/3.7.2 python/3.7 source /beegfs/users/mtree/OpenFOAM/OpenFOAM-v2006/etc/bashrc # add precice requirements module load eigen/3.3.7 boost/1.73 module switch cmake/3.7.2 cmake/3.15.5 # set install location mkdir -p ~/precice/precice-2.1.1/install PRECICE_PREFIX=~/precice/precice-2.1.1/install # set this to your selected prefix export LD_LIBRARY_PATH=$PRECICE_PREFIX/lib:$LD_LIBRARY_PATH export CPATH=$PRECICE_PREFIX/include:$CPATH # Enable detection with pkg-config and CMake export PKG_CONFIG_PATH=$PRECICE_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH export CMAKE_PREFIX_PATH=$PRECICE_PREFIX:$CMAKE_PREFIX_PATH # make the build directory and navigate to it mkdir -p ~/precice/precice-2.1.1/build cd ~/precice/precice-2.1.1/build # configure build CC=mpicc CXX=mpicxx cmake ~/precice/precice-2.1.1 \ -DBUILD_SHARED_LIBS=ON \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_INSTALL_PREFIX=$PRECICE_PREFIX \ -DMPI_CXX_COMPILER=mpicxx \ -DPRECICE_PETScMapping=OFF \ -DPRECICE_PythonActions=OFF \ -DPRECICE_ALWAYS_VALIDATE_LIBS=ON # compile the build make VERBOSE=1 -j 8 |& tee make.log # test the build ctest -vv |& tee ctest.log # make the install make install |& tee install.log # test the install make test_install |& tee test_install.log