Skip to content

Commit

Permalink
MUMPS linking: if dummy MUMPS_MPISEQ_LIBRARY library exists, assume M…
Browse files Browse the repository at this point in the history
…UMPS was compiled in sequential, other in parallel mode
  • Loading branch information
cvanaret committed Sep 25, 2024
1 parent 97eba41 commit b3770e4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,8 @@ else()

list(APPEND DIRECTORIES ${MUMPS_INCLUDE_DIR})

# TODO handle that in a clean way
set(MUMPS_MODE "SEQUENTIAL")
if(${MUMPS_MODE} STREQUAL "PARALLEL")
if(${MUMPS_MPISEQ_LIBRARY} STREQUAL "MUMPS_MPISEQ_LIBRARY-NOTFOUND")
# parallel
add_definitions("-D MUMPS_PARALLEL")
find_package(MPI REQUIRED)
list(APPEND LIBRARIES MPI::MPI_CXX MPI::MPI_Fortran)
Expand All @@ -112,8 +111,8 @@ else()
find_package(ScaLAPACK REQUIRED)
list(APPEND LIBRARIES ${ScaLAPACK_LIBRARY})
list(APPEND DIRECTORIES ${ScaLAPACK_INCLUDE_DIRS})
endif()
if(${MUMPS_MODE} STREQUAL "SEQUENTIAL")
else()
# sequential
add_definitions("-D MUMPS_SEQUENTIAL")
# link dummy parallel library (provided by MUMPS distribution)
link_to_uno(MUMPS_MPISEQ_LIBRARY ${MUMPS_MPISEQ_LIBRARY})
Expand Down

0 comments on commit b3770e4

Please sign in to comment.