File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ using LinearSolve
2+ using LinearSolve: LinearVerbosity
3+ using SciMLLogging: SciMLLogging, Verbosity
4+ using Test
5+
6+ A = [1.0 0 0 0
7+ 0 1 0 0
8+ 0 0 1 0
9+ 0 0 0 0 ]
10+ b = rand (4 )
11+ prob = LinearProblem (A, b)
12+
13+ @test_logs (:warn ,
14+ " LU factorization failed, falling back to QR factorization. `A` is potentially rank-deficient." ) solve (
15+ prob,
16+ verbose = LinearVerbosity (default_lu_fallback = Verbosity. Warn ()))
17+
18+ @test_logs (:warn ,
19+ " LU factorization failed, falling back to QR factorization. `A` is potentially rank-deficient." ) solve (
20+ prob, verbose = true )
21+
22+ @test_logs min_level= SciMLLogging. Logging. Warn solve (prob, verbose = false )
23+
24+ @test_logs (:info ,
25+ " LU factorization failed, falling back to QR factorization. `A` is potentially rank-deficient." ) solve (
26+ prob,
27+ verbose = LinearVerbosity (default_lu_fallback = Verbosity. Info ()))
You can’t perform that action at this time.
0 commit comments