Registered Member
|
I have a program that calls Eigen from a std::thread (Eigen is set to single-threaded using Eigen::setNbThreads(1)).
I never had any problem with that setup, on any platform, until now. I just upgraded to El Capitan, and it looks like my program now crashes inside Eigen, when it calls omp_get_num_threads(). I am able to reproduce it without Eigen, so it's not Eigen's problem. But I'm just wondering if it's possible to make Eigen not call any OpenMP function if set to use 1 thread? Thanks! Test program:
|
Registered Member
|
Looks like that's fixed in GCC 5.2, and calling omp_get_num_threads() from a std::thread is working again.
Would still be nice to have a special case for if num threads is set to 1, though, in case another implementation does this again (interaction between OpenMP and other threading libraries is undefined). |
Moderator
|
Good idea, done in the devel branch, changeset https://bitbucket.org/eigen/eigen/commits/b8d476bed76b
|
Registered Member
|
Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar