MATLAB Answers

Does MATLAB Compiler checkout toolbox licenses at compile-time?

33 views (last 30 days)
Does MATLAB Compiler checkout toolbox licenses at compile-time?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 4 May 2016
Edited: MathWorks Support Team on 4 May 2016
As of MATLAB R2016a, MATLAB Compiler will now check out licenses for toolboxes used in the code you compile. This means that if you compile code in MATLAB using MATLAB Compiler, any functions which require a license for a particular toolbox to run will cause the required toolbox to be checked out at compile-time.
Please note that this applies to compilation performed using the standalone mcc command from the system command prompt as well. Calling mcc from the system command prompt reserves the MATLAB Compiler license for 30 minutes after it is called, and as of R2016a it also reserves any relevant toolbox seats for the same duration. Calling mcc from within the MATLAB environment does not cause any license seats to linger, either for MATLAB Compiler itself or toolboxes required for compilation.
In MATLAB releases R2015b and earlier, toolbox checkouts are not performed when compiling code which requires a license for one or more toolboxes.


Show 3 older comments
Scott on 4 May 2016
Hi Walter,
There are two aspects of MATLAB Compiler licensing which are relevant to this article: toolbox checkouts, and license lingering.
In R2016a, running MATLAB Compiler checks out toolboxes for any toolbox functions called in the code being compiled. This is different from R2015b and earlier, where only MATLAB Compiler would be checked out, even if the code being compiled contains functions from toolboxes.
For all releases of MATLAB, calling mcc from the system command line causes the MATLAB Compiler license to "linger" on the machine that called it for 30 minutes. This did not change in R2016a.
However, the change to toolbox checkout behavior in R2016a carries an implication which impacts license lingering: if toolboxes are checked out for a compilation called from the command line using mcc, those toolboxes will also linger on the machine for 30 minutes.
Of course, all this only matters for Network Concurrent licenses. Individual, Designated Computer, and Network Named User licenses are not impacted.
Hope this helps.
MathWorks Installation & Licensing Support
Scott on 11 Aug 2016
Matlab Team:
I'm having problems using mcc with MATLAB2012A on Windows 7. I have a function that requires the optimization toolbox (fmincon and linprog) and for some reason mcc is complaining via the mccExcludeFilesLog.txt that the 'required licenses are not available" for these functions.
I can run the code interactively in a Matlab console, but when calling mcc from the same console, I get an incomplete exec (no fmincon and linprog). I've tried a lot of things: exiting all Matlab sessions; -N -p args, license('checkout', 'optimization_toolbox), etc.
I can compile the same function on Mac and linux using the same network licenses. The toolbox licenses required ARE available.
Any ideas?
Anudeep Katragadda
Anudeep Katragadda on 21 Oct 2016
Hello Scott, you can contact MathWorks Technical Support team if you are still having the issue still persists.

Sign in to comment.

More Answers (0)


No tags entered yet.