Common Solver Options (Keyword Arguments for Solve)
While many algorithms have specific arguments within their constructor, the keyword arguments for solve are common across all the algorithms in order to give composability. These are also the options taken at init time. The following are the options these algorithms take, along with their defaults.
General Controls
alias::LinearAliasSpecifier: Holds the fieldsalias_Aandalias_bwhich specify whether to alias the matricesAandbrespectively. When these fields aretrue,Aandbcan be written to and changed by the solver algorithm. When fields arenothingthe default behavior is used, which is to default totruewhen the algorithm is known not to modify the matrices, and false otherwise.verbose: Whether to print extra information. Defaults tofalse.assumptions: Sets the assumptions of the operator in order to effect the default choice algorithm. See the Operator Assumptions page for more details.
Iterative Solver Controls
Error controls are not used by all algorithms. Specifically, direct solves always solve completely. Error controls only apply to iterative solvers.
abstol: The absolute tolerance. Defaults to√(eps(eltype(A)))reltol: The relative tolerance. Defaults to√(eps(eltype(A)))maxiters: The number of iterations allowed. Defaults tolength(prob.b)Pl,Pr: The left and right preconditioners, respectively. For more information, see the Preconditioners page.
Verbosity Controls
The verbosity system in LinearSolve.jl provides fine-grained control over the diagnostic messages, warnings, and errors that are displayed during the solution of linear systems. To use this system, a keyword argument verbose is provided to solve.
LinearSolve.LinearVerbosity — TypeLinearVerbosity <: AbstractVerbositySpecifierVerbosity configuration for LinearSolve.jl solvers, providing fine-grained control over diagnostic messages, warnings, and errors during linear system solution.
Fields
Error Control Group
default_lu_fallback: Messages when falling back to LU factorization from other methodsblas_errors: Critical BLAS errors that stop computationblas_invalid_args: BLAS errors due to invalid arguments
Performance Group
no_right_preconditioning: Messages when right preconditioning is not used
Numerical Group
using_IterativeSolvers: Messages when using the IterativeSolvers.jl packageIterativeSolvers_iterations: Iteration count messages from IterativeSolvers.jlKrylovKit_verbosity: Verbosity level passed to KrylovKit.jl solversKrylovJL_verbosity: Verbosity level passed to Krylov.jl solversHYPRE_verbosity: Verbosity level passed to HYPRE solverspardiso_verbosity: Verbosity level passed to Pardiso solversblas_info: Informational messages from BLAS operationsblas_success: Success messages from BLAS operationscondition_number: Messages related to condition number calculationsconvergence_failure: Messages when iterative solvers fail to convergesolver_failure: Messages when solvers fail for reasons other than convergencemax_iters: Messages when iterative solvers reach maximum iterations
Constructors
LinearVerbosity(preset::AbstractVerbosityPreset)Create a LinearVerbosity using a preset configuration:
SciMLLogging.None(): All messages disabledSciMLLogging.Minimal(): Only critical errors and fatal issuesSciMLLogging.Standard(): Balanced verbosity (default)SciMLLogging.Detailed(): Comprehensive debugging informationSciMLLogging.All(): Maximum verbosityLinearVerbosity(; error_control=nothing, performance=nothing, numerical=nothing, kwargs...)
Create a LinearVerbosity with group-level or individual field control.
Examples
# Use a preset
verbose = LinearVerbosity(SciMLLogging.Standard())
# Set entire groups
verbose = LinearVerbosity(
error_control = SciMLLogging.WarnLevel(),
numerical = SciMLLogging.InfoLevel()
)
# Set individual fields
verbose = LinearVerbosity(
default_lu_fallback = SciMLLogging.InfoLevel(),
KrylovJL_verbosity = SciMLLogging.CustomLevel(1),
blas_errors = SciMLLogging.ErrorLevel()
)
# Mix group and individual settings
verbose = LinearVerbosity(
numerical = SciMLLogging.InfoLevel(), # Set all numerical to InfoLevel
blas_errors = SciMLLogging.ErrorLevel() # Override specific field
)Basic Usage
Global Verbosity Control
using LinearSolve
# Suppress all messages
verbose = LinearVerbosity(SciMLLogging.None())
prob = LinearProblem(A, b)
sol = solve(prob; verbose=verbose)
# Show only essential messages (critical errors and fatal issues)
verbose = LinearVerbosity(SciMLLogging.Minimal())
sol = solve(prob; verbose=verbose)
# Use default settings (balanced verbosity for typical usage)
verbose = LinearVerbosity(SciMLLogging.Standard())
sol = solve(prob; verbose=verbose)
# Show comprehensive debugging information
verbose = LinearVerbosity(SciMLLogging.Detailed())
sol = solve(prob; verbose=verbose)
# Show all messages (maximum verbosity)
verbose = LinearVerbosity(SciMLLogging.All())
sol = solve(prob; verbose=verbose)Group Level Control
# Customize by category
verbose = LinearVerbosity(
error_control = SciMLLogging.Warn(), # Show warnings for error control related issues
performance = SciMLLogging.Silent(), # Suppress performance messages
numerical = SciMLLogging.Info() # Show all numerical related log messages at info level
)
sol = solve(prob; verbose=verbose)Fine-grained Control
The constructor for LinearVerbosity allows you to set verbosity for each specific message toggle, giving you fine-grained control. The verbosity settings for the toggles are automatically passed to the group objects.
# Set specific message types
verbose = LinearVerbosity(
default_lu_fallback = SciMLLogging.InfoLevel(), # Show info when LU fallback is used
KrylovJL_verbosity = SciMLLogging.WarnLevel(), # Show warnings from KrylovJL
no_right_preconditioning = SciMLLogging.Silent(), # Suppress right preconditioning messages
KrylovKit_verbosity = SciMLLogging.Level(KrylovKit.WARN_LEVEL) # Set KrylovKit verbosity level using KrylovKit's own verbosity levels
)
sol = solve(prob; verbose=verbose)