From 47f930ba428f1adfd3ecc89548e9b22e67934fa3 Mon Sep 17 00:00:00 2001 From: Emil Briggs <290825+elbriggs@users.noreply.github.com> Date: Fri, 8 Jul 2022 13:30:07 -0400 Subject: [PATCH] A few more tweaks to enable using an external scalapack library on additional platforms. --- CMakeLists.txt | 4 +++- cmake/Modules/FindSCALAPACK.cmake | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9724794a0..21c139f95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -210,7 +210,9 @@ endif() # Look for scalapack if(NOT USE_INTERNAL_SCALAPACK) - find_package(SCALAPACK) + if(NOT CRAY_HOST) + find_package(SCALAPACK) + endif() endif() diff --git a/cmake/Modules/FindSCALAPACK.cmake b/cmake/Modules/FindSCALAPACK.cmake index 8d7034f87..8c9130e0f 100644 --- a/cmake/Modules/FindSCALAPACK.cmake +++ b/cmake/Modules/FindSCALAPACK.cmake @@ -13,7 +13,7 @@ find_library (SCALAPACK_LIBRARIES NAMES scalapack) # if not found try using the MPI library path as a hint # since it's often included there if(NOT SCALAPACK_LIBRARIES) - get_filename_component(RMG_MPI_LIB_PATH ${MPI_C_LIBRARIES} PATH CACHE) + get_filename_component(RMG_MPI_LIB_PATH ${MPI_C_LIBRARIES} DIRECTORY CACHE) endif() find_library (SCALAPACK_LIBRARIES NAMES scalapack HINTS "${RMG_MPI_LIB_PATH}" "$ENV{SCALAPACK_LIB}"