Wrapper for MUMPS Library

Some basic features of 'MUMPS' (Multifrontal Massively Parallel sparse direct Solver) are wrapped in a class whose methods can be used for sequentially solving a sparse linear system (symmetric or not) with one or many right hand sides (dense or sparse). There is a possibility to do separately symbolic analysis, LU (or LDL^t) factorization and system solving. Third part ordering libraries are included and can be used: 'PORD', 'METIS', 'SCOTCH'. 'MUMPS' method was first described in Amestoy et al. (2001) and Amestoy et al. (2006) .

Rcpp Wrapper for MUMPS Library

MUMPS stands for "a MUltifrontal Massively Parallel sparse direct Solver" see more on their official site http://mumps.enseeiht.fr/. Currently, it is one of the most competitive direct solvers for sparse matrices. On my CPU (Xenon E5-2609 v2 @ 2.50GHz) I have a speedup ranging from 3 to 16 compared to the default solver from Matrix package. In addition, the precision of the solution is equal or even better than with Matrix.

Example of use: library(Matrix) library(rmumps) n=2000 a=Matrix(0, n, n) set.seed(7) ij=sample(1:(nn), 15n) a[ij]=runif(ij) diag(a)=0 diag(a)=-rowSums(a) a[1,1]=a[1,1]-1 am=Rmumps$new(a) b=as.double(a%%(1:n)) # rhs for an exact solution vector 1:n # following time includes symbolic analysis, LU factorization and system solving system.time(x<-am$solve(b)) bb=2b # this second time should be much shorter # as symbolic analysis and LU factorization are already done system.time(xx<-am$solve(bb)) # compare to Matrix corresponding times system.time(xm<-solve(a, b)) system.time(xxm<-solve(a, bb)) # compare to Matrix precision range(x-1:n) # mumps range(xm-1:n) # Matrix

   # matrix inversion
   system.time(aminv <- am$inv())
   system.time(ainv <- solve(a)) # the same in Matrix
   # clean up by hand to avoid possible interference between gc() and
   # Rcpp object destructor after unloading this namespace


Version 5.1.2-6

  • 2019-04-23
  • added C++ methods set_mat_ptr(), set_rhs_ptr()
  • added R and C++ methods set_permutation(), get_permutation()
  • defined RMUMPS_PERM_ constants for different permutations
  • added C++ constructor from i,j,v pointers
  • added tests for C++ code;
  • changed F77 for FC in Makevars;

Version 5.1.2-5

  • 2018-12-18
  • renamed MUMPS *.F files to *.F95 to be comnformant with R conventions for file extensions
  • removed STOP call in mpi.f

Version 5.1.2-4

  • 2018-01-05
  • fixed usage of -fPIC option
  • fixed non ASCII character in DESCRIPTION file

Version 5.1.2-3

  • 2018-01-03
  • added doi refs in DESCRIPTION:Description field
  • fixed errors in tests for older R releases

Version 5.1.2-2

  • 2017-12-13

Version 5.1.2-1

  • 2017-12-12
  • upgrade MUMPS from v5.1.1 to v5.1.2
  • fixed a compilation error of metis library on windows/R-released

Version 5.1.1-3

  • 2017-09-19
  • fixed warning "Integer division truncated to constant ‘768614336404’" in dana_aux.F

Version 5.1.1-2

  • 2017-07-05
  • fixed gfortran-6 warning "Integer division truncated to constant ‘768614336404’"
  • fixed C warning about header guard

