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

How to fix the "Segmetation Fault" error

Tags: None
(comma "," separated)
flyfan
Registered Member
Posts
15
Karma
0
I want to design a multiple threads program based on Eigen and the threads library is from STL. But I got the "Segmetation Fault" error, and the complier points the error that is from this function:
/** \internal Frees memory allocated with handmade_aligned_malloc */
inline void handmade_aligned_free(void *ptr)
{
if (ptr) std::free(*(reinterpret_cast<void**>(ptr) - 1));
}

And the value of the void* type variant ptr is 0x2b77f030.

How to fix this error?

PS. For a small scale problem, my program works well. But for a large scale program, like the 30000*30000 sparse matrix with 300,000 none zero values, the error will happen.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
I case you still haven't fixed your problem, first make sure you are using the lasted Eigen release (i.e., 3.3.3), and then check for race conditions in your program.
flyfan
Registered Member
Posts
15
Karma
0
ggael wrote:I case you still haven't fixed your problem, first make sure you are using the lasted Eigen release (i.e., 3.3.3), and then check for race conditions in your program.

The version of Eigen is indeed 3.3.3. I am still confused by the problem and I have no idea to fix this bug since for small scale problem the multiple threads program works well and breaks down for large scale problem.
flyfan
Registered Member
Posts
15
Karma
0
ggael wrote:I case you still haven't fixed your problem, first make sure you are using the lasted Eigen release (i.e., 3.3.3), and then check for race conditions in your program.

Hello ggael. Thanks for your attention. It seems that I have caught the error. Using UmfPackLU solver not SparseLU solver in the multiple threads program will work well. However the sparseLU solver is more effectient in single thread program.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
oh, could it be that SparseLU is running out of memory?
flyfan
Registered Member
Posts
15
Karma
0
ggael wrote:oh, could it be that SparseLU is running out of memory?

Maybe


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]