Commit 8fd0607f authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Added initial CMake support for Scalapack library.

parent 1cba82c9
......@@ -157,6 +157,7 @@ INCLUDE (ThirdPartyFFTW)
INCLUDE (ThirdPartyArpack)
INCLUDE (ThirdPartyMPI)
INCLUDE (ThirdPartyVTK)
INCLUDE (ThirdPartyScalapack)
IF( NEKTAR_USE_MKL )
INCLUDE (FindMKL)
......@@ -269,6 +270,7 @@ INSTALL(FILES ${CMAKE_BINARY_DIR}/Nektar++Config.cmake
${CMAKE_SOURCE_DIR}/cmake/FindMKL.cmake
${CMAKE_SOURCE_DIR}/cmake/FindMetis.cmake
${CMAKE_SOURCE_DIR}/cmake/FindFFTW.cmake
${CMAKE_SOURCE_DIR}/cmake/FindScalapack.cmake
${CMAKE_SOURCE_DIR}/cmake/FindWin32Lapack.cmake
${CMAKE_SOURCE_DIR}/cmake/NektarCommon.cmake
${CMAKE_SOURCE_DIR}/cmake/FindTinyXml.cmake
......
SET(SCALAPACK_SEARCH_PATHS
${CMAKE_SOURCE_DIR}/ThirdParty/scalapack-2.0.2
${CMAKE_SOURCE_DIR}/ThirdParty/scalapack-2.0.2/build/lib
${CMAKE_SOURCE_DIR}/../ThirdParty/scalapack-2.0.2/
${CMAKE_SOURCE_DIR}/../ThirdParty/scalapack-2.0.2/build/lib
${CMAKE_SOURCE_DIR}/ThirdParty/dist/lib
${CMAKE_SOURCE_DIR}/../ThirdParty/dist/lib)
FIND_LIBRARY(SCALAPACK_LIB NAMES scalapack PATHS ${SCALAPACK_SEARCH_PATHS})
SET(SCALAPACK_FOUND FALSE)
IF (SCALAPACK_LIB)
SET(SCALAPACK_FOUND TRUE)
MARK_AS_ADVANCED(SCALAPACK_LIB)
ENDIF (SCALAPACK_LIB)
IF (SCALAPACK_FOUND)
IF (NOT SCALAPACK_LIB_FIND_QUIETLY)
MESSAGE(STATUS "Found ScaLAPACK")
ENDIF (NOT SCALAPACK_LIB_FIND_QUIETLY)
ELSE(SCALAPACK_FOUND)
IF (SCALAPACK_LIB_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find ScaLAPACK")
ENDIF (SCALAPACK_LIB_FIND_REQUIRED)
ENDIF (SCALAPACK_FOUND)
SET(NEKTAR_USE_SCALAPACK OFF CACHE BOOL
"Use ScaLAPACK for performing parallel matrix inversion.")
SET(THIRDPARTY_BUILD_SCALAPACK OFF CACHE BOOL
"Build ScaLAPACK library from ThirdParty")
IF (THIRDPARTY_BUILD_SCALAPACK)
INCLUDE(ExternalProject)
EXTERNALPROJECT_ADD(
scalapack-2.0.2
PREFIX ${TPSRC}
URL ${TPURL}/scalapack-2.0.2.tar.gz
URL_MD5 "2f75e600a2ba155ed9ce974a1c4b536f"
DOWNLOAD_DIR ${TPSRC}
CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX:PATH=${TPSRC}/dist ${TPSRC}/src/scalapack-2.0.2
)
SET(SCALAPACK_LIB scalapack CACHE FILEPATH
"SCALAPACK library" FORCE)
LINK_DIRECTORIES(${TPSRC}/dist/lib)
ELSE (THIRDPARTY_BUILD_SCALAPACK)
INCLUDE (FindScalapack)
ENDIF (THIRDPARTY_BUILD_SCALAPACK)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment