install_petsc.sh 801 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#! /bin/bash

set -e
set -x

ROOT=${PWD}

if [ ! -d install/ ]; then
   mkdir -p install
fi
cd install

# install petsc
if [ ! -d petsc ]; then
   curl -o petsc.tar.gz "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.5.4.tar.gz"
   mkdir petsc_tmp
   tar --strip-components=1 -xf petsc.tar.gz -C petsc_tmp
   rm petsc.tar.gz
   cd petsc_tmp
   # minimal petsc configuration, just for test purposes
   ./configure --prefix=${ROOT}/install/petsc --with-pic=1 --with-debugging=0 \
               --with-clanguage=c++ --with-cxx-dialect=c++11 \
               --with-metis=1 --download-metis=yes \
               --with-parmetis=1 --download-parmetis=yes \
               --with-fblaslapack=1 --download-fblaslapack=yes
   make && make install
   cd ${ROOT}/install
   rm -rf petsc_tmp
fi