Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • I INMOST
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Terekhov
  • INMOST
  • Wiki
  • 1590 MatSolve Example

Last edited by Bagaev Dmitri Nov 29, 2016
Page history

1590 MatSolve Example

Solve the Matrix stored in mtx format

The code for this example is located in Examples/MatSolve

Brief

This example solves the linear system using different solvers.

Description

This example may run in both serial and parallel modes with NP processes.

The code loads the matrix and right-hand side from files. If right-hand side is omitted, the artificial rhs=(1,1,...,1) is used. The specific solver is defined by user. User may also provide options file to alter default solver options.

Arguments

Usage: ./MatSolve -m "matrix.mtx" [arguments]
  • Available arguments
    • Required
      • -m, --matrix, specifies path to the matrix file, e.g. "/tmp/A.mtx"
    • Optional
      • -b, --bvector, specifies path to the rhs file, e.g. "/tmp/b.rhs"
      • -x, --xvector, specifies path to the solution
      • -p, --parameters, specifies path to the database file, see Examples/MatSolve/database.xml as example;
      • -t, --type, specifies solver type, "inner_ilu2" by default
      • -h, --help, prints help message

Running example

FVDiscr/tmp/A.mtx and right-hand side /tmp/b.rhsFVDiscr example

$ cd Examples/MatSolve
$ mpirun -np 4 ./MatSolve -m /tmp/A.mtx -b /tmp/b.rhs 
load matrix: 0.346156
load vector: 0.0542159
preconditioner: 0.516358
solver: 0.0345631.37095e-06 | 0
||Ax-b|| 1.37095e-06 ||b|| 2.14884 ||Ax-b||/||b|| 6.37997e-07
norms: 0.00276518
4 processors solved in 0.95183 secs with 4 iterations to 1.37095e-06 norm matrix "/tmp/A.mtx" vector "/tmp/b.rhs" true residual ||Ax-b||/||b|| 6.37997e-07
reason: converged due to relative tolerance
Clone repository
  • 0100 Compilation
  • 0200 Compilation Windows
  • 0201 Obtain MSVC
  • 0202 Obtain MSMPI
  • 0203 Compilation INMOST Windows
  • 0204 Compilation ParMETIS Windows
  • 0205 Compilation Zoltan Windows
  • 0206 Compilation PETSc Windows
  • 0207 Compilation Trilinos Windows
  • 0400 Compilation Linux
  • 0401 Install MPI
  • 0402 Compilation INMOST Linux
  • 0403 Compilation PETSc Linux
  • 0404 Compilation Trilinos Linux
  • 0405 Compilation ParMETIS Linux
View All Pages