From 70d5c540b4df39918b0a7fbc6a096fbcafee640a Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Thu, 17 Sep 2015 22:33:24 +0200 Subject: [PATCH] disable PArpack if scalapack is present in Trilinos or PETSc link interface to avoid possible symbol clash --- cmake/configure/configure_arpack.cmake | 2 +- cmake/modules/FindARPACK.cmake | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) 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() -- 2.39.5