I have a program that needs to find the eigenvalues and eigenvectors of 3x3 matrices millions of times. I have just switched to using LAPACK's zheev (yes they are hermitian matrices) for this, and the program runs in about 1m20s for a particular case. I have parallelized my algorithm with OpenMP (as we were doing before) and suddenly my program runs in about 9m. I comment out the call to zheev and my program runs in 9s.
I have looked around online and found (as I understand it) that you can compile your BLAS library to use OpenMP, but I don't think that is the issue here.
Unfortunately this code is from my work, I don't have lapack installed in the default location and I don't know what compiler options were used when it was compiled. This also makes it difficult for me to compile a minimum testing program to demonstrate the issue.
Any ideas on what the issue could be?
EDIT:
I just found out that with OpenMP zheev is failing, which probably ties in to it running slower. I have read that some routines in LAPACK are not thread safe (or they have thread safe variants), how can I find out if zheev is calling one of those routines and can I change that?
zheevcommented out? Also: what platform are you on, and which distributions of LAPACK and BLAS are you using? - Stephen Canondlamchandslamchbefore parallel execution starts. - Stephen Canondlamchandslamchfrom two years ago was the only thing that helped me figure out a recent problem I was having with just that. - SirGuy