Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
2 Views

DGEMM inconsistent results

We have an application that uses DGEMM for matrix multiplication.

To ease comparison of different version we would like it to give exactly same results each time it runs.

We have tried with the following project settings, but it still gives different results from run to run:

- Fortran - Optimization - Optimization: Disable

- Fortran - Optimization - Parallelization: No

- Fortran - Floating Point - Floating Point Model: Precise

- Fortran - libraries - Use Intel math kernel library: Sequential

 

Furthermore we have added:

CALL MKL_SET_NUM_THREADS(1)

 

Are there more settings that we are missing

0 Kudos
2 Replies
Highlighted
Black Belt
2 Views

Did you look into control of

Did you look into control of data alignment and mkl conditional numerical reproducibility?

0 Kudos
Highlighted
Black Belt
2 Views

Are you compiling DGEMM from

Are you compiling DGEMM from source? Otherwise, most of the options that you listed would have no effect on the results that DGEMM gives, since the pre-compiled code of DGEMM would be in the MKL (or other) library. If you are not choosing different /Qx or /Qax options between runs, and you are still getting differences, I think that you should check the arguments that are being passed to DGEMM. 

When you find differences, how big are those? Please quantify. If possible, provide a reproducer.

0 Kudos