Dependency - Geodels/eSCAPE GitHub Wiki

About | Input file | Dependency | Docker | Local Installation | HPC Installation | Tutorials

← Previous topic: Input file | Next topic: Using Docker →


Below is a step by step guide to install eSCAPE on Linux system.

Content

Update your system and install default packages

Here we install python3

apt-get update -qq 
apt-get install -yq --no-install-recommends bash-completion build-essential 
apt-get install -yq --no-install-recommends python3-minimal python3-dev python3-pip
apt-get install -yq --no-install-recommends python3-tk python3-dbg cmake 
apt-get install -yq --no-install-recommends python3-setuptools wget gfortran  

MPI

MPICH_VERSION="3.3"
MPICH_CONFIGURE_OPTIONS="--enable-fast=all,O3 --prefix=/opt/mpich"
MPICH_MAKE_OPTIONS="-j4"
mkdir /tmp/mpich-build
wget http://www.mpich.org/static/downloads/${MPICH_VERSION}/mpich-${MPICH_VERSION}.tar.gz
tar xvzf mpich-${MPICH_VERSION}.tar.gz 
cd mpich-${MPICH_VERSION}              
./configure ${MPICH_CONFIGURE_OPTIONS} 
make ${MPICH_MAKE_OPTIONS}             
make install                           
ldconfig                               
cd /tmp                                
rm -fr *

export MPI_DIR=/opt/mpich
export PATH=${MPI_DIR}/bin:$PATH

PIP installation

pip3 install -U setuptools  
pip3 install -U wheel       
pip3 install --no-cache-dir numpy jupyter ipython plotly 
pip3 install --no-cache-dir matplotlib ipython scipy 
MPICC=${MPI_DIR}/mpicc MPICXX=${MPI_DIR}/mpicxx MPIFC=${MPI_DIR}/mpifort pip3 install --no-cache-dir mpi4py

PETSC

mkdir /tmp/petsc-build
export PETSC_VERSION="3.11.2"
wget http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-${PETSC_VERSION}.tar.gz 
tar zxf petsc-lite-${PETSC_VERSION}.tar.gz && cd petsc-${PETSC_VERSION}   

Configure:

./configure --with-debugging=0 --prefix=/opt/petsc                     
            --COPTFLAGS="-g -O3" --CXXOPTFLAGS="-g -O3" --FOPTFLAGS="-g -O3" 
            --with-zlib=1                   
            --download-fblaslapack=1        
            --download-ctetgen=1            
            --download-triangle=1           
            --download-hdf5=1               
            --download-mumps=1              
            --download-parmetis=1           
            --download-metis=1              
            --download-hypre=1              
            --download-scalapack=1       
            --useThreads=1               
            --with-shared-libraries      
            --with-cxx-dialect=C++11     

Install:

make PETSC_DIR=/tmp/petsc-build/petsc-${PETSC_VERSION} PETSC_ARCH=arch-linux-c-opt all     
make PETSC_DIR=/tmp/petsc-build/petsc-${PETSC_VERSION} PETSC_ARCH=arch-linux-c-opt install 
make PETSC_DIR=/opt/petsc PETSC_ARCH="" test 

Clean:

cd /tmp 
rm -fr *
export PETSC_DIR=/opt/petsc
export PATH=${PETSC_DIR}/bin:$PATH

Additional dependencies for eSCAPE

First HDF5 and PETSC4PY

export PYTHONPATH=$PYTHONPATH:/usr/lib
CC=h5pcc HDF5_MPI="ON" HDF5_DIR=${PETSC_DIR} python3 -m pip install --no-cache-dir --no-binary=h5py h5py python3 -m pip install --no-cache-dir petsc4py

Fillit

mkdir /workspace/lib
export F90=gfortran 
git clone -b python3 https://github.com/Geodels/fillit.git  
cd fillit  
python3 setup.py install

and using pip:

pip3 install pandas meshio rasterio meshplex ruamel.yaml

Install eSCAPE

cd /workspace/lib
git clone -b petsc3.11.2 https://github.com/Geodels/eSCAPE.git 
cd eSCAPE 
export F90=gfortran 
export PETSC_DIR=/opt/petsc 
export PETSC_ARCH=arch-linux-c-opt 
python setup.py install 
cd .. 

Install eSCAPE-demo

cd examples
git clone -b petsc3.11.2 https://github.com/Geodels/eSCAPE-demo.git 

Notebook packages

To run eSCAPE-demo and build the triangular meshes required by eSCAPE several packages are needed:

apt-get update -qq 
apt-get install -yq --no-install-recommends gmsh python3-gdal gdal-bin
apt-get install -yq --no-install-recommends libgeos++ libgeos-dev libgdal-dev libproj-dev

and

pip3 install setuptools wheel
pip3 install pathlib shapely descartes geopy pygeotools pygmsh stripy

GMT color scale...

git clone https://github.com/j08lue/pycpt.git 
cd pycpt 
git checkout b45f720d09da79bcd567c5cbba9a554b0a7cc1d9 
python3 setup.py install 
cd .. 
rm -rf pycpt