From c26d5ef50577312cab072f5f34e15b6b9ab1db99 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas Date: Thu, 27 Nov 2025 09:14:48 -0500 Subject: [PATCH] Use silent linear verbosity by default to avoid BLAS errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- lib/NonlinearSolveBase/src/verbosity.jl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/NonlinearSolveBase/src/verbosity.jl b/lib/NonlinearSolveBase/src/verbosity.jl index ab4b558f1..f7d50aa63 100644 --- a/lib/NonlinearSolveBase/src/verbosity.jl +++ b/lib/NonlinearSolveBase/src/verbosity.jl @@ -132,8 +132,10 @@ function NonlinearVerbosity(; end # Build arguments using NamedTuple for type stability + # Use None() for linear_verbosity by default since BLAS errors are not fatal + # in the nonlinear solver context (the solver handles singular matrices gracefully) default_args = ( - linear_verbosity = linear_verbosity === nothing ? Minimal() : linear_verbosity, + linear_verbosity = linear_verbosity === nothing ? None() : linear_verbosity, non_enclosing_interval = WarnLevel(), alias_u0_immutable = WarnLevel(), linsolve_failed_noncurrent = WarnLevel(), @@ -167,8 +169,10 @@ end function NonlinearVerbosity(verbose::AbstractVerbosityPreset) if verbose isa Minimal # Minimal: Only fatal errors and critical warnings + # Use None() for linear_verbosity since BLAS errors are not fatal + # in the nonlinear solver context (the solver handles singular matrices gracefully) NonlinearVerbosity( - linear_verbosity = Minimal(), + linear_verbosity = None(), non_enclosing_interval = WarnLevel(), alias_u0_immutable = Silent(), linsolve_failed_noncurrent = WarnLevel(),