lsolve(1)

πŸ“¦ version 2.1.11, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

✨ lsolve β€” NAME ✨

okay so bestie, meet lsolve: a linear solver for sparse matrices. that's it, that's the whole job. she solves. she slays. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

lsolve matrix_filename rhs_setting solution_filename rhistory_filename [options]

like. four positional args and then whatever options you're feeling. no biggie. 🫢


🌸 DESCRIPTION 🌸

so here's the tea. this program inputs the data of the coefficient matrix from matrix_filename and then solves the linear equation

A*x = b

using the solver that you picked in the options. then it writes the solution out to solution_filename in the extended Matrix Market format</> and drops the residual history into rhistory_filename in the PLAIN format</> (peep the Appendix of the Lis User Guide for that one, iykyk). and for matrix_filename, both the extended Matrix Market format and the Harwell-Boeing format are supported. versatile queen. πŸ‘‘

one of these values can be specified by rhs_setting:

  • 0 β€” use the right hand side vector b included in matrix_filename
  • 1 β€” use b = (1, ..., 1)^T
  • 2 β€” use b = A * (1, ..., 1)^T

and then there's this one:

  • rhs_filename β€” the filename for the right-hand side vector

the PLAIN and Matrix Market formats are supported for rhs_filename. noted. πŸ’–


πŸ’… OPTIONS πŸ’…

the following options are supported, and yes we're going through all of them, no skipping, that would be rude:

  • -i linear solver β€” pick your fighter. the following options are supported for linear solver:
    • -i {cg|1} β€” CG
    • -i {bicg|2} β€” BiCG
    • -i {cgs|3} β€” CGS
    • -i {bicgstab|4} β€” BiCGSTAB
    • -i {bicgstabl|5} β€” BiCGSTAB(l)
      • -ell [2] β€” the degree l
    • -i {gpbicg|6} β€” GPBiCG
    • -i {tfqmr|7} β€” TFQMR
    • -i {orthomin|8} β€” Orthomin(m)
      • -restart [40] β€” the restart value m
    • -i {gmres|9} β€” GMRES(m)
      • -restart [40] β€” the restart value m
    • -i {jacobi|10} β€” Jacobi
    • -i {gs|11} β€” Gauss-Seidel
    • -i {sor|12} β€” SOR
      • -omega [1.9] β€” the relaxation coefficient omega (0<omega<2)
    • -i {bicgsafe|13} β€” BiCGSafe
    • -i {cr|14} β€” CR
    • -i {bicr|15} β€” BiCR
    • -i {crs|16} β€” CRS
    • -i {bicrstab|17} β€” BiCRSTAB
    • -i {gpbicr|18} β€” GPBiCR
    • -i {bicrsafe|19} β€” BiCRSafe
    • -i {fgmres|20} β€” FGMRES(m)
      • -restart [40] β€” the restart value m
    • -i {idrs|21} β€” IDR(s)
      • -irestart [2] β€” the restart value s
    • -i {idr1|22} β€” IDR(1)
    • -i {minres|23} β€” MINRES
    • -i {COCG|24} β€” COCG
    • -i {COCR|25} β€” COCR
  • -p preconditioner β€” the glow-up before the solve. the following options are supported for preconditioner:
    • -p {none|0} β€” none
    • -p {jacobi|1} β€” Jacobi
    • -p {ilu|2} β€” ILU(k)
      • -ilu_fill [0] β€” the fill level k
    • -p {ssor|3} β€” SSOR
      • -ssor_omega [1.0] β€” the relaxation coefficient omega (0<omega<2)
    • -p {hybrid|4} β€” Hybrid
      • -hybrid_i [sor] β€” the linear solver
      • -hybrid_maxiter [25] β€” the maximum number of the iterations
      • -hybrid_tol [1.0e-3] β€” the convergence criterion
      • -hybrid_omega [1.5] β€” the relaxation coefficient omega of the SOR (0<omega<2)
      • -hybrid_ell [2] β€” the degree l of the BiCGSTAB(l)
      • -hybrid_restart [40] β€” the restart values of the GMRES and Orthomin
    • -p {is|5} β€” I+S
      • -is_alpha [1.0] β€” the parameter alpha of I+alpha*S(m)
      • -is_m [3] β€” the parameter m of I+alpha*S(m)
    • -p {sainv|6} β€” SAINV
      • -sainv_drop [0.05] β€” the drop criterion
    • -p {saamg|7} β€” SA-AMG
      • -saamg_unsym [false] β€” select the unsymmetric version (the matrix structure must be symmetric)
      • -saamg_theta [0.05|0.12] β€” the drop criterion
    • -p {iluc|8} β€” Crout ILU
      • -iluc_drop [0.05] β€” the drop criterion
      • -iluc_rate [5.0] β€” the ration of maximum fill-in
    • -p {ilut|9} β€” ILUT
      • -ilut_drop [0.05] β€” the drop criterion
      • -ilut_rate [5.0] β€” the ration of maximum fill-in
  • -adds true β€” Additive Schwarz
    • -adds_iter [1] β€” the number of the iteration

other options, the supporting cast, still iconic:

  • -maxiter [1000] β€” the maximum number of the iterations
  • -tol [1.0e-12] β€” the convergence criterion
  • -print [0] β€” the output of the residual history
    • -print {none|0} β€” none
    • -print {mem|1} β€” save the residual history
    • -print {out|2} β€” output it to the standard output
    • -print {all|3} β€” save the residual history and output it to the standard output
  • -scale [0] β€” the scaling
    • -scale {none|0} β€” no scaling
    • -scale {jacobi|1} β€” the Jacobi scaling
    • -scale {symm_diag|2} β€” the diagonal scaling
  • -initx_zeros [true] β€” the behavior of the initial vector x_0
    • -initx_zero {false|0} β€” given values
    • -initx_zero {true|1} β€” all values are set to 0
  • -omp_num_threads [t] β€” the number of the threads (t represents the maximum number of the threads)
  • -storage [0] β€” the matrix storage format
  • -storage_block [2] β€” the block size of the BSR and BSC formats
  • -f [0] β€” the precision of the linear solver
    • -f {double|0} β€” double precision
    • -f {quad|1} β€” double-double (quadruple) precision
see the Lis User Guide for full description. bestie, there's more lore than what fits in one manpage. πŸ“–βœ¨

πŸ“ EXIT STATUS πŸ“

the following exit values are returned:

  • 0 β€” the process is normally terminated. we love a clean exit. πŸŽ‰
  • unspecified β€” an error occurred. 😭

🌈 SEE ALSO 🌈


and that's the whole page, babe. this man page is dated 14 Sep 2017 and it lives under the man page source, so like… when you're reading it, that's the version and date you're getting. no cap. go solve something sparse. πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from