solveur_petsc_deriv
Additional information is available in the PETSC documentation: https://petsc.org/release/manual/
Parameters:
- [seuil] (type: float) corresponds to the iterative solver convergence value. The iterative solver converges when the Euclidean residue standard ||Ax-B|| is less than seuil.
- [quiet] (type: flag) is a keyword which is used to not displaying any outputs of the solver.
- [impr] (type: flag) used to request display of the Euclidean residue standard each time this iterates through the conjugated gradient (display to the standard outlet).
- [rtol] (type: float) not_set
- [atol] (type: float) not_set
- [save_matrix_mtx_format] (type: flag) not_set
solveur_petsc_bicgstab
Synonyms: bicgstab
Inherits from: solveur_petsc_deriv
Stabilized Bi-Conjugate Gradient
Parameters:
- [precond] (type: preconditionneur_petsc_deriv) not_set
- [seuil] (type: float) corresponds to the iterative solver convergence value. The iterative solver converges when the Euclidean residue standard ||Ax-B|| is less than seuil.
- [quiet] (type: flag) is a keyword which is used to not displaying any outputs of the solver.
- [impr] (type: flag) used to request display of the Euclidean residue standard each time this iterates through the conjugated gradient (display to the standard outlet).
- [rtol] (type: float) not_set
- [atol] (type: float) not_set
- [save_matrix_mtx_format] (type: flag) not_set
solveur_petsc_cholesky
Synonyms: cholesky
Inherits from: solveur_petsc_deriv
Parallelized version of Cholesky from MUMPS library. This solver accepts an option to select a different ordering than the automatic selected one by MUMPS (and printed by using the impr option). The possible choices are Metis, Scotch, PT-Scotch or Parmetis. The two last options can only be used during a parallel calculation, whereas the two first are available for sequential or parallel calculations. It seems that the CPU cost of A=LU factorization but also of the backward/forward elimination steps may sometimes be reduced by selecting a different ordering (Scotch seems often the best for b/f elimination) than the default one.
Notice that this solver requires a huge amont of memory compared to iterative methods. To know how much RAM you will need by core, then use the impr option to have detailled informations during the analysis phase and before the factorisation phase (in the following output, you will learn that the largest memory is taken by the zeroth CPU with 108MB):
Rank of proc needing largest memory in IC facto : 0
Estimated corresponding MBYTES for IC facto : 108
Thanks to the following graph, you read that in order to solve for instance a flow on a mesh with 2.6e6 cells, you will need to run a parallel calculation on 32 CPUs if you have cluster nodes with only 4GB/core (6.2GB*0.42~2.6GB) :

