- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I want to use a function in intel MKL with fortran95 interface.
The function is
call gemv(a, x, y [,alpha][,beta] [,trans])
to use this interface, I "use mkl95_blas" at the beginning of the program and
the error is
"unresolved external symbol _DGEMV_MKL95 referenced in function _MAIN__".
Anyone can help me?
Thanks!
The code is listed as follows
I want to use a function in intel MKL with fortran95 interface.
The function is
call gemv(a, x, y [,alpha][,beta] [,trans])
to use this interface, I "use mkl95_blas" at the beginning of the program and
the error is
"unresolved external symbol _DGEMV_MKL95 referenced in function _MAIN__".
Anyone can help me?
Thanks!
The code is listed as follows
program MatrixOperator
use mkl95_blas
use mkl95_lapack
use mkl95_precision
DOUBLE PRECISION A(3,3),x(3),y(3)
integer i
A=0
A(1,1) = 1
A(2,2) = 2
A(3,3) = 1
x = (/ 4,15,18 /)
y = (/ 1,1,1 /)
call gesv(A,x)
call gemv(A,x,y)
do i=1,3
write(*,*) x(i)
end do
pause
end
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You must specify at least the 4 required .lib files at the end of your ifort command for linking, or put them into the dependencies of your VS project. The MKL link advisorwill ask you the information you haven't given here, and suggest at least the 3 basic .lib specifications. If it doesn't include a blas95, you must add that (look at the .lib files in your installation), in a version corresponding with the others.
As you haven't specified ia32 or x64, static or dynamic, thread or sequential, 32-bit or 64-bit integers (for the X64), it's impossible to give a precise answer such as the link advisor will do.
As you haven't specified ia32 or x64, static or dynamic, thread or sequential, 32-bit or 64-bit integers (for the X64), it's impossible to give a precise answer such as the link advisor will do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much
I add mkl_blas95.lib to Project->Property->Linker->Input->Additional Dependencies and the error disappeared.
I add mkl_blas95.lib to Project->Property->Linker->Input->Additional Dependencies and the error disappeared.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the issue is about using the F95 interfaces to MKL rather than using MKL through the F77 interfaces:
Depending on the version of the compiler and MKL, you may need to build the F95 interface libraries (check first to see if mkl_lapack95.lib mkl_blas95.lib exist). Similarly, it may be necessary to check for the existence of the interface modules but, in your case, since you were able to compile successfully, the modules exist.
On Windows with IFort 11.1.064, for example,
ifort /Qmkl MatrixOperator.f90 mkl_lapack95.lib mkl_blas95.lib
is all that is needed once the libraries and modules for the F95 interfaces have been built.
Depending on the version of the compiler and MKL, you may need to build the F95 interface libraries (check first to see if mkl_lapack95.lib mkl_blas95.lib exist). Similarly, it may be necessary to check for the existence of the interface modules but, in your case, since you were able to compile successfully, the modules exist.
On Windows with IFort 11.1.064, for example,
ifort /Qmkl MatrixOperator.f90 mkl_lapack95.lib mkl_blas95.lib
is all that is needed once the libraries and modules for the F95 interfaces have been built.

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