Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

MKL + Eigen library in split code

MKway
Beginner
604 Views

Currently, I have some problems using MKL & Eigen library (a C++ template library for linear algebra).

I test the matrix multiply using Eigen library and Intel_MKL. I made code sample and it shows me awesome results in reducing time cost. 

And, I try to separate the sample code. but the result does not show me the awesome results (the whole code form is the same as before).

why does not time cost reduces using separate code?

I use this : Eigen library & inte MKL & mpicxx ( i don't know version checking)

I attached the sample code as a zip.
please, could you check the error or missing something in the separated code?

About attached directory,

  1. no separate code 
  2. separate code 

Thank you

0 Kudos
6 Replies
PrasanthD_intel
Moderator
560 Views

Hi,


Could you please provide which version of parallel studio/OneAPI you were using?

you can get the intel compiler version with this command:

icpc -v and icpc -V


Also please mention your system configuration (CPU cores, RAM, OS).

You can get CPU information with the cpuinfo command.


Regards

Prasanth


MKway
Beginner
540 Views
Thank you for replying

The intel compiler version is "icpc version 18.0.1 (gcc version 4.8.5 compatibility)" (using 'icpc -v')

And I use the below systems
CPU : Intel(R) Xeon(R) Silver 4110, which has 16 cores.
OS : linux (centOS)
memory : MemTotal : 65441696KB (in /proc/meminfo/)

Do you want to know the other information? or Are there any problems?

With many thank,
MKway
PrasanthD_intel
Moderator
509 Views

Hi,


Thanks for providing the details we have asked for.

We have found a similar issue when testing your code. We have used the latest Intel C compiler but still found performance differences when code is separated.

We are transferring this issue to the internal team for better support.


Regards

Prasanth


Gennady_F_Intel
Moderator
492 Views

jaewook, which MKL version did you try to test?


MKway
Beginner
488 Views
I use the intel MKL 2018.
And I found the error point! The error point is in define statement order!

I just try to change the order of '#define EIGEN_USE_MKL_ALL' in order to define before #include<Eigen> and then test it.

I can solve the problem.

I really want to thank you for your help.
Happy new year 2021,
MKway
Gennady_F_Intel
Moderator
478 Views

Ok, thanks for the update. This issue has been resolved and closed. Any further interaction in this thread will be considered community only. 


Reply