Registered Member
|
Hello All,
Just need to learn how to config compiler to allow best performance using eigen to solve linear equation for numerical problem with more than 1000x1000 matrix size. I am currently using Microsoft Visual Studio2010 and Xcode 3.2.6 for MacOS. Any sharing on how to boosting performance on both compilers above (beside using release mode instead of debug one) is really appreciated. Best and Happy New Year... |
Moderator
|
Make sure SSE2 or above is enabled. This is enabled by default for 64bits build, but has to be enabled explicitly for 32bits builds. The respective flag is -msse2 for gcc.
Are you solving dense or sparse problems? |
Registered Member
|
I am a newbie so now I am just using a dense solver one. But I plan to swab to take advantage of sparse system when I gain more experience with Eigen.
It is true that sparse solver will give a better time performance, right? Thanks for the note about how to config the complier. Best, |
Moderator
|
only if your matrix is really sparse, like a dozen of non-zeros per column or row. If you solve general square problems with PartialPivLU (or x=A.lu().solve(b)), then you can also enable openmp (a compiler option) to get advantage of multi-threading. |
Registered Member
|
Yes, I am using partialPivLu().solve(). Could you guide me more for the resource to setup "openmp"? |
Registered Member
|
I found how to do it.
Sharing for Xcode user. All configurations can be found by: 1. Goto "Configure SCM or This Project..." under SCM bar 2. Goto "Build" tab 3. Select whether you want to configure for Release of Debug mode 4. Recommend to select "Setting Defined at This..." under Show tab 5. There are choices for Enable "OpenMP", "Auto-vectorization", "SSE3, 4.1, 4.2 and SSSE3". Thanks for all answers. |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]