Skip to content

adam-sim-dev/mumps

 
 

Repository files navigation

MUMPS sparse solver

ci ci_build oneapi-linux

CMake downloads the unmodified source tarfile from MUMPS developers and builds. CMake builds MUMPS in parallel faster and more conveniently than the original Makefiles. CMake allows easy reuse of MUMPS in external projects via CMake FetchContent or ExternalProject or cmake --install.

MUMPS CeCILL-C license is distinct from this CMake script license. MUMPS teams typically make new releases each year.

Many compilers and systems are supported by CMake build system on Windows, MacOS and Linux. Static (default) or Shared cmake -DBUILD_SHARED_LIBS=on MUMPS builds are supported.

Platforms known to work with MUMPS and CMake include:

  • Windows
  • MacOS
    • GCC (Homebrew)
  • Linux
    • GCC
    • Intel oneAPI
    • NVIDIA HPC SDK
    • Cray

By default PORD ordering is used. Scotch, METIS, and parMETIS ordering can be used.

Several LAPACK vendors are supported.

The MUMPS project is distinct from this CMake script wrapper. See the MUMPS Users email list and MUMPS User Guide for any questions about MUMPS itself.

Build

From this repo's top directory:

cmake -B build
cmake --build build

Numerous MUMPS build options are available.

With the default options the build/ directory contains library binaries (Windows binaries have different names):

  • libdmumps.a (real64)
  • libsmumps.a (real32)
  • libmumps_common.a (common MUMPS routines)
  • libpord.a (PORD library)

If -DMUMPS_parallel=no was set, an additional helper library is built in place of linking MPI libraries:

  • libmpiseq.a

These libraries can be linked into C, C++, Fortran, etc. programs, or even be used with appropriate interfaces from Matlab and Python PyMUMPS and python-mumps.

Self test and examples

Optionally, run self-tests:

ctest --test-dir build

To build the example, first "install" the MUMPS package-the default install location is under the MUMPS build/local directory:

cmake --install build

cmake -S example -B example/build -DMUMPS_ROOT=build/local

cmake --build example/build

Using binary libraries

Linking the MUMPS binaries into a user-program is project-dependent. An example using the examples in this project with GNU GCC, using the "mpicxx" MPI compiler wrapper:

mpicxx ./example/d_example.cpp -I./build/local/include -L./build/local/lib -ldmumps -lmumps_common -lpord -lscalapack -lblacs -llapack -lblas -lgfortran

If -DMUMPS_parallel=no was used to build MUMPS, instead do:

g++ ./example/d_example.cpp -I./build/local/include -L./build/local/lib -ldmumps -lmumps_common -lpord -llapack -lblas -lmpiseq -lgfortran

Releases

No releases published

Packages

No packages published

Languages

  • CMake 84.2%
  • Fortran 7.6%
  • C 6.1%
  • C++ 2.1%