Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software Development Tools (Compilers, Debuggers, Profilers & Analyzers)
- Intel® Fortran Compiler
- Error about the "syevd" function in mkl of fortran

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

Highlighted
##

wang__ningning

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-13-2020
12:09 AM

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

4 Replies

Highlighted
##

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-13-2020
01:15 AM

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.

Highlighted
##

wang__ningning

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-04-2020
11:53 PM

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

Highlighted
##

wang__ningning

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-05-2020
12:49 AM

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

Highlighted
##

Steve_Lionel

Black Belt Retired Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-05-2020
07:16 AM

39 Views

MKL questions are better asked in the MKL forum.

For more complete information about compiler optimizations, see our Optimization Notice.