From: Uwe Köcher Date: Wed, 7 Oct 2015 14:12:04 +0000 (+0200) Subject: deal.II: MKL usage for PetSC and Trilinos X-Git-Tag: v0.7~12^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd7f895906bf84ff46d651461a848680c6acf5e2;p=candi.git deal.II: MKL usage for PetSC and Trilinos --- diff --git a/deal.II/packages/dealii-prepare.package b/deal.II/packages/dealii-prepare.package index c18a236..8af6ce6 100644 --- a/deal.II/packages/dealii-prepare.package +++ b/deal.II/packages/dealii-prepare.package @@ -28,18 +28,5 @@ fi # Transform upper case to lower case. PACKAGES_OFF=${PACKAGES_OFF,,} -######################################################################### -TRILINOS_CONFOPTS=" \ --D BLAS_LIBRARY_DIRS:STRING=${BLAS_DIR} \ --D LAPACK_LIBRARY_DIRS:STRING=${LAPACK_DIR} \ -" - -if [[ ${MKL} == ON ]]; then - TRILINOS_CONFOPTS=" \ - ${TRILINOS_CONFOPTS} \ - -D BLAS_LIBRARY_NAMES:STRING='mkl_core;mkl_sequential' \ - -D LAPACK_LIBRARY_NAMES:STRING=mkl_intel_lp64 \ - " -fi - PACKAGE=dealii-prepare + diff --git a/deal.II/packages/petsc.package b/deal.II/packages/petsc.package index ca19b54..47da4d2 100644 --- a/deal.II/packages/petsc.package +++ b/deal.II/packages/petsc.package @@ -6,6 +6,8 @@ CHECKSUM=28f842697159e16e2978732480571147 #CHECKSUM=ignore BUILDCHAIN=custom +######################################################################### + CONFOPTS=" --with-debugging=0 --with-shared-libraries=1 @@ -37,6 +39,12 @@ if [ "$F90" ]; then CONFOPTS="${CONFOPTS} F90=$F90" fi +if [ ! -z "${MKL_DIR}"] + CONFOPTS="${CONFOPTS} --with-blas-lapack-dir=${MKL_DIR}" +fi + +######################################################################### + package_specific_setup () { cd ${BUILDDIR} cp -rf ${UNPACK_PATH}/${EXTRACTSTO}/* . @@ -49,3 +57,4 @@ package_specific_setup () { package_specific_register () { export PETSC_DIR=${INSTALL_PATH}/${NAME} } + diff --git a/deal.II/packages/trilinos.package b/deal.II/packages/trilinos.package index dc9730c..f5ab91d 100644 --- a/deal.II/packages/trilinos.package +++ b/deal.II/packages/trilinos.package @@ -6,6 +6,30 @@ DOWNLOADER=curl CHECKSUM=760f14cbce482b4b9a41d1c18297b531 BUILDCHAIN=cmake +######################################################################### + +if [ ! -z "${BLAS_DIR}" ]; then + TRILINOS_CONFOPTS="${TRILINOS_CONFOPTS} \ + -D BLAS_LIBRARY_DIRS:STRING=${BLAS_DIR} \ + " +fi + +if [ ! -z "${LAPACK_DIR}" ]; then + TRILINOS_CONFOPTS="${TRILINOS_CONFOPTS} \ + -D LAPACK_LIBRARY_DIRS:STRING=${LAPACK_DIR} \ + " +fi + +if [ ${MKL} = "ON" ]; then + TRILINOS_CONFOPTS=" \ + ${TRILINOS_CONFOPTS} \ + -D BLAS_LIBRARY_NAMES:STRING='mkl_core;mkl_sequential' \ + -D LAPACK_LIBRARY_NAMES:STRING=mkl_intel_lp64 \ + " +fi + +######################################################################### + CONFOPTS="${TRILINOS_CONFOPTS} \ -D Trilinos_ENABLE_OpenMP:BOOL=OFF \ -D TPL_ENABLE_TBB:BOOL=OFF \ diff --git a/project-deal.II.cfg b/project-deal.II.cfg index 67f53b7..edc760e 100644 --- a/project-deal.II.cfg +++ b/project-deal.II.cfg @@ -73,6 +73,7 @@ fi # Do you want to use MKL? MKL=OFF +# MKL_DIR= # BLAS_DIR= # LAPACK_DIR=