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