Skip to content

Commit

Permalink
Add cmake file for ScaLAPACK
Browse files Browse the repository at this point in the history
  • Loading branch information
pghysels committed Jun 4, 2024
1 parent c318456 commit 397e87b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions cmake/Modules/FindScaLAPACK.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
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/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/openmpi/lib /usr/lib64/mpich/lib
ENV LD_LIBRARY_PATH ENV SCALAPACKDIR ENV BLACSDIR)
set(SCALAPACK_LIBRARIES ${SCALAPACK_LIBRARY} ${BLACS_LIBRARY})
else()
set(SCALAPACK_LIBRARIES ${TPL_SCALAPACK_LIBRARIES})
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)

0 comments on commit 397e87b

Please sign in to comment.