Skip to content

Commit c26d5ef

Browse files
Use silent linear verbosity by default to avoid BLAS errors
Change the default linear_verbosity from Minimal() to None() in NonlinearVerbosity to prevent BLAS errors from being emitted when the linear solver encounters singular matrices. These errors are not fatal in the nonlinear solver context since the solver handles singular matrices gracefully by falling back to QR. Fixes #739 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 43ddc35 commit c26d5ef

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/NonlinearSolveBase/src/verbosity.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,10 @@ function NonlinearVerbosity(;
132132
end
133133

134134
# Build arguments using NamedTuple for type stability
135+
# Use None() for linear_verbosity by default since BLAS errors are not fatal
136+
# in the nonlinear solver context (the solver handles singular matrices gracefully)
135137
default_args = (
136-
linear_verbosity = linear_verbosity === nothing ? Minimal() : linear_verbosity,
138+
linear_verbosity = linear_verbosity === nothing ? None() : linear_verbosity,
137139
non_enclosing_interval = WarnLevel(),
138140
alias_u0_immutable = WarnLevel(),
139141
linsolve_failed_noncurrent = WarnLevel(),
@@ -167,8 +169,10 @@ end
167169
function NonlinearVerbosity(verbose::AbstractVerbosityPreset)
168170
if verbose isa Minimal
169171
# Minimal: Only fatal errors and critical warnings
172+
# Use None() for linear_verbosity since BLAS errors are not fatal
173+
# in the nonlinear solver context (the solver handles singular matrices gracefully)
170174
NonlinearVerbosity(
171-
linear_verbosity = Minimal(),
175+
linear_verbosity = None(),
172176
non_enclosing_interval = WarnLevel(),
173177
alias_u0_immutable = Silent(),
174178
linsolve_failed_noncurrent = WarnLevel(),

0 commit comments

Comments
 (0)