source: issm/trunk-jpl/externalpackages/petsc/install-3.12-mac-solid_earth-static.sh@ 25199

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
RevLine 
[24649]1#!/bin/bash
2set -eu
3
4
[25199]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
[24649]11## Constants
12#
13VER="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
19tar -zxvf petsc-${VER}.tar.gz
20
21# Cleanup
22rm -rf install src
23mkdir install src
24
25# Move source to 'src' directory
26mv petsc-${VER}/* src/
27rm -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#
37cd 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" \
[24676]44 --FFLAGS="-fPIC -static-libgfortran" \
[24649]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 \
[25199]54 --download-mumps=1 \
55 --download-zlib=1 \
56 --download-hdf5=1
[24649]57
58# Compile and install
59make
60make install
Note: See TracBrowser for help on using the repository browser.