Page 1 of 1

MKL and openMP

Posted: Tue Jun 23, 2015 1:58 pm
by javad
Dear developers

may I compile yambo with the openMP version of the MKL libraries? does the code use it?

-lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core

or should I use the serial version?

-lmkl_intel_lp64 -lmkl_sequential -lmkl_core

with best regards
Javad

Re: MKL and openMP

Posted: Tue Jun 23, 2015 2:04 pm
by andrea.ferretti
Hi Javad,

this is a good point!
Ideally yes, especially if you do not use the explicit OpenMp implementation of yambo (ie. if you just rely on the implicit parallelisation of optimised libs such as MKL).
On the other hand, I think it could be dangerous to mix the explicit openmp parallelism of yambo with the multi-threaded use of MKL (suppose e.g. a call to a boas routine is inside a omp parallel region of yambo)... I think the problem is related to the fact some of MKL routines are not thread-safe (please correct me here if I am wrong)

take care
Andrea

Re: MKL and openMP

Posted: Tue Jun 23, 2015 2:09 pm
by javad
Thank you for the fast reply

I will try and make you know if it works

Javad