Skip to content

Commit

Permalink
Merge pull request #16 from topazus/fix-find-scalapack
Browse files Browse the repository at this point in the history
CMake: Improve to find OpenMPI version of scalapack
  • Loading branch information
liuyangzhuan authored Jun 4, 2024
2 parents 29ae075 + d6906fb commit 5bb6b89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/Modules/FindSCALAPACK.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
if (NOT (TPL_SCALAPACK_LIBRARIES))
find_library(SCALAPACK_LIBRARY
NAMES scalapack scalapack-pvm scalapack-mpi scalapack-mpich scalapack-mpich2 scalapack-openmpi scalapack-lam
PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /sw/lib /usr/lib64/mpich/lib
PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /sw/lib /usr/lib64/openmpi/lib /usr/lib64/mpich/lib
ENV LD_LIBRARY_PATH ENV SCALAPACKDIR ENV BLACSDIR)
find_library(BLACS_LIBRARY
NAMES blacs blacs-pvm blacs-mpi blacs-mpich blacs-mpich2 blacs-openmpi blacs-lam mpiblacs scalapack ${SCALAPACK_LIBRARY}
PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /sw/lib /usr/lib64/mpich/lib
PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /sw/lib /usr/lib64/openmpi/lib /usr/lib64/mpich/lib
ENV LD_LIBRARY_PATH ENV SCALAPACKDIR ENV BLACSDIR)
set(SCALAPACK_LIBRARIES ${SCALAPACK_LIBRARY} ${BLACS_LIBRARY})
else()
Expand All @@ -14,4 +14,4 @@ endif()

# Report the found libraries, quit with fatal error if any required library has not been found.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SCALAPACK DEFAULT_MSG SCALAPACK_LIBRARIES)
find_package_handle_standard_args(SCALAPACK DEFAULT_MSG SCALAPACK_LIBRARIES)

0 comments on commit 5bb6b89

Please sign in to comment.