You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- using_IterativeSolvers: Controls messages when using the IterativeSolvers.jl package (default: Warn)
115
117
- IterativeSolvers_iterations: Controls messages about iteration counts from IterativeSolvers.jl (default: Warn)
116
118
- KrylovKit_verbosity: Controls messages from the KrylovKit.jl package (default: Warn)
117
-
- KrylovJL_verbosity: Controls verbosity of the KrylovJL.jl package (default: None)
119
+
- KrylovJL_verbosity: Controls verbosity of the KrylovJL.jl package (default: None)
120
+
- blas_errors: Controls messages for BLAS/LAPACK errors like singular matrices (default: Warn)
121
+
- blas_info: Controls informational messages from BLAS/LAPACK operations (default: None)
122
+
- blas_success: Controls success messages from BLAS/LAPACK operations (default: None)
123
+
124
+
### BLAS/LAPACK Return Code Interpretation
125
+
126
+
LinearSolve.jl now provides detailed interpretation of BLAS/LAPACK return codes (info parameter) to help diagnose numerical issues. When BLAS/LAPACK operations encounter problems, the logging system will provide human-readable explanations based on the specific return code and operation.
127
+
128
+
#### Common BLAS/LAPACK Return Codes
129
+
130
+
-**info = 0**: Operation completed successfully
131
+
-**info < 0**: Argument -info had an illegal value (e.g., wrong dimensions, invalid parameters)
132
+
-**info > 0**: Operation-specific issues:
133
+
-**LU factorization (getrf)**: U(info,info) is exactly zero, matrix is singular
134
+
-**Cholesky factorization (potrf)**: Leading minor of order info is not positive definite
135
+
-**QR factorization (geqrf)**: Numerical issues with Householder reflector info
136
+
-**SVD (gesdd/gesvd)**: Algorithm failed to converge, info off-diagonal elements did not converge
137
+
-**Eigenvalue computation (syev/heev)**: info off-diagonal elements did not converge to zero
138
+
-**Bunch-Kaufman (sytrf/hetrf)**: D(info,info) is exactly zero, matrix is singular
139
+
140
+
#### Example Usage with Enhanced BLAS Logging
141
+
142
+
```julia
143
+
using LinearSolve
144
+
145
+
# Enable detailed BLAS error logging
146
+
verbose =LinearVerbosity(
147
+
blas_errors = Verbosity.Info(), # Show detailed error interpretations
148
+
blas_timing = Verbosity.Info(), # Show performance metrics
149
+
blas_info = Verbosity.Info() # Show all BLAS operation details
150
+
)
151
+
152
+
# Solve a potentially singular system
153
+
A = [1.02.0; 2.04.0] # Singular matrix
154
+
b = [1.0, 2.0]
155
+
prob =LinearProblem(A, b)
156
+
sol =solve(prob, LUFactorization(); verbose=verbose)
157
+
158
+
# The logging will show:
159
+
# - BLAS/LAPACK dgetrf: Matrix is singular
160
+
# - Details: U(2,2) is exactly zero. The factorization has been completed, but U is singular
0 commit comments