Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

sytrd is not recognized by lapack90

BABAK
Beginner
448 Views

Hi, 

I am trying to use LAPACK's "sytrd" subroutine in my code, but it is not recognized. I am trying the following simple code:

program comp
USE mkl95_lapack 
USE mkl95_PRECISION
USE mkl95_BLAS
implicit none
real, dimension(2,2) :: A
integer, dimension(1) :: t
A = reshape((/-5., 2., 2., -2./),(/2,2/))
call sytrd(A, t)
end program comp

This is the error I get:

error #6285: There is no matching specific subroutine for this generic subroutine call.   [SYTRD]      

But when I use another of LAPACK's subroutines like "getrf", everything's fine:

program comp
USE mkl95_lapack 
USE mkl95_PRECISION
USE mkl95_BLAS
implicit none
real, dimension(2,2) :: A
integer, dimension(2) :: t
A = reshape((/-5., 2., 2., -2./),(/2,2/))
call getrf(A, t)
end program comp

What might cause this problem?

 

 

 

 

0 Kudos
1 Solution
Steven_L_Intel1
Employee
448 Views

The interface for SYTRD has the TAU argument (your T) being REAL, not INTEGER, whereas for GETRF the second argument IPIV is INTEGER.

View solution in original post

0 Kudos
5 Replies
Steven_L_Intel1
Employee
449 Views

The interface for SYTRD has the TAU argument (your T) being REAL, not INTEGER, whereas for GETRF the second argument IPIV is INTEGER.

0 Kudos
mecej4
Honored Contributor III
448 Views

It may be worth noting that BLAS and Lapack documentation follows the Fortran 77 (and earlier) convention that variable names starting with 'I' (capital "eye") to 'N' are of type INTEGER. If you use variable names that deviate from that convention, you have to consult the Lapack documentation yourself to confirm that your subroutine arguments are of the correct types.

0 Kudos
BABAK
Beginner
448 Views

Thanks. I changed the type of vector (t) to real and it worked. 

But based on the help of the program I try the following to find eigenvalues and eigenvectors of my matrix:

program comp
USE mkl95_lapack 
USE mkl95_PRECISION
USE mkl95_BLAS
implicit none
real, dimension(2,2) :: A
real, dimension(1) :: t
real, dimension(2) :: c
A = reshape((/-5., 2., 2., -2./),(/2,2/))
call sytrd(A, t)
call orgtr(A, t)
call rsteqr(c, t, A)
write(*,*) c
end program comp

But the results aren't correct. I only can deduce this implementation from the program's help for lapack95. What would the correct way for doing this implementation?

0 Kudos
Steven_L_Intel1
Employee
448 Views

I am going to move this to the MKL forum.

0 Kudos
Ying_H_Intel
Employee
448 Views

Hi BABAK, 

Meje4 seems reply the question in https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/635226. you may refer to them. 

and if you'd like to use Lapack driver routine,  you may try 

?syev
Computes all eigenvalues and, optionally,
eigenvectors of a real symmetric matrix.
Syntax
call ssyev(jobz, uplo, n, a, lda, w, work, lwork, info)
call dsyev(jobz, uplo, n, a, lda, w, work, lwork, info)
call syev(a, w [,jobz] [,uplo] [,info])

Best Regards,

Ying

0 Kudos
Reply