Last change
on this file since 25567 was 25567, checked in by jdquinn, 5 years ago |
CHG: Added Fortran compiler flag to clear error (apparently MPICH does not provide proper interface for functions with void * arguments).
|
-
Property svn:executable
set to
*
|
File size:
1.8 KB
|
Rev | Line | |
---|
[24649] | 1 | #!/bin/bash
|
---|
| 2 | set -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 | #
|
---|
| 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 | #
|
---|
[25567] | 31 | # NOTE:
|
---|
| 32 | # - Cannot use --with-fpic option when compiling static libs,
|
---|
[24649] | 33 | #
|
---|
| 34 | # Cannot determine compiler PIC flags if shared libraries is turned off
|
---|
| 35 | # Either run using --with-shared-libraries or --with-pic=0 and supply the
|
---|
| 36 | # compiler PIC flag via CFLAGS, CXXXFLAGS, and FCFLAGS
|
---|
| 37 | #
|
---|
[25567] | 38 | # - Added -fallow-argument-mismatch to FFLAGS in order to clear,
|
---|
| 39 | #
|
---|
| 40 | # error: The Fortran compiler gfortran will not compile files that call
|
---|
| 41 | # the same routine with arguments of different types.
|
---|
| 42 | #
|
---|
| 43 | # This has only been added to macOS static builds, but may be needed
|
---|
| 44 | # elsewhere.
|
---|
| 45 | #
|
---|
[24649] | 46 | cd src
|
---|
| 47 | ./config/configure.py \
|
---|
| 48 | --prefix="${ISSM_DIR}/externalpackages/petsc/install" \
|
---|
| 49 | --PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" \
|
---|
| 50 | --with-shared-libraries=0 \
|
---|
| 51 | --CFLAGS="-fPIC" \
|
---|
| 52 | --CXXFLAGS="-fPIC" \
|
---|
[25567] | 53 | --FFLAGS="-fPIC -fallow-argument-mismatch -static-libgfortran" \
|
---|
[24649] | 54 | --with-debugging=0 \
|
---|
| 55 | --with-valgrind=0 \
|
---|
| 56 | --with-x=0 \
|
---|
| 57 | --with-ssl=0 \
|
---|
| 58 | --download-fblaslapack=1 \
|
---|
| 59 | --download-mpich=1 \
|
---|
| 60 | --download-metis=1 \
|
---|
| 61 | --download-parmetis=1 \
|
---|
| 62 | --download-scalapack=1 \
|
---|
[25199] | 63 | --download-mumps=1 \
|
---|
| 64 | --download-zlib=1 \
|
---|
| 65 | --download-hdf5=1
|
---|
[24649] | 66 |
|
---|
| 67 | # Compile and install
|
---|
| 68 | make
|
---|
| 69 | make install
|
---|
Note:
See
TracBrowser
for help on using the repository browser.