From cf4b40124fb02ad7f558d8bb0184295c4bd0058b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20K=C3=B6cher?= Date: Fri, 5 May 2017 23:51:32 +0200 Subject: [PATCH] updates parmetis, superlu_dist and trilinos for macOS support --- deal.II-toolchain/packages/parmetis.package | 15 ++++++++++++ .../packages/superlu_dist.package | 24 ++++++++++++++++++- deal.II-toolchain/packages/trilinos.package | 19 ++++++++++++--- 3 files changed, 54 insertions(+), 4 deletions(-) diff --git a/deal.II-toolchain/packages/parmetis.package b/deal.II-toolchain/packages/parmetis.package index 833991b..18f7ae2 100644 --- a/deal.II-toolchain/packages/parmetis.package +++ b/deal.II-toolchain/packages/parmetis.package @@ -7,6 +7,12 @@ BUILDCHAIN=custom INSTALL_PATH=${INSTALL_PATH}/${NAME} +# check candi environment +if [ -z "${PLATFORM_OSTYPE}" ]; then + cecho ${BAD} "Error: (internal): variable PLATFORM_OSTYPE not set or empty" + exit 1 +fi + package_specific_build() { cp -rf ${UNPACK_PATH}/${EXTRACTSTO}/* . @@ -38,6 +44,10 @@ package_specific_build() { package_specific_register () { export METIS_DIR=${INSTALL_PATH} export PARMETIS_DIR=${INSTALL_PATH} + + if [ ${PLATFORM_OSTYPE} == macos ]; then + export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:${INSTALL_PATH}/lib + fi } package_specific_conf () { @@ -48,4 +58,9 @@ package_specific_conf () { export METIS_DIR=${INSTALL_PATH} export PARMETIS_DIR=${INSTALL_PATH} " >> $CONFIG_FILE + + if [ ${PLATFORM_OSTYPE} == macos ]; then + echo "export DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:${INSTALL_PATH}/lib +" >> $CONFIG_FILE + fi } diff --git a/deal.II-toolchain/packages/superlu_dist.package b/deal.II-toolchain/packages/superlu_dist.package index 0155940..3c04d2b 100644 --- a/deal.II-toolchain/packages/superlu_dist.package +++ b/deal.II-toolchain/packages/superlu_dist.package @@ -8,14 +8,31 @@ CHECKSUM=0a99bbb5f6c26a9c1d7ab17ea35d4e6f BUILDCHAIN=cmake INSTALL_PATH=${INSTALL_PATH}/${NAME} +# check candi environment +if [ -z "${LDSUFFIX}" ]; then + cecho ${BAD} "Error: (internal): variable LDSUFFIX not set or empty" + exit 1 +fi + +if [ -z "${PLATFORM_OSTYPE}" ]; then + cecho ${BAD} "Error: (internal): variable PLATFORM_OSTYPE not set or empty" + exit 1 +fi + +# set up CONFOPTS=" \ + $CONFOPTS \ -D TPL_PARMETIS_INCLUDE_DIRS:PATH=${PARMETIS_DIR}/include \ - -D TPL_PARMETIS_LIBRARIES:FILEPATH=${PARMETIS_DIR}/lib/libparmetis.so \ + -D TPL_PARMETIS_LIBRARIES:FILEPATH=${PARMETIS_DIR}/lib/libparmetis.${LDSUFFIX} \ -D CMAKE_C_FLAGS:STRING=\"-std=c99 -fPIC\" \ -D BUILD_SHARED_LIBS:BOOL=ON" package_specific_register () { export SUPERLU_DIR=${INSTALL_PATH} + + if [ ${PLATFORM_OSTYPE} == macos ]; then + export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:${INSTALL_PATH}/lib + fi } package_specific_conf () { @@ -25,4 +42,9 @@ package_specific_conf () { echo " export SUPERLU_DIR=${INSTALL_PATH} " >> $CONFIG_FILE + + if [ ${PLATFORM_OSTYPE} == macos ]; then + echo "export DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:${INSTALL_PATH}/lib +" >> $CONFIG_FILE + fi } diff --git a/deal.II-toolchain/packages/trilinos.package b/deal.II-toolchain/packages/trilinos.package index 22b3517..efae0b7 100644 --- a/deal.II-toolchain/packages/trilinos.package +++ b/deal.II-toolchain/packages/trilinos.package @@ -105,24 +105,37 @@ CONFOPTS="${CONFOPTS} \ # Add ParMETIS, if present if [ ! -z "${PARMETIS_DIR}" ]; then cecho ${INFO} "trilinos: configuration with ParMETIS" + + if [ -z "${LDSUFFIX}" ]; then + cecho ${BAD} "Error: (internal): variable LDSUFFIX not set or empty" + exit 1 + fi + CONFOPTS="\ ${CONFOPTS} \ -D TPL_ENABLE_ParMETIS:BOOL=ON \ - -D TPL_ParMETIS_LIBRARIES:FILEPATH=${PARMETIS_DIR}/lib/libparmetis.so \ + -D TPL_ParMETIS_LIBRARIES:FILEPATH=${PARMETIS_DIR}/lib/libparmetis.${LDSUFFIX} \ -D TPL_ParMETIS_INCLUDE_DIRS:PATH=${PARMETIS_DIR}/include" +###### TODO? -D HAVE_PARMETIS_VERSION_4_0_3=ON" fi # Add SuperLU_dist, if present if [ ! -z "${SUPERLU_DIR}" ]; then cecho ${INFO} "trilinos: configuration with SuperLU_dist" - # we need to disable complex support in teuchos, see https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html + if [ -z "${LDSUFFIX}" ]; then + cecho ${BAD} "Error: (internal): variable LDSUFFIX not set or empty" + exit 1 + fi + + # we need to disable complex support in teuchos, see + # https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html CONFOPTS="\ ${CONFOPTS} \ -D TPL_ENABLE_SuperLUDist:BOOL=ON \ -D Teuchos_ENABLE_COMPLEX:BOOL=OFF \ - -D TPL_SuperLUDist_LIBRARIES:FILEPATH=${SUPERLU_DIR}/lib/libsuperlu_dist.so \ + -D TPL_SuperLUDist_LIBRARIES:FILEPATH=${SUPERLU_DIR}/lib/libsuperlu_dist.${LDSUFFIX} \ -D SuperLUDist_INCLUDE_DIRS:PATH=${SUPERLU_DIR}/include \ -D HAVE_SUPERLUDIST_LUSTRUCTINIT_2ARG:BOOL=ON \ -D HAVE_SUPERLUDIST_ENUM_NAMESPACE:BOOL=ON" -- 2.39.5