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

How to call lapack routines in Fortran 95 syntax with Xcode

paladinchin
Beginner
423 Views
I have problems using lapack in Fortran 95 syntax.

The following program works when Fortran 77 syntax is used:

----------------------------------
program main

implicit none

integer, parameter :: n = 2
integer :: ilo, ihi, lda=n, lwork=n, info, ii
real*8 :: a(n,n), ao(n,n), work(n), tau(n)


ilo=1
ihi=n

a(1,1)=1
a(1,2)=2
a(2,1)=4
a(2,2)=5

ao=a
call dgehrd(n, ilo, ihi, a, lda, tau, work, lwork, info)
call dorghr(n, ilo, ihi, a, lda, tau, work, lwork, info)

write(*,*) ao
write(*,*) a
end program
---------------------------------
But if I call the following subroutines instead

call gehrd(a, tau ,ilo ,ihi, info)
call orghr(a, tau ,ilo ,ihi ,info)

a warning occurs: symbol(s) not found


Please tell me if I forget any linking steps.

Thank you.

0 Kudos
2 Replies
ArturGuzik
Valued Contributor I
423 Views
call gehrd(a, tau ,ilo ,ihi, info)
call orghr(a, tau ,ilo ,ihi ,info)

a warning occurs: symbol(s) not found

Please tell me if I forget any linking steps.

Hi,

did you follow the guidelines from Chapter 7 "Language-specific Usage Options" in MKL User's Manual. You need to build .mod files (explanation why in Section "Compiler-dependent Functions and Fortran 90 Modules" or in Dima's response to one of recent posts on DFTI).

A.
0 Kudos
Vladimir_Koldakov__I
New Contributor III
423 Views
Quoting - paladinchin
I have problems using lapack in Fortran 95 syntax.


Hello, paladinchin,
Did you resolve the problem?
Note that MKL 10.2 versionprovides precompiled (by Intel Fortran Compiler) .mod files.
You need only toinclude 'USE LAPACK95' statement into your code if you use Intel Fortran Compiler and MKL 10.2.
Otherwise .mod files and lapack95 library should be built before.
Thanks,
Vladimir

0 Kudos
Reply