From 998f65e1053ba91dfa90104bcdcb2a4440321748 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20K=C3=B6cher?= Date: Thu, 16 Jul 2015 12:59:13 +0200 Subject: [PATCH] deal.II: moved code for switching off packages from configuration file to a preparation package file for deal.II --- deal.II/packages/dealii-prepare.package | 47 +++++++++++++++++++ deal.II/packages/superlu_dist.package | 1 + deal.II/platforms/supported/centos7.platform | 1 + deal.II/platforms/supported/fedora19.platform | 1 + deal.II/platforms/supported/fedora20.platform | 1 + deal.II/platforms/supported/fedora21.platform | 1 + deal.II/platforms/supported/fedora22.platform | 2 +- .../supported/linux_cluster.platform | 5 +- .../platforms/supported/opensuse12.platform | 1 + .../platforms/supported/opensuse13.platform | 1 + deal.II/platforms/supported/ubuntu14.platform | 1 + deal.II/platforms/supported/ubuntu15.platform | 1 + project-deal.II.cfg | 44 ----------------- 13 files changed, 60 insertions(+), 47 deletions(-) create mode 100644 deal.II/packages/dealii-prepare.package diff --git a/deal.II/packages/dealii-prepare.package b/deal.II/packages/dealii-prepare.package new file mode 100644 index 0000000..ea502dc --- /dev/null +++ b/deal.II/packages/dealii-prepare.package @@ -0,0 +1,47 @@ +NAME=dealii_prepare +BUILDCHAIN=ignore + +#################################### +### DO NOT MODIFY THE CODE BELOW ### +#################################### + +######################################################################### +# Loop over the options in DEAL_CONFOPTS and if the package is turned off, add +# it to the PACKAGES_OFF list. +for PACKAGE in ${DEAL_CONFOPTS[@]}; do + case ${PACKAGE} in + *DEAL_II_WITH*:BOOL=OFF) + PACKAGE_NAME=${PACKAGE##*WITH_}; + PACKAGE_NAME=${PACKAGE_NAME%%:BOOL*}; + PACKAGES_OFF=${PACKAGE_NAME}' '${PACKAGES_OFF};; + esac +done + +# Turn off ParMETIS and SuperLU_dist if metis is off. +if [[ ${PACKAGES_OFF} =~ 'METIS' ]]; then + PACKAGES_OFF=${PACKAGES_OFF}' PARMETIS'; + PACKAGES_OFF=${PACKAGES_OFF}' SUPERLU_DIST'; + ParMetis=OFF + SuperLUDist=OFF +else + ParMETIS=ON + SuperLUDist=ON +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_LIBRARY_DIRS} \ +" + +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 + diff --git a/deal.II/packages/superlu_dist.package b/deal.II/packages/superlu_dist.package index c730ca0..7a66647 100644 --- a/deal.II/packages/superlu_dist.package +++ b/deal.II/packages/superlu_dist.package @@ -3,6 +3,7 @@ NAME=superlu_dist_${VERSION} EXTRACTSTO=SuperLU_DIST_${VERSION} SOURCE=http://crd-legacy.lbl.gov/~xiaoye/SuperLU/ PACKING=.tar.gz +DOWNLOADER=curl CHECKSUM=f4805659157d93a962500902c219046b BUILDCHAIN=custom diff --git a/deal.II/platforms/supported/centos7.platform b/deal.II/platforms/supported/centos7.platform index 47ee5e6..a9649a3 100644 --- a/deal.II/platforms/supported/centos7.platform +++ b/deal.II/platforms/supported/centos7.platform @@ -22,6 +22,7 @@ # # Define the packages this platform needs PACKAGES=( +skip:dealii-prepare once:parmetis once:superlu_dist once:hdf5 diff --git a/deal.II/platforms/supported/fedora19.platform b/deal.II/platforms/supported/fedora19.platform index d12a8af..958e411 100644 --- a/deal.II/platforms/supported/fedora19.platform +++ b/deal.II/platforms/supported/fedora19.platform @@ -17,6 +17,7 @@ # # Define the packages this platform needs PACKAGES=( +skip:dealii-prepare #once:boost once:parmetis once:superlu_dist diff --git a/deal.II/platforms/supported/fedora20.platform b/deal.II/platforms/supported/fedora20.platform index 1e26f8e..b9d3564 100644 --- a/deal.II/platforms/supported/fedora20.platform +++ b/deal.II/platforms/supported/fedora20.platform @@ -23,6 +23,7 @@ # # Define the packages this platform needs PACKAGES=( +skip:dealii-prepare #once:boost once:parmetis once:superlu_dist diff --git a/deal.II/platforms/supported/fedora21.platform b/deal.II/platforms/supported/fedora21.platform index d80e82e..8eba06d 100644 --- a/deal.II/platforms/supported/fedora21.platform +++ b/deal.II/platforms/supported/fedora21.platform @@ -24,6 +24,7 @@ # # Define the packages this platform needs PACKAGES=( +skip:dealii-prepare #once:boost once:parmetis once:superlu_dist diff --git a/deal.II/platforms/supported/fedora22.platform b/deal.II/platforms/supported/fedora22.platform index 668d7bc..8008bc0 100644 --- a/deal.II/platforms/supported/fedora22.platform +++ b/deal.II/platforms/supported/fedora22.platform @@ -24,7 +24,7 @@ # # Define the packages this platform needs PACKAGES=( -#once:boost +skip:dealii-prepare once:parmetis once:superlu_dist once:hdf5 diff --git a/deal.II/platforms/supported/linux_cluster.platform b/deal.II/platforms/supported/linux_cluster.platform index 9c62646..95d154e 100644 --- a/deal.II/platforms/supported/linux_cluster.platform +++ b/deal.II/platforms/supported/linux_cluster.platform @@ -17,8 +17,9 @@ # # Define the packages this platform needs PACKAGES=( -once:zlib -once:bzip2 +skip:dealii-prepare +once:zlib +once:bzip2 once:boost once:parmetis once:superlu_dist diff --git a/deal.II/platforms/supported/opensuse12.platform b/deal.II/platforms/supported/opensuse12.platform index fa62370..ad5431a 100644 --- a/deal.II/platforms/supported/opensuse12.platform +++ b/deal.II/platforms/supported/opensuse12.platform @@ -22,6 +22,7 @@ # # Define the packages this platform needs PACKAGES=( +skip:dealii-prepare #once:boost once:parmetis once:superlu_dist diff --git a/deal.II/platforms/supported/opensuse13.platform b/deal.II/platforms/supported/opensuse13.platform index 95c15c5..4404e42 100644 --- a/deal.II/platforms/supported/opensuse13.platform +++ b/deal.II/platforms/supported/opensuse13.platform @@ -17,6 +17,7 @@ # # Define the packages this platform needs PACKAGES=( +skip:dealii-prepare #once:boost once:parmetis once:superlu_dist diff --git a/deal.II/platforms/supported/ubuntu14.platform b/deal.II/platforms/supported/ubuntu14.platform index 0ecf40d..76045b4 100644 --- a/deal.II/platforms/supported/ubuntu14.platform +++ b/deal.II/platforms/supported/ubuntu14.platform @@ -16,6 +16,7 @@ # # Define the packages this platform needs PACKAGES=( +skip:dealii-prepare once:parmetis once:superlu_dist once:hdf5 diff --git a/deal.II/platforms/supported/ubuntu15.platform b/deal.II/platforms/supported/ubuntu15.platform index dd05b67..d9b5f20 100644 --- a/deal.II/platforms/supported/ubuntu15.platform +++ b/deal.II/platforms/supported/ubuntu15.platform @@ -16,6 +16,7 @@ # # Define the packages this platform needs PACKAGES=( +skip:dealii-prepare once:parmetis once:superlu_dist once:hdf5 diff --git a/project-deal.II.cfg b/project-deal.II.cfg index 3d66fc3..3de61cc 100644 --- a/project-deal.II.cfg +++ b/project-deal.II.cfg @@ -98,47 +98,3 @@ INSTALL_PATH=${PREFIX_PATH}/${PROJECT}/${COMPILER} STABLE_BUILD=true #STABLE_BUILD=false - -#################################### -### DO NOT MODIFY THE CODE BELOW ### -#################################### - -######################################################################### -# Loop over the options in DEAL_CONFOPTS and if the package is turned off, add -# it to the PACKAGES_OFF list. -for PACKAGE in ${DEAL_CONFOPTS[@]}; do - case ${PACKAGE} in - *DEAL_II_WITH*:BOOL=OFF) - PACKAGE_NAME=${PACKAGE##*WITH_}; - PACKAGE_NAME=${PACKAGE_NAME%%:BOOL*}; - PACKAGES_OFF=${PACKAGE_NAME}' '${PACKAGES_OFF};; - esac -done - -# Turn off ParMETIS and SuperLU_dist if metis is off. -if [[ ${PACKAGES_OFF} =~ 'METIS' ]]; then - PACKAGES_OFF=${PACKAGES_OFF}' PARMETIS'; - PACKAGES_OFF=${PACKAGES_OFF}' SUPERLU_DIST'; - ParMetis=OFF - SuperLUDist=OFF -else - ParMETIS=ON - SuperLUDist=ON -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_LIBRARY_DIRS} \ -" - -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 -- 2.39.5