Skip to content

Commit c15f2a6

Browse files
CHG: Fixes for latest PETSc version install script
1 parent b3c0a8b commit c15f2a6

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

externalpackages/petsc/install-3.22-linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ cd ${PETSC_DIR}
2727
./configure \
2828
--prefix="${PREFIX}" \
2929
--PETSC_DIR="${PETSC_DIR}" \
30-
--CFLAGS="-g -O2" --CXXFLAGS="-g -O2" --FFLAGS="-g -O2" \
30+
--LDFLAGS="${LDFLAGS}" \
3131
--with-debugging=0 \
3232
--with-valgrind=0 \
3333
--with-x=0 \

externalpackages/petsc/install-3.22-mac-static.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ cd ${PETSC_DIR}
4747
--with-ssl=0 \
4848
--download-fblaslapack=1 \
4949
--download-metis=1 \
50-
--download-mpich="https://www.mpich.org/static/downloads/4.2.0/mpich-4.2.0.tar.gz" \
50+
--download-mpich=1 \
5151
--download-mumps=1 \
5252
--download-parmetis=1 \
5353
--download-scalapack=1 \

externalpackages/petsc/install-3.22-mac.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ cd ${PETSC_DIR}
3030
./configure \
3131
--prefix="${PREFIX}" \
3232
--PETSC_DIR="${PETSC_DIR}" \
33-
--CFLAGS="-g -O2" --CXXFLAGS="-g -O2" --FFLAGS="-g -O2" \
34-
--LDFLAGS="-Wl,-ld_classic -Wl,-commons,use_dylibs" \
35-
--with-debugging=1 \
33+
--LDFLAGS="${LDFLAGS}" \
34+
--with-debugging=0 \
3635
--with-valgrind=0 \
3736
--with-x=0 \
3837
--with-ssl=0 \
@@ -48,3 +47,9 @@ cd ${PETSC_DIR}
4847
# Compile and install
4948
make
5049
make install
50+
51+
# Need to make sure classic linker is used (should be able to remove this once MPICH fixes it)
52+
if [[ ${LDFLAGS} =~ "-Wl,-ld_classic" ]]; then
53+
sed -i'' -e 's/-Wl,-commons,use_dylibs//g' ${PREFIX}/bin/mpicc
54+
sed -i'' -e 's/-Wl,-commons,use_dylibs//g' ${PREFIX}/bin/mpicxx
55+
fi

0 commit comments

Comments
 (0)