File Exchange

image thumbnail

Update MATLAB's MKL

version 1.3.0.0 (201 Bytes) by Philip
This basic text file will update MATLAB 2014b's MKL from version 11.1.1 to 11.3.1

3 Downloads

Updated 11 Jun 2015

View License

Intel's current MKL version is 11.3.1, while MATLAB uses version 11.1.1. If you would like to use the latest version with MATLAB, you can use the batch script to automate the process. To execute via cmd.exe on Windows, the text commands are
cd "C:\Program Files (x86)\Intel\Composer XE 2015\mkl\bin\"
@call mklvars.bat intel64 && set BLAS_VERSION=mkl_rt.dll && set LAPACK_VERSION=mkl_rt.dll
"C:\Program Files\MATLAB\R2014b\bin\matlab.exe"
You may need to modify the program locations. If you start MATLAB via it's usual start menu shortcut, MATLAB will use the version of MKL that it shipped with. Thus you can use both the default MKL version (by starting MATLAB like you're used to) or the current MKL version with the cmd script. To verify your MKL version, type "version -blas" and "version -lapack" in MATLAB.

In my tests, 11.3.1 speeds up MATLAB's BLAS routines by about 20%.

Comments and Ratings (6)

Thanks for your script, does anyone know how to do this in Linux?

thanks for update, I encountered the problem of using "tf" (Not enough storage is available to complete this operation.), but this update fixed this error. thx a lot.

mbredend

Thank you very much for the code. I have another question: Is it possible to control the Conditional Numerical Reproducibility (CNR)? I tried it and added the following, which did not work out (still set to AVX2)...

&& set MKL_CBWR = SSE2

Thanks!

Alex Kurek

Today it should be like this:
cd "C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2016.1.051\compilers_and_libraries_2016\windows\mkl\bin"
@call mklvars.bat intel64 && set BLAS_VERSION=mkl_rt.dll && set LAPACK_VERSION=mkl_rt.dll
"C:\Program Files\MATLAB\R2015b\bin\matlab.exe"

Philip

This script is limited to a one time run. If you were to start Matlab with this script, close Matlab, and then start Matlab normally, Matlab will use it's original MKL.

Royi Avital

Is this script create a new system wide variable or is it limited to the one time I run it and when I close it all disappear?

Thank You.

Updates

1.3.0.0

Updated description to include performance improvements.

1.2.0.0

Edited text

1.1.0.0

Edited text.

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags