Last change
on this file since 27202 was 27202, checked in by jdquinn, 3 years ago |
CHG: Varied clean up
|
-
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 | # Configure
|
---|
27 | #
|
---|
28 | # NOTE:
|
---|
29 | # - Added -Wno-error=implicit-function-declaration to CFLAGS for Clang >= 12.
|
---|
30 | # (may need to remove it for earlier versions not using the C99 standard).
|
---|
31 | # - Added -fallow-argument-mismatch to FFLAGS in order to clear,
|
---|
32 | #
|
---|
33 | # error: The Fortran compiler gfortran will not compile files that call
|
---|
34 | # the same routine with arguments of different types.
|
---|
35 | #
|
---|
36 | # for gfortran 10 or later (may need to remove it for earlier versions).
|
---|
37 | #
|
---|
38 | cd ${PETSC_DIR}
|
---|
39 | ./config/configure.py \
|
---|
40 | --prefix="${PREFIX}" \
|
---|
41 | --PETSC_DIR="${PETSC_DIR}" \
|
---|
42 | --CFLAGS="-Wno-error=implicit-function-declaration" \
|
---|
43 | --FFLAGS="-fallow-argument-mismatch" \
|
---|
44 | --with-debugging=0 \
|
---|
45 | --with-valgrind=0 \
|
---|
46 | --with-x=0 \
|
---|
47 | --with-ssl=0 \
|
---|
48 | --with-pic=1 \
|
---|
49 | --download-fblaslapack=1 \
|
---|
50 | --download-mpich=1 \
|
---|
51 | --download-metis=1 \
|
---|
52 | --download-parmetis=1 \
|
---|
53 | --download-scalapack=1 \
|
---|
54 | --download-mumps=1 \
|
---|
55 | --download-zlib=1 \
|
---|
56 | --download-hdf5=1
|
---|
57 |
|
---|
58 | # Compile and install
|
---|
59 | make
|
---|
60 | make install
|
---|
Note:
See
TracBrowser
for help on using the repository browser.