[英]Lapack error with SGETRF
I am using LAPACK library
to solve an optimization problem. 我正在使用LAPACK library
来解决优化问题。 I am getting different Lapack errors (Lapack error(1,2,3,4) with SGETRF)
. 我收到了不同的Lapack错误(Lapack error(1,2,3,4) with SGETRF)
。 Is there any documentation source, which I can read to understand what exactly these errors mean? 是否有任何文档来源可供阅读,以了解这些错误的确切含义?
Most of Lapack routines return an error code in the argument INFO
. 大多数Lapack例程在INFO
参数中返回错误代码。 The meaning of this output is specified in the documentation of the function sgetrf()
此输出的含义在函数sgetrf()
的文档中指定
If INFO is null, then everething is OK ! 如果INFO为null,则一切正常! If INFO <0 , an error was detected in the input parameters. 如果INFO <0,则在输入参数中检测到错误。 For instance, for sgetrf()
: 例如,对于sgetrf()
:
The routine xerbla()
can be applied to print the right error message: 例程xerbla()
可以用于打印正确的错误消息:
XERBLA( 'SGETRF', -INFO )
If INFO>0, the document clearly describes what is happening : 如果INFO> 0,文档将清楚地描述正在发生的事情:
U(i,i) is exactly zero. U(i,i)恰好为零。 The factorization has been completed, but the factor U is exactly singular, and division by zero will occur if it is used to solve a system of equations. 分解已经完成,但是因子U恰好是单数,如果将其用于求解方程组,则将被零除。
This problem can occur if the matrix is singular or ill-conditionned. 如果矩阵是奇异的或病态的,则会发生此问题。 If the matrix A
is singular, there might be different solutions, or no solution at all to the problem Ax=b
. 如果矩阵A
是奇异的,那么对于问题Ax=b
可能有不同的解决方案,或者根本没有解决方案。 If INFO=1, it is likely that the matrix is null. 如果INFO = 1,则矩阵很可能为空。
Hence, testing INFO
is to be considered as a good practice as functions such as sgetrf()
or sgesv()
are called... 因此,测试INFO
被认为是一种好习惯,因为诸如sgetrf()
或sgesv()
类的函数被称为...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.