- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm new to using ifort for Mac, and am attempting to use the Fortran95 interfaces to blas but I can't get it to work.
I'm trying to use dot(x,y) but when I compile I get an error.
[fortran]
program test
use mkl95_blas
use mkl95_precision
implicit none
real,dimension(2) :: x,y
real res
x = (/1,1/)
y = (/2,2/)
res = dot(x,y)
print *,res
end program
[/fortran]
When I compile I do:
ifort test.f90 -o test -mkl
and get the error:
Undefined symbols for architecture x86_64:
"_sdot_mkl95_", referenced from:
_MAIN__ in ifortSsxXlV.o
ld: symbol(s) not found for architecture x86_64
I think I'm missing someting in the compile options, but I don't know what.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To the compile command add -lthe_name_of_the_blas95_library. For example, -lmkl_blas95 for IA32 targets.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If compiler reports unresolved symbols/references: _*_mkl95, then you may add these libraries: mkl_blas95.lib mkl_blas95_lp64.lib mkl_lapack95.lib manually. see the KB article as an example from here: http://software.intel.com/en-us/articles/using-mkl-in-intel-compiler-mkl-qmkl-options or there are many linking examples into User's Guide.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the help, it compiles fine now
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page