MSOLV-fortran – A modern Fortran API for Sparse Direct Solvers, as part of

MUSST_img

Find us on…

GitHub

MSOLV-fortran


Table of Contents

Brief description

A generic API for using Sparse Direct Solvers, written in modern Fortran. It is designed to work with:

  • MUMPS - MUltifrontal Massively Parallel sparse direct Solver 1
  • UMFPACK - Unsymmetric MultiFrontal method solver 2
  • SuperLU - LU decomposition with partial pivoting and triangular system solves through forward and back substitution 3
  • MA48 - Sparse unsymmetric system solver 4

top

Requested libraries

  • Generic
    • librefblas.a
    • liblapack.a

  • MUMPS
    • libmetis.a
    • libmpiseq.a
    • libmumps_common.a
    • libdmumps.a

  • UMFPACK
    • libamd.a
    • libcamd.a
    • libcolamd.a
    • libccolamd.a
    • libcholmod.a
    • libsuitesparseconfig.a
    • libumfpack.a

  • SuperLU
    • libsuperlu.a

  • MA48
    • libhsl_ma48.a

top

Example of use

test_solvers proposes to test the solvers on two systems, a very small one and a "bigger" one. Some solvers have an "analyze" step during which symbolic factorization is performed. Hence if the sparsity of a new system does not change much, the symbolic factorisation is reused for the numerical factorization. To assess the time gained, after the first resolution other resolution are proposed with the same matrix pattern. After each resolution, the error is assessed remultipying the solution by the matrix and comparing it to the right-hand side.

top

Data format

By default,

  • UMFPACK and SuperLU are configured to read Compressed Column Harwell/Boeing formatted data,

  • MUMPS reads elemental CC formatted data,

  • MA48 reads sparse triplet formatted data.

top

Limitations

The package MUSST is developped to handle some lubrication problems thanks to a multiscale approach. During the processe, sparse linear systems are solved either on concurrent threads or using all threads. In the first case, 'OpenMP' is not usefull because each thread is dedicated to the resolution of its own bunch of systems (Bottom Scale systems). In the second case, 'OpenMP' is desirable to speed up the resolution (Top Scale systems). For the moment, MUSST isn't designed for distributed shared memory architectures. Therefore the following choices are made:

  • MUMPS is built with its sequential configuration (OpenMP, but not MPI). It is dedicated to TS systems.

  • BLAS is built without OpenMP

  • UMFPACK, SuperLU and MA48 are built without OpenMP. They are dedicated to BS systems.

top

Prerequesites

The solver libraries must be downloaded and statically compiled together with their prerequisites:

  • UMFPACK
    BLAS, LAPACK

  • MUMPS
    BLAS, SCOTCH

  • SuperLU
    BLAS

  • MA48
    BLAS

top

Wrappers

  • UMFPACK
    A module mumfpack has been developped by Ladislav Hanyk. It has been checked with UMFPACK 5.6.2, but it also works fine here with UMFPACK 5.7.6.

  • MUMPS
    A module mumps_wrapper is created with the content of dmumps_struc.h provided by MUMPS and it includes mpif.h, also provided by MUMPS. It is to be noticed that almost all global variables are deactivated in mpif.h.

  • SuperLU
    A module sulu_wrapper is created from scratch because following SuperLU fortran examples (with the wrapper provided by SuperLU), we were not able to continuously solve systems with systematic memory release. As a consequence, the memory needed by MUSST increased untill the programs would stop.

  • MA48
    In its double flavour, HSL_MA48 needs 3 files: common90.f90, ddeps90.f90 and hsl_ma48d.f90, renamed hsl_common90.f90 and hsl_ddeps90.f90 for the two first. In order to work with arrays independently from the solvers, the global solver type MAT_SOLV contains the system arrays –like eltptr, eltvar, a_elt, etc.– pointed by a solver type, for instance ZD11_TYPE. Therefore, in version 3.3 of HSL_MA48, the attribute allocatable (in ZD11_TYPE) of row, col, ptr and val is changed to pointer.

top

Make

General syntax:

make clean all "DEBUG=[yes,'']" "GPROF=[yes,'']"

Examples:

  • first clean all, then make the 'debug' executable prg for profiling
make clean
make all "DEBUG=yes" "GPROF=yes"
  • just build the modified sources, then make a productive executable
make all

top

Full description

The aim of the present project is to provide generic subroutines for the direct full resolution of sparse linear systems:

  • solver initialization
call solve_syst(mat=system_type, step='ini')
  • system analyze
call solve_syst(mat=system_type, step='ana')
  • system factorization
call solve_syst(mat=system_type, step='fac')
  • system solution
call solve_syst(mat=system_type, step='sol')
  • memory release
call solve_syst(mat=system_type, step='fre')
  • solver finalization
call solve_syst(mat=system_type, step='end')

system_type is of complex type MAT_SOLV built to deal with MUMPS, UMFPACK, SuperLU and MA48 requirements.

top

License


  1. CeCILL-C license 

  2. GNU GPL 

  3. New BSD-3 

  4. HSL software is strictly intended for Personal academic use on the download page 

Developer Info

Arthur Francisco - Noël Brunetière