- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page