Last change
on this file since 25199 was 25199, checked in by jdquinn, 5 years ago |
CHG: Clean up
|
-
Property svn:executable
set to
*
|
File size:
1.5 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | set -eu
|
---|
3 |
|
---|
4 |
|
---|
5 | # NOTE: There is a single difference between the Linux and macOS
|
---|
6 | # configurations, which is the addition of the -static-libgfortran
|
---|
7 | # option to FFLAGS on the macOS static configurations. For the sake of
|
---|
8 | # consistency, we maintain separate files for each, respective Linux and
|
---|
9 | # macOS configuration.
|
---|
10 |
|
---|
11 | ## Constants
|
---|
12 | #
|
---|
13 | VER="3.12.3"
|
---|
14 |
|
---|
15 | # Download source
|
---|
16 | $ISSM_DIR/scripts/DownloadExternalPackage.sh "https://issm.ess.uci.edu/files/externalpackages/petsc-lite-${VER}.tar.gz" "petsc-${VER}.tar.gz"
|
---|
17 |
|
---|
18 | # Unpack source
|
---|
19 | tar -zxvf petsc-${VER}.tar.gz
|
---|
20 |
|
---|
21 | # Cleanup
|
---|
22 | rm -rf install src
|
---|
23 | mkdir install src
|
---|
24 |
|
---|
25 | # Move source to 'src' directory
|
---|
26 | mv petsc-${VER}/* src/
|
---|
27 | rm -rf petsc-${VER}
|
---|
28 |
|
---|
29 | # Configure
|
---|
30 | #
|
---|
31 | # NOTE: Cannot use --with-fpic option when compiling static libs,
|
---|
32 | #
|
---|
33 | # Cannot determine compiler PIC flags if shared libraries is turned off
|
---|
34 | # Either run using --with-shared-libraries or --with-pic=0 and supply the
|
---|
35 | # compiler PIC flag via CFLAGS, CXXXFLAGS, and FCFLAGS
|
---|
36 | #
|
---|
37 | cd src
|
---|
38 | ./config/configure.py \
|
---|
39 | --prefix="${ISSM_DIR}/externalpackages/petsc/install" \
|
---|
40 | --PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" \
|
---|
41 | --with-shared-libraries=0 \
|
---|
42 | --CFLAGS="-fPIC" \
|
---|
43 | --CXXFLAGS="-fPIC" \
|
---|
44 | --FFLAGS="-fPIC -static-libgfortran" \
|
---|
45 | --with-debugging=0 \
|
---|
46 | --with-valgrind=0 \
|
---|
47 | --with-x=0 \
|
---|
48 | --with-ssl=0 \
|
---|
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.