This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Runtime Exception Using SuperLU class for SparseMatrix facto

Tags: None
(comma "," separated)
davgutavi
Registered Member
Posts
2
Karma
0
OS
Hello,

I´m trying to use the SuperLU class to factorize a sparse matrix.

This is the code (it is very simple):

Code: Select all
#define EIGEN_SUPERLU_SUPPORT
#define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
#include <C:\Eigen\Dense>
#include <C:\Eigen\Sparse>
#include <C:\Eigen\SuperLUSupport>
#include <stdlib.h>
using namespace Eigen;
using namespace std;

int main (void){

SparseMatrix<float> A (5,5);
A.reserve(2);
A.insert(2,1) = 3.0;
A.insert(1,3) = 22.0;
A.makeCompressed();

SuperLU<SparseMatrix<float> > solver;
solver.analyzePattern(A);
solver.factorize(A);

return 0;

}


The compilation is OK (I have built all depenedences correctly). But when I run the application, it doesn´t work because run time exception is thrown. The exception sais: "Unhandled Exception in 0x77e415de in USeigen.exe: 0xC0000005: Access violation writing to location 0xeb0ffb84."
I have debbuged the program and I have known that the exception is thrown in "factorize" metho.
I´m using Visual Studio 2010 on a Windows 7 System.

Can you help me, please?? I suppose it's a simple mistake.

Thank You Very Much.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
I guess that's because your matrix is not invertible and that errors returned by SuperLU may not be properly handled. To be sure, put ones on the diagonals.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
well, you should also check that:

solver.info()==Success

after each step !
davgutavi
Registered Member
Posts
2
Karma
0
OS
It works!.

Thank you very much!


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]