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

What Need to Be Config to Boost Compiler Speed for Eigen

Tags: None
(comma "," separated)
toycoming2u
Registered Member
Posts
11
Karma
0
OS
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...
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
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?
toycoming2u
Registered Member
Posts
11
Karma
0
OS
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,
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
It is true that sparse solver will give a better time performance, right?


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.
toycoming2u
Registered Member
Posts
11
Karma
0
OS
ggael wrote:
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.


Yes, I am using partialPivLu().solve(). Could you guide me more for the resource to setup "openmp"?
toycoming2u
Registered Member
Posts
11
Karma
0
OS
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.


Bookmarks



Who is online

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