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

Eigen and OpenMP

Tags: None
(comma "," separated)
felipe.mt87
Registered Member
Posts
2
Karma
0
OS

Eigen and OpenMP

Wed Feb 15, 2012 12:15 pm
Hi,

I'm having problems with MatrixXd allocation (program crashes) when inside a parallel region, eg

Code: Select all
#pragma omp parallel
{
MatrixXd M(20,20);
... do some computations
}

I found out that if using a definied type like this

Code: Select all
typedef Matrix<double, Dynamic,Dynamic,RowMajor,20,20> Tensor;

instead MatrixXd, solve the problem. However, I have a lot of matrices
with very different sizes in my code, it would be necessary to create a type for each one, so this option is not feasible.

any suggestions?

Thank you
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Eigen and OpenMP

Wed Feb 15, 2012 5:19 pm
that's rather strange. which Eigen version do you have? we fixed an openmp issue in 3.0.5 and 3.1.0-alpha2 but I don't see how your trick could workaround this precise isssue. if updating does not solve your issue, could you provide a small exemple that trigger the issue... thanks.


Bookmarks



Who is online

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