Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

Using MKL in mex files, i.e. with Matlab

karl_walentin
Beginner
616 Views

I now have MKL, using dgemm etc, working fine with the Intel Fortran Compiler 9.0. It works just fine if I add the line

!dec$objcomment lib: mkl_c.lib

in my source code. In a similar way I reference libguide.lib.

(I have even managed to use both MKL and IMSL in the same program. I let IMSLhandle matrix inversion etc by adding !dec$objcomment lib: imsl.lib [but NOT !dec$objcomment lib:imslblas.lib])

My problem is that I would like to"mex"my Fortran source, i.e. use Matlab and theIntel Fortran compiler to create a .dll file that is callable from Matlab.This works fine if I use only IMSL, but any mention of the above line(i.e.using MKL code) means that the.dll filewil cause an immediate crash of Matlab (R2007a). It does compile and link without warning though.

Any ideas on how to"mex"using MKL and the Intel FortranCompiler would be greatly appreciated.

Regards,

KarlWalentin

0 Kudos
0 Replies
Reply