Skip to content

Commit 397e87b

Browse files
committed
Add cmake file for ScaLAPACK
1 parent c318456 commit 397e87b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

cmake/Modules/FindScaLAPACK.cmake

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
if (NOT (TPL_SCALAPACK_LIBRARIES))
2+
find_library(SCALAPACK_LIBRARY
3+
NAMES scalapack scalapack-pvm scalapack-mpi scalapack-mpich scalapack-mpich2 scalapack-openmpi scalapack-lam
4+
PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /sw/lib /usr/lib64/openmpi/lib /usr/lib64/mpich/lib
5+
ENV LD_LIBRARY_PATH ENV SCALAPACKDIR ENV BLACSDIR)
6+
find_library(BLACS_LIBRARY
7+
NAMES blacs blacs-pvm blacs-mpi blacs-mpich blacs-mpich2 blacs-openmpi blacs-lam mpiblacs scalapack ${SCALAPACK_LIBRARY}
8+
PATHS /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /sw/lib /usr/lib64/openmpi/lib /usr/lib64/mpich/lib
9+
ENV LD_LIBRARY_PATH ENV SCALAPACKDIR ENV BLACSDIR)
10+
set(SCALAPACK_LIBRARIES ${SCALAPACK_LIBRARY} ${BLACS_LIBRARY})
11+
else()
12+
set(SCALAPACK_LIBRARIES ${TPL_SCALAPACK_LIBRARIES})
13+
endif()
14+
15+
# Report the found libraries, quit with fatal error if any required library has not been found.
16+
include(FindPackageHandleStandardArgs)
17+
find_package_handle_standard_args(SCALAPACK DEFAULT_MSG SCALAPACK_LIBRARIES)

0 commit comments

Comments
 (0)