From: Denis Davydov Date: Thu, 17 Sep 2015 20:33:24 +0000 (+0200) Subject: disable PArpack if scalapack is present in Trilinos or PETSc link interface to avoid... X-Git-Tag: v8.4.0-rc2~396^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70d5c540b4df39918b0a7fbc6a096fbcafee640a;p=dealii.git disable PArpack if scalapack is present in Trilinos or PETSc link interface to avoid possible symbol clash --- diff --git a/cmake/configure/configure_arpack.cmake b/cmake/configure/configure_arpack.cmake index 206b0cc491..fa0e4499d4 100644 --- a/cmake/configure/configure_arpack.cmake +++ b/cmake/configure/configure_arpack.cmake @@ -20,4 +20,4 @@ SET(FEATURE_ARPACK_DEPENDS LAPACK) CONFIGURE_FEATURE(ARPACK) -SET(DEAL_II_ARPACK_WITH_PARPACK ARPACK_WITH_PARPACK) +SET(DEAL_II_ARPACK_WITH_PARPACK ${ARPACK_WITH_PARPACK}) diff --git a/cmake/modules/FindARPACK.cmake b/cmake/modules/FindARPACK.cmake index b15a4c722a..f8e26eb1f9 100644 --- a/cmake/modules/FindARPACK.cmake +++ b/cmake/modules/FindARPACK.cmake @@ -52,6 +52,25 @@ ELSE() SET(PARPACK_LIBRARY "PARPACK_LIBRARY-NOTFOUND") ENDIF() +IF(NOT DEAL_II_ARPACK_WITH_PARPACK) + # + # We have to avoid an unfortuante symbol clash with "libscalapack.so" - + # arpack happened to blindly copy a symbol name... + # https://github.com/opencollab/arpack-ng/issues/18 + # https://github.com/opencollab/arpack-ng/pull/21 + # + # Just disable parpack support if scalapack is present in Trilinos' or + # PETSc's link interface. This can be overridden by manually setting + # DEAL_II_ARPACK_WITH_PARPACK to true. + # + FOREACH(_libraries ${TRILINOS_LIBRARIES} ${PETSC_LIBRARIES}) + IF("${_libraries}" MATCHES "scalapack") + SET(PARPACK_LIBRARY "PARPACK_LIBRARY-NOTFOUND") + ENDIF() + ENDFOREACH() +ENDIF() + + IF(NOT PARPACK_LIBRARY MATCHES "-NOTFOUND") SET(ARPACK_WITH_PARPACK TRUE) ELSE()