|
Last change
on this file was 28013, checked in by Mathieu Morlighem, 2 years ago |
|
merged trunk-jpl and trunk for revision 28011
|
-
Property svn:executable
set to
*
|
|
File size:
1.5 KB
|
| Line | |
|---|
| 1 | #!/bin/bash
|
|---|
| 2 | set -eu
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 | ## Constants
|
|---|
| 6 | #
|
|---|
| 7 | VER="3.14.6"
|
|---|
| 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://issm.ess.uci.edu/files/externalpackages/petsc-lite-${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 | # Modify source so that Python 3 can be used to compile PETSc
|
|---|
| 27 | sed -i'' 's|#!/usr/bin/env python|#!/usr/bin/env python3|g' ${PETSC_DIR}/config/configure.py
|
|---|
| 28 |
|
|---|
| 29 | # Modify source so that Python >= 3.9 can be used to compile PETSc
|
|---|
| 30 | sed -i'' 's|thread.isAlive|thread.is_alive|g' ${PETSC_DIR}/config/BuildSystem/script.py
|
|---|
| 31 |
|
|---|
| 32 | # Configure
|
|---|
| 33 | #
|
|---|
| 34 | # NOTE:
|
|---|
| 35 | # - Added -Wno-error=implicit-function-declaration to CFLAGS for Clang >= 12.
|
|---|
| 36 | # (may need to remove it for earlier versions not using the C99 standard).
|
|---|
| 37 | #
|
|---|
| 38 | cd ${PETSC_DIR}
|
|---|
| 39 | ./configure \
|
|---|
| 40 | --prefix="${PREFIX}" \
|
|---|
| 41 | --PETSC_DIR="${PETSC_DIR}" \
|
|---|
| 42 | --CFLAGS="-Wno-error=implicit-function-declaration" \
|
|---|
| 43 | --with-debugging=0 \
|
|---|
| 44 | --with-valgrind=0 \
|
|---|
| 45 | --with-x=0 \
|
|---|
| 46 | --with-ssl=0 \
|
|---|
| 47 | --with-pic=1 \
|
|---|
| 48 | --download-fblaslapack=1 \
|
|---|
| 49 | --download-mpich=1 \
|
|---|
| 50 | --download-metis=1 \
|
|---|
| 51 | --download-parmetis=1 \
|
|---|
| 52 | --download-scalapack=1 \
|
|---|
| 53 | --download-mumps=1 \
|
|---|
| 54 | --download-zlib=1
|
|---|
| 55 |
|
|---|
| 56 | # Compile and install
|
|---|
| 57 | make
|
|---|
| 58 | make install
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.