Comments on: Math libraries version info & upgrade https://undocumentedmatlab.com/blog_old/math-libraries-version-info-upgrade Charting Matlab's unsupported hidden underbelly Wed, 20 May 2020 03:01:17 +0000 hourly 1 https://wordpress.org/?v=4.4.1 By: Sparse data math info | Undocumented Matlabhttps://undocumentedmatlab.com/blog_old/math-libraries-version-info-upgrade#comment-231936 Wed, 31 Jul 2013 18:03:37 +0000 https://undocumentedmatlab.com/?p=3998#comment-231936 […] Two weeks ago, I posted about Matlab’s math libraries and their various versions across Matlab releases […]

]]>
By: Amrohttps://undocumentedmatlab.com/blog_old/math-libraries-version-info-upgrade#comment-226789 Thu, 18 Jul 2013 22:17:02 +0000 https://undocumentedmatlab.com/?p=3998#comment-226789 Actually those *.lib files are considered import libraries [*], which are required in the case of MSVC compiler/linker. The actual implementation of the BLAS routines resides in the dynamically loaded library. On Linux/Mac, you can directly link against the shared library equivalent to DLLs (*.so files) without an import library.

[*]: https://en.wikipedia.org/wiki/Dynamic-link_library#Import_libraries

]]>
By: Amrohttps://undocumentedmatlab.com/blog_old/math-libraries-version-info-upgrade#comment-226786 Thu, 18 Jul 2013 22:03:44 +0000 https://undocumentedmatlab.com/?p=3998#comment-226786 I’m not sure if I’m allowed to discuss this in an open forum, but I just tried it in the R2013b prerelease, and they seem to be using the latest MKL 11.0.2 and FFT 3.3.3 versions. IPP is unchanged though.

Oh and you’ll be happy to know that MATLAB has finally upgraded to Java 7 :)

]]>
By: Yair Altmanhttps://undocumentedmatlab.com/blog_old/math-libraries-version-info-upgrade#comment-226785 Thu, 18 Jul 2013 21:58:35 +0000 https://undocumentedmatlab.com/?p=3998#comment-226785 The specified libs are static libs that are essentially MathWorks-generated wrappers for MKL’s internal BLAS, LAPACK functions. Instead of the libs, one could presumably link directly with mkl.dll.

Had MathWorks encapsulated BLAS and LAPACK in DLLs rather than libs, we could call them directly from m-code. Since MathWorks chose to use static libs, the libs can only be used in Matlab by linking them into a mex file. I’m not sure that I understand the logic of this decision. It doesn’t matter so much since we can directly use mkl.dll, which presumably includes everything that the static libs have.

]]>
By: Yair Altmanhttps://undocumentedmatlab.com/blog_old/math-libraries-version-info-upgrade#comment-226779 Thu, 18 Jul 2013 21:48:33 +0000 https://undocumentedmatlab.com/?p=3998#comment-226779 @Amro – Thanks for the numerous references. It would be interesting to learn if anyone has successfully integrated a newer version of MKL or IPPL in Matlab, as opposed to an entirely different library which is naturally another story. My hope is that a simple in-place DLL replacement might provide important performance and stability benefits across Matlab, without requiring a single line of code to change.

Unfortunately, I can’t test this as I do not have an independent license to MKL / IPPL. And I would probably wouldn’t know how to test it properly anyway if I did have a license. But there are plenty of smart linear-algebra experts out there who might just pick up the glove (Mike Croucher comes to mind, for one).

I’ve offered the bait – now let’s see if anything interesting comes up in the net…

]]>
By: Amrohttps://undocumentedmatlab.com/blog_old/math-libraries-version-info-upgrade#comment-226776 Thu, 18 Jul 2013 21:35:41 +0000 https://undocumentedmatlab.com/?p=3998#comment-226776 Some people in the past have successfully managed to run MATLAB with customized implementations of BLAS/LAPACK (ATLAS, GotoBLAS, OpenBLAS, ..). Here are some references for those interested:

https://www.mathworks.com/matlabcentral/newsreader/view_thread/129077
http://www.stanford.edu/~echu508/matlab.html
http://software.intel.com/en-us/articles/using-intel-mkl-with-matlab/
http://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-for-windows-using-intel-mkl-in-matlab-executable-mex-files/

Back in v6 and earlier (I think), MATLAB used ATLAS as BLAS implementation, before switching to Intel MKL starting with v7:

http://www.mathworks.com/company/newsletters/articles/matlab-incorporates-lapack.html

It should be noted that MKL is highly optimized for Intel processors, and it’s hard to get large performance gains over the vendor’s own implementation..

]]>
By: Amrohttps://undocumentedmatlab.com/blog_old/math-libraries-version-info-upgrade#comment-226754 Thu, 18 Jul 2013 20:26:51 +0000 https://undocumentedmatlab.com/?p=3998#comment-226754 There is a section in the docs explaining how to call BLAS/LAPACK routines in MEX functions (linking against the versions that ship with MATLAB): http://www.mathworks.com/help/matlab/matlab_external/calling-lapack-and-blas-functions-from-mex-files.html

Also here is an oldie but goodie submission on FEX to interface with LAPACK: http://www.mathworks.com/matlabcentral/fileexchange/16777-lapack

]]>