-
Notifications
You must be signed in to change notification settings - Fork 3
/
install-3.21-andes.sh
executable file
·48 lines (39 loc) · 1.09 KB
/
install-3.21-andes.sh
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
set -eu
## Constants
VER="3.21.2"
PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" # DO NOT CHANGE THIS
PREFIX="${ISSM_DIR}/externalpackages/petsc/install" # Set to location where external package should be installed
# Download source
$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-${VER}.tar.gz" "petsc-${VER}.tar.gz"
# Unpack source
tar -zxvf petsc-${VER}.tar.gz
# Cleanup
rm -rf ${PREFIX} ${PETSC_DIR}
mkdir -p ${PETSC_DIR}
# Move source to $PETSC_DIR
mv petsc-${VER}/* ${PETSC_DIR}
rm -rf petsc-${VER}
#CC=icx CXX=icx FC=ifx \
# Configure
cd ${PETSC_DIR}
./config/configure.py \
CC=icx CXX=icpx FC=ifx \
COPTFLAGS="-g -O3" CXXOPTFLAGS="-g -O3" FOPTFLAGS="-g -O3" \
--prefix="${PREFIX}" \
--PETSC_DIR="${PETSC_DIR}" \
--with-make-np=20 \
--with-debugging=0 \
--with-valgrind=0 \
--with-x=0 \
--with-ssl=0 \
--with-pic=1 \
--with-blas-lapack-dir=$MKL_ROOT \
--download-metis=1 \
--download-mpich=1 \
--download-parmetis=1 \
--download-scalapack=1 \
--download-mumps=1
# Compile and install
make
make install