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

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?

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

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

Link Copied

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

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

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

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.

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

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?

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

I am going to move this to the MKL forum.

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

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

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