Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Yanick_Cote
Beginner
166 Views

Profiling code that uses MKL ( mkl_vml_kernel_sError )

Hi,

We are using MKL 10.3 in our application and we are currently performing performance analysis and we get one symbol in profiling reports from MKL that we can't explain : mkl_vml_kernel_sError.

This symbol is the highest ranked CPU time consumer. We are unable to find any information about this function, can you please explain briefly what is this symbol/function and is it normal to see it highly ranked in profiling reports?

Information about our configuration:

Running on Linux 64-bits. Statically linked to MKL sequential implementation (we take care of threading).

Thank you!

Yanick
0 Kudos
4 Replies
Gennady_F_Intel
Moderator
166 Views

Yanick,
that's pretty tricky to answer on your questions without the example of the code.
we belived that your testhas "bad" input array which generates big number of special results and error codes (negative values for logarithm, big numbers for exponential, etc., for example) because of

the mkl_vml_kernel_sError function is "error handler". It is being called for input values which are out of function working domain and they generate exceptions and error codes.

--Gennady

Yanick_Cote
Beginner
166 Views

That already helps me a lot understanding what is happening, thank you!

Currently, I cannot provide you a piece of code since I don't know yet from where this comes from, we are using MKL intensively so it may come from almost anywhere in the code... I only see this scoring very high in the performance profiling tool we are using, without knowing yet who is the caller. I'm going to investigate this right now.

Thanks!
Regards,

Yanick
Yanick_Cote
Beginner
166 Views

Is there a way to be notified or trap these errors to help us finding out from where it comes from? It doesn't seems to throw std::exceptions... I saw that there is an internal function called xerbla() that can be replaced to receive input values errors but currently it doesn't seems to work (my own implementation is never called), is there something special I should know on how to specify our own xerbla() function?

Also, we're not getting any error message printed in the console from the internal MKL xerbla function, do we need to enable something to get the errors printed in the console from internal xerbla function ( environment variable or call to a specific MKL function) ?

Thanks!
Regards,

Yanick
Yanick_Cote
Beginner
166 Views

I found the dynamic way to diagnose errors (without the need to rebuild MKL for xerbla) by using vmlSetMode and vmlSetErrorCallback.
Reply