]> https://gitweb.dealii.org/ - candi.git/commitdiff
updates parmetis, superlu_dist and trilinos for macOS support
authorUwe Köcher <koecher@hsu-hamburg.de>
Fri, 5 May 2017 21:51:32 +0000 (23:51 +0200)
committerUwe Köcher <koecher@hsu-hamburg.de>
Fri, 5 May 2017 21:51:32 +0000 (23:51 +0200)
deal.II-toolchain/packages/parmetis.package
deal.II-toolchain/packages/superlu_dist.package
deal.II-toolchain/packages/trilinos.package

index 833991b285d7eaef36d1acbdac3b9442e849472d..18f7ae21dc9999a5c6b10ac4500287cca1844ec0 100644 (file)
@@ -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
 }
index 0155940733dc5168f87ddde054219b463110ec9d..3c04d2b0ebfea7b29ea5f0c1ac35e083dd79bbb9 100644 (file)
@@ -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
 }
index 22b3517524e5c4761d4a79a1d8906b0a40561f93..efae0b7a4b623729c12fd5cb65ae9c98c9b053a8 100644 (file)
@@ -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"

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.