Community
cancel
Showing results for 
Search instead for 
Did you mean: 
BABAK
Beginner
55 Views

sytrd is not recognized by lapack90

Jump to solution

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
55 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

5 Replies
Steven_L_Intel1
Employee
56 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

mecej4
Black Belt
55 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.

BABAK
Beginner
55 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?

Steven_L_Intel1
Employee
55 Views

I am going to move this to the MKL forum.

Ying_H_Intel
Employee
55 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

Reply