2013-06-12 08:27:24 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# sit class file
|
|
|
|
#
|
|
|
|
# Christoph Niethammer <niethammer@hlrs.de> (C) 2012
|
|
|
|
#
|
2013-10-17 10:22:26 +00:00
|
|
|
# sit command for intel:
|
2014-01-16 11:09:06 +00:00
|
|
|
# PREFIX_BASE=/opt COMPILER=intel COMPILER_VERSION=13.1.3 MPI=impi MPI_VERSION=4.1.3.045 ./sit numlib/petsc/3.4.0
|
2013-10-17 10:22:26 +00:00
|
|
|
#
|
|
|
|
# sit command for gnu:
|
2014-03-27 10:51:50 +00:00
|
|
|
# PREFIX_BASE=/opt COMPILER=gnu COMPILER_VERSION=4.8.1 MPI=openmpi MPI_VERSION=1.6.5 ./sit numlib/petsc/3.4.0
|
2013-06-12 08:27:24 +00:00
|
|
|
|
|
|
|
CATEGORY="numlib"
|
|
|
|
PACKAGE="petsc"
|
|
|
|
VERSION="3.4.0"
|
|
|
|
URL="http://www.mcs.anl.gov/petsc/"
|
|
|
|
INSTALLER="Elke Flehmig <flehmig@hlrs.de>"
|
|
|
|
|
|
|
|
#module load tools/cmake/2.8.11.1
|
|
|
|
|
|
|
|
# Archive A and package name P
|
|
|
|
A=${PACKAGE}-${VERSION}.tar.gz
|
|
|
|
P=${PACKAGE}-${VERSION}
|
|
|
|
|
|
|
|
|
|
|
|
# our petsc default config: 32bit real double precision
|
|
|
|
# blas_lapack: with intel compiler, use intel's mkl instead
|
|
|
|
case $COMPILER in
|
|
|
|
gnu)
|
|
|
|
ARCH=linux-gnu
|
|
|
|
BLAS_LAPACK="--download-f-blas-lapack=$SRC_POOL/fblaslapack-3.1.1.tar.gz"
|
|
|
|
;;
|
|
|
|
intel)
|
|
|
|
ARCH=linux-gnu-intel
|
|
|
|
module load numlib/intel/mkl/11.0
|
2014-01-16 11:09:06 +00:00
|
|
|
BLAS_LAPACK="--with-blas-lapack-dir=$MKLPATH"
|
|
|
|
echo "BLAS_LAPACK=$BLAS_LAPACK"
|
|
|
|
#BLAS_LAPACK="--with-blas-lapack-dir=/opt/compiler/intel/composer_xe_2013-2-146/composer_xe_2013/mkl/lib/intel64"
|
2013-06-12 08:27:24 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Other interesting configure options:
|
|
|
|
# --enable-mpi-threads
|
|
|
|
# --enable-progress-threads
|
|
|
|
|
|
|
|
CONFIGURE_OPTS="
|
|
|
|
--CC=$MPICC --CXX=$MPICXX --FC=$MPIFC \
|
|
|
|
--with-mpiexec=mpirun \
|
|
|
|
PETSC_ARCH=$ARCH \
|
|
|
|
--with-clanguage=cxx \
|
|
|
|
--with-c-support \
|
|
|
|
--with-fortran-datatypes=1 \
|
|
|
|
$BLAS_LAPACK \
|
|
|
|
"
|
|
|
|
# default is make -j, which doesn't work here!
|
|
|
|
#(petsc automatically builds parallel)
|
|
|
|
MAKEOPTS=""
|
|
|
|
|
|
|
|
BUILDDIR=$SRCDIR
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
export PETSC_DIR=${SRCDIR}
|
|
|
|
}
|
|
|
|
src_pretest() {
|
|
|
|
make PETSC_DIR=$SRCDIR PETSC_ARCH=$ARCH test
|
|
|
|
}
|