Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Guillaume_A_2
Beginner
139 Views

Set the CNR mode for only one function call

Hi everyone,

I would like to do something like:

... // a lot of stuff with several calls to MKL routines
int cbwrStatus = mkl_cbwr_set(MKL_CBWR_AUTO);
int status = LAPACKE_dsyev( LAPACK_ROW_MAJOR, 'V', 'L', rank, matrix, rank, eigenValues ); 
mkl_cbwr_set(MKL_CBWR_BRANCH_OFF);
... // a lot of stuff with several calls to MKL routines

Here, mkl_cbwr_set calls fail with MKL_CBWR_ERR_MODE_CHANGE_FAILURE, obviously.

So, two questions:

- why is it forbidden (impossible ?) to change the CNR mode after a call to some MKL function ?

- is there a way to set the CNR mode for only one function ?

In my case, "dsyev" is the only function really critical for the reproductibility. I do not want to force the CNR mode at the beginning or before the execution because I am afraid of performance regression.

Thanks in advance for your help,

Guix

0 Kudos
2 Replies
Gennady_F_Intel
Moderator
139 Views

Hi Guix!  Yes, you are right. Into the current version of MKL not possible to set the CNR mode for only one MKL function. That's possible to apply for all mkl's functions. 

Guillaume_A_2
Beginner
139 Views

Hi Gennady,

Thanks for your reply.

But my questions are "why ?" and "is there a workaround ?" In fact, I am asking for details ;)

Guix

Reply