ifort: MKL function DSYEVR is not working

ifort: MKL function DSYEVR is not working

imagem de jesedugal

Hi, I am new using MKL and using a lapack subroutine, I get a run-time-error  related to incorrect parameter on entry to function.  I have compiled in these formsifort -L/opt/intel/composer_xe_2011_sp1.10.319/mkl/lib/intel64/lib/ -I/opt/intel/composer_xe_2011_sp1.10.319/mkl/include/intel64/ilp64/ -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lmkl_sequential -CB -openmp *.f90 -o x_exeand alsoifort -CB -openmp -c *.f90ifort -L/opt/intel/composer_xe_2011_sp1.10.319/mkl/lib/intel64/lib/libmkl_intel_lp64.a -I/opt/intel/composer_xe_2011_sp1.10.319/mkl/include/intel64/ilp64/ -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lmkl_sequential -CB -openmp *.o -o x_exeIn both cases I recieve the error MKL ERROR: Parameter 15 was incorrect on entry to DSYEVRforrtl: severe (174): SIGSEGV, segmentation fault occurredImage              PC                Routine            Line        Source             x_exe              000000000043765D  Unknown               Unknown  Unknownx_exe              0000000000436DFE  Unknown               Unknown  Unknownx_exe              000000000040BFD8  Unknown               Unknown  Unknownx_exe              0000000000406AA1  Unknown               Unknown  Unknownx_exe              0000000000405BCB  Unknown               Unknown  Unknownx_exe              0000000000403FAC  Unknown               Unknown  Unknownlibc.so.6          00007F4AF0805C4D  Unknown               Unknown  Unknownx_exe              0000000000403EA9  Unknown               Unknown  UnknownBut the parameter 15 is ldz which, as I found in MKL manual, should be integer. From MKL Manual>> ldz INTEGER. The leading dimension of the output array z.>> Constraints:>> ldz ≥ 1 if jobz = 'N';>> ldz < max(1, n) if jobz = 'V'. Subroutine where I call dsyevr:subroutine diag_from_lapack(n,a,f,novec)use nrtypeimplicit none integer, intent(in) :: n real(dp), intent(inout) :: a(n,n), f(n) logical, intent(in) :: novec integer :: lda, il, iu, ldz, lwork, iwork(1), liwork, m, isuppz(2*n), info real(dp) :: work(1), vl, vu, abstol, w(n), z(n,n) character :: jobz, range_eigval, uplo! Input Parameters jobz = 'V'; if(novec) jobz = 'N' range_eigval = 'A' uplo = 'U' !n = nmatrix !a = Hcopy(n,n) lda = n vl = 0.0d0 vu = 100.0d0 il = 1 iu = n abstol = 1.0d-8 ldz = n-1 !work(1) lwork = -1 !iwork(1) liwork = -1! Output Parameters !m !w(n) !eigenvalues !z(n,n) !eigenvectors !isuppz(2*n) call dsyevr(jobz,range_eigval,uplo,n,a,lda,vl,vu,il,iu,abstol,m,w,z,ldz,isuppz,work,lwork,iwork,liwork,info) ! ! write the eigenvectors on the input matrix and the eigenvalues on the forces array f(:) = w(:) a(:,:) = z(:,:)returnendcan anyone help me?

4 posts / 0 new
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.
imagem de Tim Prince

Supposing that you are concerned about data types (a reasonable concern),
include 'mkl_lapack.fi'
or
use lapack
would enable the compiiler to check those.
You must also pay attention to values.  You have set leading dimension of z to n but you pass n-1 in ldz.  The reason for support of a variable is to accept a z array defined larger than necessary, which doesn't appear to be your case; the subroutine apparently sees that you gave it too small a value.
You could see the expected argument checks in the reference source.

imagem de Gennady Fedorov (Intel)
Best Reply

1. yes, Tim is right :   ldz  == n 2. please check how you link this example. You mixed lp64 and ILP64 interfaces - it is not correct 3. you don't link threading and sequentianal libraries at the one linking line please check with Linking Adviser how to link your example properly.  

imagem de Tim Prince

If you want a quick linking solution, using all lp64 and threaded library, -mkl should work with ifort.  As Gennady pointed out, any specific requirements should be as advised by Linking Advisor.

Faça login para deixar um comentário.