Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
39 Views

Error about the "syevd" function in mkl of fortran

I compile my test.f as "ifort -mkl test.f -o test" but the system feedback is undefined reference and it cann't find this function. However, the ssyevd function works well. In the intel mkl Developer Reference, the function description is:

Syntax
call ssyevd(jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork, info)
call dsyevd(jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork, info)
call syevd(a, w [,jobz] [,uplo] [,info])

Why the system cann't find the syevd function? Please help me, I need the fortran mkl to calculate the eigenvalue of matrice 20000*20000.

The  file test.f is:

      program main
      implicit none
      integer,parameter :: M=20000,N=500
      integer i,j,info
      real dataM(M,N),C(M,M),T(N,M),W(M)
      open(5,file='output_1.47_0.000_1.dat')
      do i=1,M
          read(5,*) (dataM(i,j),j=1,N)
      end do
      write(*,*) "load the dat file!"
      do i=1,M
          dataM(i,:)=dataM(i,:)/sqrt(sum(dataM(i,:)**2))
      end do
      write(*,*) "dataM has been unitary"
      T=transpose(dataM)
      C=matmul(dataM,T)
      write(*,*) "C has been done!"
      call syevd(C,W)
      end

0 Kudos
4 Replies
Highlighted
Black Belt
39 Views

In order to use the Lapack95 call to SYEVD as you did in your program, you should insert a "use lapack95" statement after the first line, and you should link with the MKL Lapack95 library (IA32, LP64 or ILP64, as appropriate). See https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor for help with the command line to link.

This thread is more appropriate for the MKL forum.

0 Kudos
Highlighted
Beginner
39 Views

Thank you for your reply. But now, I have a new problem. It makes me trouble! When I calculate the eigenvalues using the syevd function, the result of eigenvalues are all zero and the info=-1000. What's wrong with it or my procedure?

use lapack95,only: syevd

use blas95,only:gemm

call syevd(C,W,'V','U',info)

ifort -mkl EM.f -o EM  /opt/intel/mkl/lib/intel64/libmkl_lapack95_ilp64.a /opt/intel/mkl/lib/intel64/libmkl_blas95_ilp64.a

 

 

0 Kudos
Highlighted
Beginner
39 Views

mecej4 wrote:

In order to use the Lapack95 call to SYEVD as you did in your program, you should insert a "use lapack95" statement after the first line, and you should link with the MKL Lapack95 library (IA32, LP64 or ILP64, as appropriate). See https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor for help with the command line to link.

This thread is more appropriate for the MKL forum.

Thank you for your reply. But now, I have a new problem. It makes me trouble! When I calculate the eigenvalues using the syevd function, the result of eigenvalues are all zero and the info=-1000. What's wrong with it or my procedure?

use lapack95,only: syevd

use blas95,only:gemm

call syevd(C,W,'V','U',info)

ifort -mkl EM.f -o EM  /opt/intel/mkl/lib/intel64/libmkl_lapack95_ilp64.a /opt/intel/mkl/lib/intel64/libmkl_blas95_ilp64.a

0 Kudos
Highlighted
Black Belt Retired Employee
39 Views

MKL questions are better asked in the MKL forum.

0 Kudos