Skip to content

Instantly share code, notes, and snippets.

@tkarna
Created July 20, 2018 04:30
Show Gist options
  • Save tkarna/8a523413a1f03968249a8a684679c5f4 to your computer and use it in GitHub Desktop.
Save tkarna/8a523413a1f03968249a8a684679c5f4 to your computer and use it in GitHub Desktop.
script for installing slim 3d on rigilk cluster
#!/bin/bash
# Install SLIM on rigilk cluster
source ~/bin/activate_gcc6.4
source ~/bin/activate_cmake-3.11.4
source ~/bin/activate_openmpi.sh
export BASEDIR=/home/karnat/sources/slim/install-script
mkdir -p $BASEDIR
cd $BASEDIR
echo "*********************"
echo " petsc"
echo "*********************"
mkdir -p $BASEDIR/src/petsc
cd $BASEDIR/src/petsc
wget http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.9.3.tar.gz
tar -xvzf petsc-lite-3.9.3.tar.gz
cd petsc-3.9.3/
./configure CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS --with-mpi-dir=$HOME/local/openmpi-2.1.1 --download-fblaslapack --download-metis --download-parmetis
make PETSC_DIR=$BASEDIR/src/petsc/petsc-3.9.3 PETSC_ARCH=arch-linux2-c-debug all
export PETSC_DIR=$BASEDIR/src/petsc/petsc-3.9.3
export PETSC_ARCH=arch-linux2-c-debug
echo "*********************"
echo " slim"
echo "*********************"
cd $BASEDIR
git clone https://git.immc.ucl.ac.be/slim/slim.git
cd slim
mkdir build
cd build
cmake -DENABLE_GEOTIFF=0 -DPETSC_INC=$PETSC_DIR/$PETSC_ARCH -DMETIS_INCLUDE_DIR=$HOME/local/metis-5.1.0/include/ -DMETIS_LIBRARY=$HOME/local/metis-5.1.0/lib/libmetis.so -DMPI_CXX_COMPILER=$HOME/local/openmpi-2.1.1/bin/mpic++ -DMPI_C_COMPILER=$HOME/local/openmpi-2.1.1/bin/mpicc -DMPI_Fortran_COMPILER=$HOME/local/openmpi-2.1.1/bin/mpif90 ..
make -j 18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment