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.
29280 Discussions

Calling LAPACK library Directly from C#

Ngu_Soon_Hui
Beginner
1,160 Views
I understand that I can call fortran function in DLL from C# by using PInvoke. Now I want to call LAPACK function such as degmv., but I don't want to write a wrapper fortran code on top of that.
How to call LAPACK library directly from C#?
0 Kudos
2 Replies
Steven_L_Intel1
Employee
1,160 Views
Copying a response from a private reply:

"dgemv isn't an lapack function, it's a BLAS function. If built from public source, it is a Fortran77 subroutine, if modified or closed source, it still should preserve Fortran interoperability. Intel MKL lapack and BLAS functions provided with recent ifort come with C prototypes (not all strictly correct), in case that helps. I don't see what you expect to change by putting a Fortran wrapper over a Fortran callable subroutine. If you want to patch over some legacy style interface questions, you could take the public source code and modify it to USE iso_c_binding, or you could accomplish that in a wrapper."
0 Kudos
Ngu_Soon_Hui
Beginner
1,160 Views
Hello,
are you saying that I would have to build the BLAS library myself, that MKL doesn't come with a binary dll of the BLAS library?
From my digging this seems to be the case for BLAS . FOR LAPACK, there is a binary version of mkl_lapack.dll, though. Why this double standard?
0 Kudos
Reply