Skip to content

Commit 6c1248e

Browse files
CHG: Updated PETSc version
1 parent edf75a0 commit 6c1248e

32 files changed

+156
-30
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/bash
2+
set -eu
3+
4+
5+
## Constants
6+
#
7+
VER="3.22.0"
8+
9+
PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" # DO NOT CHANGE THIS
10+
PREFIX="${ISSM_DIR}/externalpackages/petsc/install" # Set to location where external package should be installed
11+
12+
# Download source
13+
${ISSM_DIR}/scripts/DownloadExternalPackage.sh "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-${VER}.tar.gz" "petsc-${VER}.tar.gz"
14+
15+
# Unpack source
16+
tar -zxvf petsc-${VER}.tar.gz
17+
18+
# Cleanup
19+
rm -rf ${PREFIX} ${PETSC_DIR}
20+
mkdir -p ${PETSC_DIR}
21+
22+
# Move source to $PETSC_DIR
23+
mv petsc-${VER}/* ${PETSC_DIR}
24+
rm -rf petsc-${VER}
25+
26+
# Configure
27+
#
28+
# NOTE:
29+
# - Cannot use --with-fpic option when compiling static libs,
30+
#
31+
# Cannot determine compiler PIC flags if shared libraries is turned off
32+
# Either run using --with-shared-libraries or --with-pic=0 and supply the
33+
# compiler PIC flag via CFLAGS, CXXXFLAGS, and FCFLAGS
34+
#
35+
cd ${PETSC_DIR}
36+
./configure \
37+
--prefix="${PREFIX}" \
38+
--PETSC_DIR="${PETSC_DIR}" \
39+
--with-shared-libraries=0 \
40+
--CFLAGS="-fPIC" \
41+
--CXXFLAGS="-fPIC" \
42+
--FFLAGS="-fPIC" \
43+
--with-debugging=0 \
44+
--with-valgrind=0 \
45+
--with-x=0 \
46+
--with-ssl=0 \
47+
--download-fblaslapack=1 \
48+
--download-metis=1 \
49+
--download-mpich=1 \
50+
--download-mumps=1 \
51+
--download-parmetis=1 \
52+
--download-scalapack=1 \
53+
--download-zlib=1
54+
55+
# Compile and install
56+
make
57+
make install
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#!/bin/bash
2+
set -eu
3+
4+
5+
## Constants
6+
#
7+
VER="3.22.0"
8+
9+
PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" # DO NOT CHANGE THIS
10+
PREFIX="${ISSM_DIR}/externalpackages/petsc/install" # Set to location where external package should be installed
11+
12+
# Download source
13+
${ISSM_DIR}/scripts/DownloadExternalPackage.sh "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-${VER}.tar.gz" "petsc-${VER}.tar.gz"
14+
15+
# Unpack source
16+
tar -zxvf petsc-${VER}.tar.gz
17+
18+
# Cleanup
19+
rm -rf ${PREFIX} ${PETSC_DIR}
20+
mkdir -p ${PETSC_DIR}
21+
22+
# Move source to $PETSC_DIR
23+
mv petsc-${VER}/* ${PETSC_DIR}
24+
rm -rf petsc-${VER}
25+
26+
# Configure
27+
#
28+
# NOTE:
29+
# - Cannot use --with-fpic option when compiling static libs,
30+
#
31+
# Cannot determine compiler PIC flags if shared libraries is turned off
32+
# Either run using --with-shared-libraries or --with-pic=0 and supply the
33+
# compiler PIC flag via CFLAGS, CXXXFLAGS, and FCFLAGS
34+
#
35+
cd ${PETSC_DIR}
36+
./configure \
37+
--prefix="${PREFIX}" \
38+
--PETSC_DIR="${PETSC_DIR}" \
39+
--LDFLAGS="${LDFLAGS}" \
40+
--with-shared-libraries=0 \
41+
--CFLAGS="-fPIC" \
42+
--CXXFLAGS="-fPIC" \
43+
--FFLAGS="-fPIC" \
44+
--with-debugging=0 \
45+
--with-valgrind=0 \
46+
--with-x=0 \
47+
--with-ssl=0 \
48+
--download-fblaslapack=1 \
49+
--download-metis=1 \
50+
--download-mpich="https://www.mpich.org/static/downloads/4.2.0/mpich-4.2.0.tar.gz" \
51+
--download-mumps=1 \
52+
--download-parmetis=1 \
53+
--download-scalapack=1 \
54+
--download-zlib=1
55+
56+
# Compile and install
57+
make
58+
make install
59+
60+
# Need to make symlinks from libmpich* to libmpi*
61+
ln -s ${PREFIX}/lib/libmpi.a ${PREFIX}/lib/libmpich.a
62+
ln -s ${PREFIX}/lib/libmpicxx.a ${PREFIX}/lib/libmpichcxx.a
63+
ln -s ${PREFIX}/lib/libmpifort.a ${PREFIX}/lib/libmpichf90.a
64+
65+
# Need to make sure classic linker is used (should be able to remove this once MPICH fixes it)
66+
if [[ ${LDFLAGS} =~ "-Wl,-ld_classic" ]]; then
67+
sed -i'' -e 's/-Wl,-commons,use_dylibs//g' ${PREFIX}/bin/mpicc
68+
sed -i'' -e 's/-Wl,-commons,use_dylibs//g' ${PREFIX}/bin/mpicxx
69+
fi

jenkins/github-linux-basic-codeql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ ISSM_CONFIG='\
3030
EXTERNALPACKAGES="
3131
autotools install-linux.sh
3232
cmake install.sh
33-
petsc install-3.20-linux.sh
33+
petsc install-3.22-linux.sh
3434
triangle install-linux.sh
3535
m1qn3 install-linux.sh
3636
semic install.sh

jenkins/github_linux_basic

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ISSM_CONFIG='\
3131
EXTERNALPACKAGES="
3232
autotools install-linux.sh
3333
cmake install.sh
34-
petsc install-3.20-linux.sh
34+
petsc install-3.22-linux.sh
3535
triangle install-linux.sh
3636
m1qn3 install-linux.sh
3737
semic install.sh

jenkins/mac-intel-basic

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ ISSM_CONFIG='\
3232
EXTERNALPACKAGES="
3333
autotools install-mac.sh
3434
cmake install.sh
35-
petsc install-3.20-mac.sh
35+
petsc install-3.22-mac.sh
3636
triangle install-mac.sh
3737
m1qn3 install-mac.sh
3838
semic install.sh

jenkins/mac-intel-binaries-matlab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ISSM_CONFIG='\
4848
EXTERNALPACKAGES="
4949
autotools install-mac.sh
5050
cmake install.sh
51-
petsc install-3.20-mac-static.sh
51+
petsc install-3.22-mac-static.sh
5252
gsl install-static.sh
5353
boost install-1.7-mac-static.sh
5454
dakota install-6.2-mac-static.sh

jenkins/mac-intel-binaries-python-3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ ISSM_CONFIG='\
5050
EXTERNALPACKAGES="
5151
autotools install-mac.sh
5252
cmake install.sh
53-
petsc install-3.20-mac-static.sh
53+
petsc install-3.22-mac-static.sh
5454
gsl install-static.sh
5555
boost install-1.7-mac-static.sh
5656
dakota install-6.2-mac-static.sh

jenkins/mac-intel-dakota

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ISSM_CONFIG='\
4646
EXTERNALPACKAGES="
4747
autotools install-mac.sh
4848
cmake install.sh
49-
petsc install-3.20-mac.sh
49+
petsc install-3.22-mac.sh
5050
gsl install.sh
5151
boost install-1.7-mac.sh
5252
dakota install-6.2-mac.sh

jenkins/mac-intel-examples

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ISSM_CONFIG='\
4646
EXTERNALPACKAGES="
4747
autotools install-mac.sh
4848
cmake install.sh
49-
petsc install-3.20-mac.sh
49+
petsc install-3.22-mac.sh
5050
gsl install.sh
5151
boost install-1.7-mac.sh
5252
dakota install-6.2-mac.sh

jenkins/mac-intel-solid_earth

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ ISSM_CONFIG='\
5050
EXTERNALPACKAGES="
5151
autotools install-mac.sh
5252
cmake install.sh
53-
petsc install-3.20-mac.sh
53+
petsc install-3.22-mac.sh
5454
gsl install.sh
5555
boost install-1.7-mac.sh
5656
dakota install-6.2-mac.sh

0 commit comments

Comments
 (0)