source: issm/trunk/externalpackages/petsc/install-3.12-win-msys2-gcc-msmpi.sh@ 26744

Last change on this file since 26744 was 26744, checked in by Mathieu Morlighem, 3 years ago

merged trunk-jpl and trunk for revision 26742

  • Property svn:executable set to *
File size: 1.9 KB
Line 
1#!/bin/bash
2set -u # NOTE: Do not set -e as it will cause this script to fail when there are errors in underlying Python scripts
3
4
5## Constants
6#
7VER="3.12.3"
8
9PETSC_DIR="${ISSM_DIR}/externalpackages/petsc/src" # DO NOT CHANGE THIS
10PREFIX="${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
16tar -zxvf petsc-${VER}.tar.gz
17
18# Cleanup
19rm -rf ${PREFIX} ${PETSC_DIR}
20mkdir ${PETSC_DIR}
21
22# Move source to $PETSC_DIR
23mv petsc-${VER}/* ${PETSC_DIR}
24rm -rf petsc-${VER}
25
26# Configure
27#
28# - Added -fallow-argument-mismatch option to FFLAGS in order to clear "Error:
29# Rank mismatch between actual argument at [...]"
30# - Added -fallow-invalid-boz option to FFLAGS in order to clear "Error: BOZ
31# literal constant at [...]"
32#
33cd ${PETSC_DIR}
34./config/configure.py \
35 --prefix="${PREFIX}" \
36 --PETSC_DIR="${PETSC_DIR}" \
37 --FFLAGS="-fallow-argument-mismatch -fallow-invalid-boz" \
38 --with-debugging=0 \
39 --with-valgrind=0 \
40 --with-x=0 \
41 --with-ssl=0 \
42 --with-pic=1 \
43 --with-mpiexec="/c/PROGRA~1/MICROS~1/Bin/mpiexec.exe" \
44 --with-mpi-lib="-L${MSMPI_ROOT}/lib -lmsmpi" \
45 --with-mpi-include="${MSMPI_ROOT}/include" \
46 --with-metis-dir=${METIS_ROOT} \
47 --with-parmetis-dir=${PARMETIS_ROOT} \
48 --with-blas-lib="-L${BLAS_ROOT}/lib -lblas" \
49 --known-64-bit-blas-indices=0 \
50 --with-lapack-lib="-L${LAPACK_ROOT}/lib -llapack" \
51 --with-scalapack-dir=${SCALAPACK_ROOT} \
52 --with-mumps-dir=${MUMPS_ROOT}
53
54# Compile and install
55make
56make install
57
58# NOTE:
59# - Hack to recover from failed installation (appears to happen only on Windows
60# when reproducing symbolic links in destination directory) rather than
61# trying to patch src/config/install.py
62#
63if [ $? -ne 0 ]; then
64 make install
65fi
Note: See TracBrowser for help on using the repository browser.