From 4355b51c881b3124af86303d309e90186fbdeecc Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Fri, 5 Oct 2018 13:49:52 +0200 Subject: [PATCH] add openblas --- candi.cfg | 1 + deal.II-toolchain/packages/openblas.package | 39 +++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 deal.II-toolchain/packages/openblas.package diff --git a/candi.cfg b/candi.cfg index fb4adbf..97defe5 100644 --- a/candi.cfg +++ b/candi.cfg @@ -37,6 +37,7 @@ PACKAGES="load:dealii-prepare" #PACKAGES="${PACKAGES} once:cmake" #PACKAGES="${PACKAGES} once:boost" #PACKAGES="${PACKAGES} once:numdiff" +#PACKAGES="${PACKAGES} once:openblas" # These packages are not dependencies but are tools used for deal.II development: #PACKAGES="${PACKAGES} once:astyle" diff --git a/deal.II-toolchain/packages/openblas.package b/deal.II-toolchain/packages/openblas.package new file mode 100644 index 0000000..ee3837d --- /dev/null +++ b/deal.II-toolchain/packages/openblas.package @@ -0,0 +1,39 @@ +VERSION=0.2.20 +CHECKSUM=48637eb29f5b492b91459175dcc574b1 +NAME=v${VERSION} +SOURCE=https://github.com/xianyi/OpenBLAS/archive/ +PACKING=.tar.gz +EXTRACTSTO=OpenBLAS-${VERSION} +BUILDDIR=${BUILD_PATH}/${EXTRACTSTO} +INSTALL_PATH=${INSTALL_PATH}/${EXTRACTSTO} + +BUILDCHAIN=custom + +package_specific_build () { + cd ${BUILDDIR} + cp -rf ${UNPACK_PATH}/${EXTRACTSTO}/* . + + make -j ${PROCS} PREFIX=${INSTALL_PATH} + quit_if_fail "make failed" + + make install -j ${PROCS} PREFIX=${INSTALL_PATH} + quit_if_fail "make install failed" +} + +package_specific_register () { + export LAPACK_DIR=${INSTALL_PATH}/lib + export BLAS_DIR=${INSTALL_PATH}/lib + # older cmake (for example 3.5) does not detect openblas by default so + # we force detection by adding to the deal.II configure line: + export DEAL_CONFOPTS="-D LAPACK_FOUND=true -D LAPACK_LIBRARIES=${INSTALL_PATH}/lib/libopenblas.so ${DEAL_CONFOPTS}" +} + +package_specific_conf () { + # Generate configuration file + CONFIG_FILE=${CONFIGURATION_PATH}/${EXTRACTSTO} + rm -f $CONFIG_FILE + echo " +export LAPACK_DIR=${INSTALL_PATH}/lib +export BLAS_DIR=${INSTALL_PATH}/lib +" >> $CONFIG_FILE +} -- 2.39.5