From 7e992a2894cce9565d2549d72d95e61c64a62f21 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Wed, 7 Aug 2013 00:32:52 +0200 Subject: [PATCH] Enable use of parallel version of MUMPS If we have enabled MPI, then we must call MPI_Init and MPI_Finalize in the program anyway so we may as well use the parallel version of MUMPS. --- cmake/Modules/FindAGMG.cmake | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cmake/Modules/FindAGMG.cmake b/cmake/Modules/FindAGMG.cmake index 7f2476bc8..92cf80611 100644 --- a/cmake/Modules/FindAGMG.cmake +++ b/cmake/Modules/FindAGMG.cmake @@ -23,13 +23,23 @@ find_file (AGMG_SOURCES NO_DEFAULT_PATH ) +# USE_MPI is an option that must be declared in the program +# if this is enabled, then we use the parallel version of MUMPS +# in package "libmumps-dev"; otherwise use serial version in +# "libmumps-seq-dev" +if (USE_MPI) + set (_seq "") +else () + set (_seq "_seq") +endif () + # AGMG is dependent on having the MUMPS library present find_path (MUMPS_INCLUDE_DIR dmumps_struc.h PATH_SUFFIXES include ) find_library (MUMPS_LIBRARY - NAMES dmumps_seq + NAMES dmumps${_seq} DOC "MUltifrontal Massive Parallel sparse direct Solver" )