Force all licenses checks at beginning of code in Azure Server

2 次查看(过去 30 天)
I have a few azure clusters running a heavy code that uses different tool boxes. But as the code progresses I get a 4402 license error some times at the very end of the code and basically loose all data (Unfortunatly most of the code is inside a function and thus as the code crashes the variables are lost too and I didnt implement a saving feature till the end). This bascially makes me loose compute costs.
4/3 times this does not happen. But for very large computations it seems risky.
What could be a good method to solve this?

回答(1 个)

Raymond Norris
Raymond Norris 2021-2-14
You can force a checkout for each toolbox with the license command
% [TF errmsg] = LICENSE('checkout', FEATURE) checks out a license for the
% product specified by the text string FEATURE, returning 1 if the
% license is checked out or 0 if the license could not be checked out. If
% you specify the optional second output argument, errmsg, LICENSE
% returns the text of any error message encountered, or an empty string
% if the checkout succeeded.
The tricky part is knowing the FEATURE name for each of the toolboxes you want. If you have access to a license file (which you might not if you're using onlinine licensing), you might be able to run the lmutil license utility. Might be easiest to contact Support (support@mathworks.com) for the FEATURE names for each toolboxes you want.
Loop through each toolbox and checkout the license at the top of your code.

类别

Help CenterFile Exchange 中查找有关 Install Products 的更多信息

产品


版本

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by