source: issm/trunk/externalpackages/petsc/install-3.5-greenplanet.sh@ 24313

Last change on this file since 24313 was 24313, checked in by Mathieu Morlighem, 5 years ago

merged trunk-jpl and trunk for revision 24310

  • Property svn:executable set to *
File size: 1.4 KB
Line 
1#!/bin/bash
2set -eu
3
4#WARNING: make sure you have the right mpi
5
6#Some cleanup
7rm -rf install petsc-3.5.3 src
8mkdir install src
9
10#Download from ISSM server
11$ISSM_DIR/scripts/DownloadExternalPackage.sh 'https://issm.ess.uci.edu/files/externalpackages/petsc-lite-3.5.3.tar.gz' 'petsc-3.5.3.tar.gz'
12
13#Untar and move petsc to install directory
14tar -zxvf petsc-3.5.3.tar.gz
15mv petsc-3.5.3/* src/
16rm -rf petsc-3.5.3
17
18#configure
19cd src
20./config/configure.py \
21 --prefix="$ISSM_DIR/externalpackages/petsc/install" \
22 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
23 --with-blas-lapack-dir="/sopt/Intel/composer_xe_2015.0.090/mkl/" \
24 --with-mpi-dir="/sopt/mpi/openmpi-1.8.3/intel_15.0.0/bin/" \
25 --known-mpi-shared-libraries=1 \
26 --with-debugging=0 \
27 --with-valgrind=0 \
28 --with-x=0 \
29 --with-ssl=0 \
30 --with-batch=1 \
31 --with-shared-libraries=1 \
32 --download-metis=1 \
33 --download-parmetis=1 \
34 --download-scalapack=1 \
35 --download-mumps=1
36
37#prepare script to reconfigure petsc
38cat > script.queue << EOF
39#!/bin/bash
40#SBATCH -p c6145
41#SBATCH -N 1 -n 1
42#SBATCH --mem-per-cpu=1gb
43#SBATCH --time=10
44#SBATCH --job-name=test
45
46module load compiler/intel/15.0.0
47module load mpi/openmpi/1.8.3/intel_15.0.0
48
49cd $(echo $ISSM_DIR)/externalpackages/petsc/src/
50mpiexec -np 1 ./conftest-arch-linux2-c-opt
51EOF
52
53#print instructions
54echo "== Now: cd src/ "
55echo "== sbatch script.queue "
56echo "== Then run reconfigure script generated by PETSc and follow instructions"
Note: See TracBrowser for help on using the repository browser.