I want to use plasma to solve hermitian eigenvalue problems in my fortran code. Initially I compiled and successfully run plasma with ATLAS. Although when I am running the code I get the following warning:
PLASMA WARNING: plasma_setlapack_numthreads():
WARNING you are calling a parallel section without linking with a multithread library
please compile with multi thread library and add -fopenmp(gcc)/-openmp(icc) to both
compilation and linkage flags
(I use -fopenmp in both compilation and linkage) I recon that this is because BLAS provided by ATLAS is sequential, am I correct?
However, I ran into problems when I tried to use PLASMA with intel fortran and mkl. I compiled PLASMA using intel c/fortran and mkl according to the steps given in readme file (by downloading reference cbas and lapack instead of using those provided by mkl). When I try to run exactly the same code that worked with ATLAS I am getting the following error message:
PLASMA ERROR: plasma_desc_check(): invalid matrix type
PLASMA ERROR: PLASMA_zheev_Tile_Async(): invalid descriptor
The code i'm using:
subroutine zheev_plasma(A, V, eig_val, npcores, info)
complex(idp), intent(inout) :: A(:,:)
real(dp), intent(inout) :: eig_val(:)
integer(i4b), intent(in) :: npcores
logical, intent(in) :: V
integer(i4b), intent(out) :: info
integer(i4b) :: n
type(c_ptr) :: descT
n = size(A, 1)
call PLASMA_init(npcores, info)
call PLASMA_Alloc_Workspace_zheev(n, n, descT, info)
call PLASMA_zheev(PlasmaNoVec, PlasmaUpper, n, A, n, eig_val, descT, A, n, info)
end subroutine zheev_plasma
Am I doing something wrong? Am I calling all routines correctly?
I'll appreciate any help
I ran run testing_zheev.c (provided with plasma distribution) (compiled with intel c with mkl) without a problem, which makes me even more confused.
I think I have found the culprit. It is subroutine PLASMA_zheev, in it, descT is passed by value. When I corrected it to be passed by reference everything started to work properly. I don't really know why (never have done fortran/c bindings before) but it works.