Version 5.1.1-1

  • 2017-04-26
  • upgraded MUMPS to the latest version 5.1.1
  • added set_keep() method
  • added mumps_version() method


  • 2017-03-06
  • added library SCOTCH v6.0.4 (http://gforge.inria.fr/projects/scotch/) as option for ordering (...$set_icntl(3, 7))
  • default ICNTL(33) is set to 1, i.e. the determinant is calculated (before was 0, i.e. no determinant calculation)
  • added det() and determinant() methods returning determinant value
  • added sym parameter to constructor. Now symmetric matrices can be decomposed as LDL^t
  • added solvet() method for solving transposed system
  • fixed registering C-callable in coming R-3.4


  • 2016-12-21
  • increased default auxiliary memory via ICNTL(14)=50 (was 25)
  • added methods for finer control and information: set_cntl(), get_cntl(), set_icntl(), get_icntl(), get_infos()


  • 2016-08-25
  • fixed compilation with -pedantic option


  • 2016-04-14
  • fixed building process (by R-core team)


  • 2016-04-12
  • added method triplet() rendreding a simple_triplet_matrix (cf. package slam)
  • fixed job registering for symbolic() method
  • fixed compiler warning about non initialized n and nz in new_mat();
  • fixed valgrind's warning about non initialized memory use in dmumps()


  • 2016-02-22
  • added constructor from slam::simple_triplet_matrix
  • added multiple right hand side solver for slam::simple_triplet_matrix
  • added S3method for Rcpp_Rmumps class: solve(), dim(), nrow(), ncol(), print(), show();
  • fixed constructor from i, j, v triplicate;


  • 2016-01-20
  • INTEGER type is compiled as int32 and not int64 as in previous version;
  • fixed a typo in inst/example.R;
  • fixed some building issues on all platforms (all reported by Prof. Brian Ripley):
  • no more cmake is needed on Linux and Mac OS;
  • no more sources kept in binary package;
  • MAKE env. variable is respected now;
  • explicit mention of gcc is removed;
  • /bin/rm is replaced by $(RM);
  • fixed a non initialized variable use in C++ code;
  • a .a prefix is used for static library on Windows instead of .dll;
  • fixed the use of default values in constructors which are ignored by RcppModule (detected by UBSAN test run by R-core team);


  • 2015-12-17
  • initial release. Provides solve(), numeric() and symbolic() methods

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


5.2.1-14 by Serguei Sokol, 5 months ago

http://mumps.enseeiht.fr/, https://github.com/sgsokol/rmumps/

Report a bug at https://github.com/sgsokol/rmumps/issues

Browse source code at https://github.com/cran/rmumps

Authors: Serguei Sokol [aut, cre] , Emmanuel Agullo [ctb] , Patrick Amestoy [ctb, cph] , Maurice Bremond [ctb] , Alfredo Buttari [ctb] , Philippe Combes [ctb] , Marie Durand [ctb] , Aurelia Fevre [ctb] , Abdou Guermouche [ctb] , Guillaume Joslin [ctb] , Jacko Koster [ctb] , Jean-Yves L'Excellent [ctb] , Stephane Pralet [ctb] , Chiara Puglisi [ctb] , Francois-Henry Rouet [ctb] , Wissam Sid-Lakhdar [ctb] , Tzvetomila Slavova [ctb] , Bora Ucar [ctb] , Clement Weisbecker [ctb] , Juergen Schulze [ctb] , George Karypis [ctb] , Douglas C. Schmidt [ctb] , Isamu Hasegawa [ctb] , Alexander Chemeris [ctb] , Makoto Matsumoto [ctb] , Takuji Nishimura [ctb] , Francois Pellegrini [ctb] , David Goudin [ctb] , Pascal Henon [ctb] , Pierre Ramet [ctb] , Sebastien Fourestier [ctb] , Jun-Ho Her [ctb] , Cedric Chevalier [ctb] , Timothy A. Davis [ctb, cph] , Iain S. Duff [ctb, cph] , John K. Reid [ctb, cph] , Richard Stallman [ctb] , Samuel Thibault [ctb, cph] , CERFACS [cph] , CNRS [cph] , ENS Lyon [cph] , INP Toulouse [cph] , INRIA [cph] , University of Bordeaux [cph] , Regents of the University of Minnesota [cph] , Free Software Foundation , Inc [cph] , Alexander Chemeris [cph] , Makoto Matsumoto [cph] , Takuji Nishimura [cph] , Universite de Bordeaux [cph] , CNRS [cph] , INRAE [cph]

Documentation:   PDF Manual  

Task views: Numerical Mathematics

GPL (>= 2) license

Imports Rcpp

Depends on methods

Suggests testthat, Matrix, slam

Linking to Rcpp

System requirements: C++11, GNU Make

Depended on by multbxxc, r2sundials.

Suggested by conos, sccore.

See at CRAN