Parameters:
- [save_matrice | save_matrix] (type: flag) not_set
- [save_matrix_petsc_format] (type: flag) not_set
- [reduce_ram] (type: flag) not_set
- [cli_quiet] (type: solveur_petsc_option_cli) not_set
- [cli] (type: solveur_petsc_option_cli) not_set
- [seuil] (type: float) corresponds to the iterative solver convergence value. The iterative solver converges when the Euclidean residue standard ||Ax-B|| is less than seuil.
- [quiet] (type: flag) is a keyword which is used to not displaying any outputs of the solver.
- [impr] (type: flag) used to request display of the Euclidean residue standard each time this iterates through the conjugated gradient (display to the standard outlet).
- [rtol] (type: float) not_set
- [atol] (type: float) not_set
- [save_matrix_mtx_format] (type: flag) not_set
solveur_petsc_cholesky_lapack
Synonyms: cholesky_lapack
Inherits from: solveur_petsc_deriv
Sequential Cholesky via LAPACK (cannot be used in parallel). Accepts factored_matrix to save/read/disk-cache the factorisation.
Parameters:
- [factored_matrix] (type: string into ['save', 'read', 'disk']) Cache the LU factorisation: save writes it after computing, read loads a precomputed one, disk reads if present and otherwise computes-then-saves.
- [seuil] (type: float) corresponds to the iterative solver convergence value. The iterative solver converges when the Euclidean residue standard ||Ax-B|| is less than seuil.
- [quiet] (type: flag) is a keyword which is used to not displaying any outputs of the solver.
- [impr] (type: flag) used to request display of the Euclidean residue standard each time this iterates through the conjugated gradient (display to the standard outlet).
- [rtol] (type: float) not_set
- [atol] (type: float) not_set
- [save_matrix_mtx_format] (type: flag) not_set
solveur_petsc_cholesky_mumps_blr
Synonyms: cholesky_mumps_blr
Inherits from: solveur_petsc_deriv
BLR for (Block Low-Rank)
Parameters:
- [reduce_ram] (type: flag) not_set
- [dropping_parameter] (type: float) not_set
- [cli] (type: solveur_petsc_option_cli) not_set
- [seuil] (type: float) corresponds to the iterative solver convergence value. The iterative solver converges when the Euclidean residue standard ||Ax-B|| is less than seuil.
- [quiet] (type: flag) is a keyword which is used to not displaying any outputs of the solver.
- [impr] (type: flag) used to request display of the Euclidean residue standard each time this iterates through the conjugated gradient (display to the standard outlet).
- [rtol] (type: float) not_set
- [atol] (type: float) not_set
- [save_matrix_mtx_format] (type: flag) not_set
solveur_petsc_cholesky_out_of_core
Synonyms: cholesky_out_of_core
Inherits from: solveur_petsc_deriv
Same as the previous one but with a written LU decomposition of disk (save RAM memory but add an extra CPU cost during Ax=B solve).
Parameters:
- [seuil] (type: float) corresponds to the iterative solver convergence value. The iterative solver converges when the Euclidean residue standard ||Ax-B|| is less than seuil.
- [quiet] (type: flag) is a keyword which is used to not displaying any outputs of the solver.
- [impr] (type: flag) used to request display of the Euclidean residue standard each time this iterates through the conjugated gradient (display to the standard outlet).
- [rtol] (type: float) not_set
- [atol] (type: float) not_set
- [save_matrix_mtx_format] (type: flag) not_set
solveur_petsc_cholesky_pastix
Synonyms: cholesky_pastix
Inherits from: solveur_petsc_deriv
Parallelized Cholesky from PASTIX library.
Parameters:
- [seuil] (type: float) corresponds to the iterative solver convergence value. The iterative solver converges when the Euclidean residue standard ||Ax-B|| is less than seuil.
- [quiet] (type: flag) is a keyword which is used to not displaying any outputs of the solver.
- [impr] (type: flag) used to request display of the Euclidean residue standard each time this iterates through the conjugated gradient (display to the standard outlet).
- [rtol] (type: float) not_set
- [atol] (type: float) not_set
- [save_matrix_mtx_format] (type: flag) not_set
solveur_petsc_cholesky_superlu
Synonyms: cholesky_superlu
Inherits from: solveur_petsc_deriv
Parallelized Cholesky from SUPERLU_DIST library (less CPU and RAM, efficient than the previous one)
Parameters:
- [seuil] (type: float) corresponds to the iterative solver convergence value. The iterative solver converges when the Euclidean residue standard ||Ax-B|| is less than seuil.
- [quiet] (type: flag) is a keyword which is used to not displaying any outputs of the solver.
- [impr] (type: flag) used to request display of the Euclidean residue standard each time this iterates through the conjugated gradient (display to the standard outlet).
- [rtol] (type: float) not_set
- [atol] (type: float) not_set
- [save_matrix_mtx_format] (type: flag) not_set
solveur_petsc_cholesky_umfpack
Synonyms: cholesky_umfpack
Inherits from: solveur_petsc_deriv
Sequential Cholesky from UMFPACK library (seems fast).
Parameters:
- [seuil] (type: float) corresponds to the iterative solver convergence value. The iterative solver converges when the Euclidean residue standard ||Ax-B|| is less than seuil.
- [quiet] (type: flag) is a keyword which is used to not displaying any outputs of the solver.
- [impr] (type: flag) used to request display of the Euclidean residue standard each time this iterates through the conjugated gradient (display to the standard outlet).
- [rtol] (type: float) not_set
- [atol] (type: float) not_set
- [save_matrix_mtx_format] (type: flag) not_set
solveur_petsc_cli
Synonyms: cli
Inherits from: solveur_petsc_deriv
Command Line Interface. Should be used only by advanced users, to access the whole solver/preconditioners from the PETSC API. To find all the available options, run your calculation with the -ksp_view -help options:
trust datafile [N] –ksp_view –help
-pc_type Preconditioner:(one of) none jacobi pbjacobi bjacobi sor lu shell mg eisenstat ilu icc cholesky asm ksp composite redundant nn mat fieldsplit galerkin openmp spai hypre tfs (PCSetType)
HYPRE preconditioner options:
-pc_hypre_type pilut (choose one of) pilut parasails boomeramg
HYPRE ParaSails Options
-pc_hypre_parasails_nlevels 1: Number of number of levels (None)
-pc_hypre_parasails_thresh 0.1: Threshold (None)
-pc_hypre_parasails_filter 0.1: filter (None)
-pc_hypre_parasails_loadbal 0: Load balance (None)
-pc_hypre_parasails_logging: FALSE Print info to screen (None)
-pc_hypre_parasails_reuse: FALSE Reuse nonzero pattern in preconditioner (None)
-pc_hypre_parasails_sym nonsymmetric (choose one of) nonsymmetric SPD nonsymmetric,SPD
Krylov Method (KSP) Options
-ksp_type Krylov method:(one of) cg cgne stcg gltr richardson chebychev gmres tcqmr bcgs bcgsl cgs tfqmr cr lsqr preonly qcg bicg fgmres minres symmlq lgmres lcd (KSPSetType)
-ksp_max_it 10000: Maximum number of iterations (KSPSetTolerances)
-ksp_rtol 0: Relative decrease in residual norm (KSPSetTolerances)
-ksp_atol 1e-12: Absolute value of residual norm (KSPSetTolerances)
-ksp_divtol 10000: Residual norm increase cause divergence (KSPSetTolerances)
-ksp_converged_use_initial_residual_norm: Use initial residual residual norm for computing relative convergence
-ksp_monitor_singular_value stdout: Monitor singular values (KSPMonitorSet)
-ksp_monitor_short stdout: Monitor preconditioned residual norm with fewer digits (KSPMonitorSet)
-ksp_monitor_draw: Monitor graphically preconditioned residual norm (KSPMonitorSet)
-ksp_monitor_draw_true_residual: Monitor graphically true residual norm (KSPMonitorSet)
Example to use the multigrid method as a solver, not only as a preconditioner:
Solveur_pression Petsc CLI {-ksp_type richardson -pc_type hypre -pc_hypre_type boomeramg -ksp_atol 1.e-7 }
Parameters:
solveur_petsc_cli_quiet
Synonyms: cli_quiet
Inherits from: solveur_petsc_deriv
solver
Parameters:
solveur_petsc_gcp
Synonyms: gcp
Inherits from: solveur_petsc_deriv
Preconditioned Conjugate Gradient
Parameters:
- [precond] (type: preconditionneur_petsc_deriv) preconditioner
- [precond_nul] (type: flag) No preconditioner used, equivalent to precond null { }
- [rtol] (type: float) not_set
- [reuse_preconditioner_nb_it_max] (type: int) not_set
- [cli] (type: solveur_petsc_option_cli) not_set
- [reorder_matrix] (type: int) not_set
- [read_matrix] (type: flag) save_matrix|read_matrix are the keywords to save|read into a file the constant matrix A of the linear system Ax=B solved (eg: matrix from the pressure linear system for an incompressible flow). It is useful when you want to minimize the MPI communications on massive parallel calculation. Indeed, in VEF discretization, the overlapping width (generaly 2, specified with the largeur_joint option in the partition keyword partition) can be reduced to 1, once the matrix has been properly assembled and saved. The cost of the MPI communications in TRUST itself (not in PETSc) will be reduced with length messages divided by 2. So the strategy is: I) Partition your VEF mesh with a largeur_joint value of 2 II) Run your parallel calculation on 0 time step, to build and save the matrix with the save_matrix option. A file named Matrix_NBROWS_rows_NCPUS_cpus.petsc will be saved to the disk (where NBROWS is the number of rows of the matrix and NCPUS the number of CPUs used). III) Partition your VEF mesh with a largeur_joint value of 1 IV) Run your parallel calculation completly now and substitute the save_matrix option by the read_matrix option. Some interesting gains have been noticed when the cost of linear system solve with PETSc is small compared to all the other operations.
- [save_matrice | save_matrix] (type: flag) see read_matrix
- [petsc_decide] (type: int) not_set
- [pcshell] (type: string) not_set
- [aij] (type: flag) not_set
- [seuil] (type: float) corresponds to the iterative solver convergence value. The iterative solver converges when the Euclidean residue standard ||Ax-B|| is less than seuil.
- [quiet] (type: flag) is a keyword which is used to not displaying any outputs of the solver.
- [impr] (type: flag) used to request display of the Euclidean residue standard each time this iterates through the conjugated gradient (display to the standard outlet).
- [atol] (type: float) not_set
- [save_matrix_mtx_format] (type: flag) not_set
solveur_petsc_gmres
Synonyms: gmres
Inherits from: solveur_petsc_deriv
Generalized Minimal Residual
Parameters:
- [precond] (type: preconditionneur_petsc_deriv) not_set
- [reuse_preconditioner_nb_it_max] (type: int) not_set
- [save_matrix_petsc_format] (type: flag) not_set
- [nb_it_max] (type: int) In order to specify a given number of iterations instead of a condition on the residue with the keyword seuil. May be useful when defining a PETSc solver for the implicit time scheme where convergence is very fast: 5 or less iterations seems enough.
- [seuil] (type: float) corresponds to the iterative solver convergence value. The iterative solver converges when the Euclidean residue standard ||Ax-B|| is less than seuil.
- [quiet] (type: flag) is a keyword which is used to not displaying any outputs of the solver.
- [impr] (type: flag) used to request display of the Euclidean residue standard each time this iterates through the conjugated gradient (display to the standard outlet).
- [rtol] (type: float) not_set
- [atol] (type: float) not_set
- [save_matrix_mtx_format] (type: flag) not_set
solveur_petsc_ibicgstab
Synonyms: ibicgstab
Inherits from: solveur_petsc_deriv
Improved version of previous one for massive parallel computations (only a single global reduction operation instead of the usual 3 or 4).
Parameters:
- [precond] (type: preconditionneur_petsc_deriv) not_set
- [seuil] (type: float) corresponds to the iterative solver convergence value. The iterative solver converges when the Euclidean residue standard ||Ax-B|| is less than seuil.
- [quiet] (type: flag) is a keyword which is used to not displaying any outputs of the solver.
- [impr] (type: flag) used to request display of the Euclidean residue standard each time this iterates through the conjugated gradient (display to the standard outlet).
- [rtol] (type: float) not_set
- [atol] (type: float) not_set
- [save_matrix_mtx_format] (type: flag) not_set
solveur_petsc_lu
Synonyms: lu
Inherits from: solveur_petsc_deriv
Several solvers through PETSc API are available.
TIPS:
A) Solver for symmetric linear systems (e.g: Pressure system from Navier-Stokes equations):
-The CHOLESKY parallel solver is from MUMPS library. It offers better performance than all others solvers if you have enough RAM for your calculation. A parallel calculation on a cluster with 4GBytes on each processor, 40000 cells/processor seems the upper limit. Seems to be very slow to initialize above 500 cpus/cores.
-When running a parallel calculation with a high number of cpus/cores (typically more than 500) where preconditioner scalabilty is the key for CPU performance, consider BICGSTAB with BLOCK_JACOBI_ICC(1) as preconditioner or if not converges, GCP with BLOCK_JACOBI_ICC(1) as preconditioner.
-For other situations, the first choice should be GCP/SSOR. In order to fine tune the solver choice, each one of the previous list should be considered. Indeed, the CPU speed of a solver depends of a lot of parameters. You may give a try to the OPTIMAL solver to help you to find the fastest solver on your study.
B) Solver for non symmetric linear systems (e.g.: Implicit schemes):
The BICGSTAB/DIAG solver seems to offer the best performances.
Parameters:
- [seuil] (type: float) corresponds to the iterative solver convergence value. The iterative solver converges when the Euclidean residue standard ||Ax-B|| is less than seuil.
- [quiet] (type: flag) is a keyword which is used to not displaying any outputs of the solver.
- [impr] (type: flag) used to request display of the Euclidean residue standard each time this iterates through the conjugated gradient (display to the standard outlet).
- [rtol] (type: float) not_set
- [atol] (type: float) not_set
- [save_matrix_mtx_format] (type: flag) not_set
solveur_petsc_pipecg
Synonyms: pipecg
Inherits from: solveur_petsc_deriv
Pipelined Conjugate Gradient (possible reduced CPU cost during massive parallel calculation due to a single non-blocking reduction per iteration, if TRUST is built with a MPI-3 implementation)... no example in TRUST
Parameters:
- [seuil] (type: float) corresponds to the iterative solver convergence value. The iterative solver converges when the Euclidean residue standard ||Ax-B|| is less than seuil.
- [quiet] (type: flag) is a keyword which is used to not displaying any outputs of the solver.
- [impr] (type: flag) used to request display of the Euclidean residue standard each time this iterates through the conjugated gradient (display to the standard outlet).
- [rtol] (type: float) not_set
- [atol] (type: float) not_set
- [save_matrix_mtx_format] (type: flag) not_set