[13791] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
[13796] | 3 | #Some cleanup
|
---|
[15396] | 4 | rm -rf install petsc-3.3-p6 src
|
---|
[13796] | 5 | mkdir install src
|
---|
[13791] | 6 |
|
---|
[13796] | 7 | #Download from ISSM server
|
---|
[15396] | 8 | $ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-lite-3.3-p6.tar.gz' 'petsc-3.3-p6.tar.gz'
|
---|
[13791] | 9 |
|
---|
[13796] | 10 | #Untar and move petsc to install directory
|
---|
[15396] | 11 | tar -zxvf petsc-3.3-p6.tar.gz
|
---|
| 12 | mv petsc-3.3-p6/* src/
|
---|
| 13 | rm -rf petsc-3.3-p6
|
---|
[13791] | 14 |
|
---|
[13796] | 15 | #configure
|
---|
| 16 | cd src
|
---|
| 17 | ./config/configure.py \
|
---|
| 18 | --prefix="$ISSM_DIR/externalpackages/petsc/install" \
|
---|
| 19 | --PETSC_ARCH="$ISSM_ARCH" \
|
---|
| 20 | --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
|
---|
[15396] | 21 | --with-batch=1 \
|
---|
[13796] | 22 | --with-debugging=0 \
|
---|
| 23 | --with-shared-libraries=1 \
|
---|
| 24 | --known-mpi-shared-libraries=1 \
|
---|
| 25 | --with-mpi=1 \
|
---|
[15396] | 26 | --with-mpi-lib="/nasa/sgi/mpt/2.06rp16/lib/libmpi.so" \
|
---|
| 27 | --with-mpi-include="/nasa/sgi/mpt/2.06rp16/include" \
|
---|
| 28 | --with-blas-lapack-dir="/nasa/intel/Compiler/2013.1.117/composer_xe_2013.1.117/mkl/lib/intel64" \
|
---|
[13911] | 29 | --download-scalapack=yes \
|
---|
| 30 | --download-blacs=yes \
|
---|
[15396] | 31 | --download-mumps=yes \
|
---|
[13911] | 32 | --download-metis=yes \
|
---|
[13796] | 33 | --download-parmetis=yes \
|
---|
| 34 | --download-trilinos=yes \
|
---|
| 35 | --download-euclid=yes \
|
---|
| 36 | --download-hypre=yes \
|
---|
| 37 | --COPTFLAGS="-lmpi -O3" \
|
---|
| 38 | --FOPTFLAGS="-lmpi -O3" \
|
---|
[13911] | 39 | --CXXOPTFLAGS="-lmpi -O3"
|
---|
[13791] | 40 |
|
---|
[13796] | 41 | #prepare script to reconfigure petsc
|
---|
| 42 | cat > script.queue << EOF
|
---|
[13791] | 43 | #PBS -S /bin/bash
|
---|
[13794] | 44 | #PBS -l select=1:ncpus=1:model=wes
|
---|
[13791] | 45 | #PBS -l walltime=200
|
---|
[13911] | 46 | #PBS -W group_list=s1010
|
---|
[13791] | 47 | #PBS -m e
|
---|
[13911] | 48 |
|
---|
[13791] | 49 | . /usr/share/modules/init/bash
|
---|
[15396] | 50 | module load comp-intel/2013.1.117
|
---|
| 51 | module load mpi-sgi/mpt.2.06rp16
|
---|
[13911] | 52 |
|
---|
[13791] | 53 | export PATH="$PATH:."
|
---|
| 54 | export MPI_GROUP_MAX=64
|
---|
| 55 | mpiexec -np 1 ./conftest-linux-gnu-ia64-intel.py
|
---|
| 56 | EOF
|
---|
[13796] | 57 |
|
---|
| 58 | #print instructions
|
---|
| 59 | echo "== Now: cd src/ "
|
---|
| 60 | echo "== qsub -q devel script.queue "
|
---|
| 61 | echo "== Then run reconfigure script generated by PETSc and follow instructions"
|
---|