source: issm/trunk-jpl/externalpackages/petsc/install-3.14-mac.sh@ 25800

Last change on this file since 25800 was 25800, checked in by jdquinn, 4 years ago

CHG: Best guess at required compiler flags plus documentation

  • Property svn:executable set to *
File size: 1.4 KB
RevLine 
[25672]1#!/bin/bash
2set -eu
3
4
5## Constants
6VER="3.14.0"
7
8# Download source
9$ISSM_DIR/scripts/DownloadExternalPackage.sh "https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-${VER}.tar.gz" "petsc-${VER}.tar.gz"
10
11# Unpack source
12tar -zxvf petsc-${VER}.tar.gz
13
14# Cleanup
15rm -rf install src
16mkdir install src
17
18# Move source to 'src' directory
19mv petsc-${VER}/* src/
20rm -rf petsc-${VER}
21
22# Configure
[25800]23#
24# NOTE:
25# - Added -fallow-argument-mismatch to FFLAGS in order to clear,
26#
27# error: The Fortran compiler gfortran will not compile files that call
28# the same routine with arguments of different types.
29#
30# for gfortran 10 or later (may need to remove it for earlier versions).
31# - Added -Wno-error=implicit-function-declaration to CFLAGS for Clang >= 12.
32# (may need to remove it for earlier versions not using the C99 standard).
33#
[25672]34cd src
35./config/configure.py \
36 --prefix="${ISSM_DIR}/externalpackages/petsc/install" \
37 --PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" \
[25800]38 --CFLAGS="-Wno-error=implicit-function-declaration" \
39 --FFLAGS="-fallow-argument-mismatch" \
[25672]40 --with-debugging=0 \
41 --with-valgrind=0 \
42 --with-x=0 \
43 --with-ssl=0 \
44 --with-pic=1 \
45 --download-fblaslapack=1 \
46 --download-mpich=1 \
47 --download-metis=1 \
48 --download-parmetis=1 \
49 --download-scalapack=1 \
50 --download-mumps=1 \
51 --download-zlib=1 \
52 --download-hdf5=1
53
54# Compile and install
[25713]55make
56make install
Note: See TracBrowser for help on using the repository browser.