[12567] | 1 | #!/bin/bash
|
---|
[13246] | 2 | set -eu
|
---|
[12567] | 3 | #Step 0: download
|
---|
[13100] | 4 | #Step 1: install and write script
|
---|
[12567] | 5 | STEP=0
|
---|
| 6 |
|
---|
| 7 | if [ $STEP -eq 0 ]; then
|
---|
| 8 | # Adapted from petsc 3.2.
|
---|
| 9 | # Used Mercurial to get code
|
---|
| 10 | rm -rf src
|
---|
| 11 | hg clone http://petsc.cs.iit.edu/petsc/petsc-dev src
|
---|
| 12 | cd src
|
---|
| 13 | hg clone http://petsc.cs.iit.edu/petsc/BuildSystem config/BuildSystem
|
---|
| 14 | fi
|
---|
| 15 |
|
---|
| 16 | # To update (via Mercurial):
|
---|
| 17 | # cd petsc-dev
|
---|
| 18 | # hg pull -u
|
---|
| 19 | # cd config/BuildSystem
|
---|
| 20 | # hg pull -u
|
---|
| 21 |
|
---|
| 22 | # configure script
|
---|
| 23 | # Note: using metis from externalpackages did not work...
|
---|
| 24 | # for now downloading new metis
|
---|
| 25 | # -then rename metis in externalpackages to metis2
|
---|
| 26 | if [ $STEP -eq 1 ]; then
|
---|
| 27 |
|
---|
[12609] | 28 | mkdir install
|
---|
[12567] | 29 |
|
---|
| 30 | #configure
|
---|
| 31 | cd src
|
---|
| 32 | ./config/configure.py \
|
---|
| 33 | --prefix="$ISSM_DIR/externalpackages/petsc/install" \
|
---|
| 34 | --with-batch=1 \
|
---|
| 35 | --PETSC_ARCH="$ISSM_ARCH" \
|
---|
| 36 | --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
|
---|
| 37 | --with-debugging=0 \
|
---|
| 38 | --with-shared-libraries=0 \
|
---|
| 39 | --with-blas-lapack-dir=/nasa/intel/mkl/10.0.011/ \
|
---|
| 40 | --known-mpi-shared-libraries=1 \
|
---|
[12609] | 41 | --with-mpi-lib=/nasa/sgi/mpt/2.04/lib/libmpi.so \
|
---|
| 42 | --with-mpi-include=/nasa/sgi/mpt/2.04/include \
|
---|
[12567] | 43 | --download-mumps=yes \
|
---|
| 44 | --download-plapack=yes \
|
---|
| 45 | --download-scalapack=yes \
|
---|
| 46 | --download-blacs=yes \
|
---|
| 47 | --download-blas=yes \
|
---|
| 48 | --download-f-blas-lapack=yes \
|
---|
| 49 | --download-parmetis=yes \
|
---|
| 50 | --download-metis=yes \
|
---|
[12609] | 51 | --download-trilinos=yes \
|
---|
| 52 | --download-euclid=yes \
|
---|
| 53 | --download-pastix=yes \
|
---|
| 54 | --download-ptscotch=yes \
|
---|
| 55 | --download-spooles=yes \
|
---|
[12567] | 56 | --download-spai=yes \
|
---|
[13100] | 57 | --download-superlu=yes \
|
---|
| 58 | --download-hypre=yes \
|
---|
| 59 | --download-prometheus=yes \
|
---|
[12567] | 60 | --FFLAGS=-I/usr/include \
|
---|
[13100] | 61 | --with-cxx=icpc \
|
---|
[12567] | 62 | --with-cc=icc \
|
---|
| 63 | --with-fc=ifort \
|
---|
| 64 | --COPTFLAGS=" -O3 -xS" \
|
---|
| 65 | --FOPTFLAGS=" -O3 -xS" \
|
---|
| 66 | --CXXOPTFLAGS=" -O3 -xS" \
|
---|
| 67 | --with-pic=1
|
---|
[13100] | 68 | cat > script.queue << EOF
|
---|
[12567] | 69 | #PBS -S /bin/bash
|
---|
| 70 | #PBS -q debug
|
---|
| 71 | #PBS -l select=1:ncpus=1:model=har
|
---|
| 72 | #PBS -l walltime=200
|
---|
| 73 | #PBS -W group_list=s1010
|
---|
| 74 | #PBS -m e
|
---|
| 75 | . /usr/share/modules/init/bash
|
---|
| 76 | module load comp-intel/11.1.046
|
---|
[12609] | 77 | module load mpi-sgi/mpt.2.04 #DEFINES MPI_Type_create_indexed_block
|
---|
[12567] | 78 | module load math/intel_mkl_64_10.0.011
|
---|
| 79 | export PATH="$PATH:."
|
---|
| 80 | export MPI_GROUP_MAX=64
|
---|
| 81 | mpiexec -np 1 ./conftest-linux-gnu-ia64-intel.py
|
---|
| 82 | EOF
|
---|
| 83 | echo "== Follow PETSc's instructions"
|
---|
| 84 | fi
|
---|