MyNixOS website logo
Description

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) <doi:10.1137/S0895479899358194> and Amestoy et al. (2006) <doi:10.1016/j.parco.2005.07.004>.

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:

   # prepare random sparse matrix
   library(Matrix)
   library(rmumps)
   n=2000
   a=Matrix(0, n, n)
   set.seed(7)
   ij=sample(1:(n*n), 15*n)
   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=2*b
   # 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
   rm(am)
Metadata

Version

5.2.1-30

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows