Registered Member
|
I want to use OpenMP together with Eigen. I followed these steps: http://eigen.tuxfamily.org/dox/TopicMultiThreading.html. However, it seems that the built-in parallelization in Eigen is much faster than using OpenMP (0.38sec vs 7.96sec).
Using Eigen:
Using Eigen & OpenMP:
|
Moderator
|
Since your loop is already multi-threaded you should disable Eigen's multithreading with setNbThreads(1); Also, you should disable hyperthreading or run your executable with OMP_NUM_THREADS=<true number of cores>
|
Registered Member
|
Yes, I did so. I just realized that Eigen cannot employ the cores for the matrix multiplication anymore, when they are already used for the distribution of the for loop ... |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]