Skip to content

Commit 376279f

Browse files
CHG: adding install-3.23-mac.sh
1 parent e4a322a commit 376279f

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/bin/bash
2+
set -eu
3+
4+
## Constants
5+
#
6+
VER="3.23.4"
7+
8+
PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" # DO NOT CHANGE THIS
9+
PREFIX="${ISSM_DIR}/externalpackages/petsc/install" # Set to location where external package should be installed
10+
11+
# Environment
12+
if [ -z ${LDFLAGS+x} ]; then
13+
LDFLAGS=""
14+
fi
15+
16+
# Download source
17+
${ISSM_DIR}/scripts/DownloadExternalPackage.sh "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-${VER}.tar.gz" "petsc-${VER}.tar.gz"
18+
19+
# Unpack source
20+
tar -zxvf petsc-${VER}.tar.gz
21+
22+
# Cleanup
23+
rm -rf ${PREFIX} ${PETSC_DIR}
24+
mkdir -p ${PETSC_DIR}
25+
26+
# Move source to $PETSC_DIR
27+
mv petsc-${VER}/* ${PETSC_DIR}
28+
rm -rf petsc-${VER}
29+
30+
# Configure
31+
cd ${PETSC_DIR}
32+
./configure \
33+
--prefix="${PREFIX}" \
34+
--PETSC_DIR="${PETSC_DIR}" \
35+
--with-debugging=0 \
36+
--with-valgrind=0 \
37+
--with-x=0 \
38+
--with-ssl=0 \
39+
--with-pic=1 \
40+
--LDFLAGS="-Wl,-ld_classic" \
41+
--download-metis=1 \
42+
--download-mpich=1 \
43+
--download-mumps=1 \
44+
--download-parmetis=1 \
45+
--download-scalapack=1 \
46+
--download-zlib=1
47+
48+
# Compile and install
49+
make
50+
make install

0 commit comments

Comments
 (0)