OpenMP + MKL precision ??

OpenMP + MKL precision ??


I have a problem in the precision of the MKL , with dsyevd by example, when using -openmp even though this part of the code is purely sequential. There is a difference between the solution without openmp , and with openmp ( free for the number of threads).

NOOMP  eigvect           -0.0000015360581732           -0.9999999999988203           -0.9999999999988203            0.0000015360581732

OMP 1  eigvect           -0.0000015360581732           -0.9999999999988203           -0.9999999999988203            0.0000015360581732

OMP 2 eigvect           -0.0000015360581732           -0.9999999999988203           -0.9999999999988203            0.0000015360581732

OMP 3 eigvect           -0.0000015362783716           -0.9999999999988201           -0.9999999999988201            0.0000015362783716

OMP 4 eigvect           -0.0000015360581732           -0.9999999999988203           -0.9999999999988203            0.0000015360581732

I have set MKL_ALL=1, if not then the result is different for 1 ,2 ,3, and 4 threads.  The problem is that those small differences change the behavior later in the program. Considering that i dont want to use openmp in the mkl, i should have the same values. But another thing is,  is that normal that the results are different using threads in mkl ?

Also, if i link with blas lapack instead of MKL, i don't have that problem.


2 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

MKL results are expected to vary with number of threads, within the accuracy of the results. If you don't want this, you can link mkl_sequential, set MKL_NUM_THREADS, or possibly use the MKL consistency option:
which has been discussed on the MKL forum.
If you have been successful in linking against the gfortran blas library provided with linux, that is probably built with no threading, like mkl sequential.

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen