我正在尝试Ax=b
在基于 Eigen libary c++ 的项目中使用 Cholmod 超节点求解器求解(我通过 Eigen 调用 cholmod),A
它是一个尺寸为 5Mx5M 的稀疏矩阵,并且在运行时出现以下错误:
CHOLMOD error: problem too large. file: C:\suitesparse\SuiteSparse\CHOLMOD\Include\../Supernodal/cholmod_super_symbolic.c line: 683
CHOLMOD error: argument missing. file: C:\suitesparse\SuiteSparse\CHOLMOD\Include\../Cholesky/cholmod_factorize.c line: 121
这是文件中 cholmod 源代码的一部分,cholmod_super_symbolic.c line: 683
我认为第二个错误是由于第一个错误。
if (ssize < 0 ||(find_xsize && xxsize > Int_max))
{
/* Int overflow, clear workspace and return.
QR factorization will not use xxsize, so that error is ignored.
For Cholesky factorization, however, memory of space xxsize
will be allocated, so this is a failure. Both QR and Cholesky
fail if ssize overflows. */
ERROR (CHOLMOD_TOO_LARGE, "problem too large") ;
FREE_WORKSPACE ;
return (FALSE) ;
}
我想可能是因为 int 索引溢出但我不知道如何修复它,我尝试过更小的矩阵并且效果很好。我也试图改变特征定义()中稀疏矩阵A的_StorageIndex
从int
到,但我有这个编译错误:.long int
Eigen::SparseMatrix<double,0,long int > SPaMtr
cannot convert argument 3 from 'const long *' to 'const int *'