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?
0 个评论
回答(1 个)
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.
1 个评论
Walter Roberson
2021-2-14
Most of the feature names are listed at https://www.mathworks.com/matlabcentral/answers/449314-how-do-features-from-license-correspond-to-names-from-ver . But only ones I had access to or was able to deduce from documentation; and I have not tried to update it for any recent changes.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Install Products 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!