问题
I want to matlabpool open 24
. As the default value of NumWorkers in my machine is 12, I run:
myCluster = parcluster('local');
myCluster.NumWorkers = 12; % 'Modified' property now TRUE
saveProfile(myCluster); % 'local' profile now updated,
% 'Modified' property now FALSE
I get the error:
Error using parallel.cluster.Local/hSetProperty (line 258)
NumWorkers must be an integer from 1 to 12.
I comment out the bound check at parallel.cluster.Local/hSetProperty (line 258):
case 'NumWorkers'
% if value > obj.MaxAllowedNumWorkers
% error(message('parallel:cluster:LocalInvalidNumWorkers', obj.MaxAllowedNumWorkers));
% else
obj.LocalSched.setMaximumNumberOfWorkers( double( value ) );
% end
I get the error:
Error using parallel.cluster.Local/hSetProperty (line 260)
Java exception occurred:
java.lang.IllegalStateException: Too many licenses requested
at com.mathworks.toolbox.distcomp.local.LocalScheduler.setMaximumNumberOfWorkers(LocalScheduler.java:89)
I am surprised by the error "Too many licenses requested". On one of my machine MaxAllowedNumWorkers is 512 (R2014a, Windows 7 SP1 x64 Ultimate), while on the two other one MaxAllowedNumWorkers is 12 only (R2012a, Ubuntu 12.04).
Did MaxAllowedNumWorkers change from R2012a to R2014a? Does there exist different kind of licenses with a different MaxAllowedNumWorkers? Also, on the machine where MaxAllowedNumWorkers is 12 only, I can use the license on many other machines (over 100)at the same time (computer cluster), so I don't understand the hash restriction on MaxAllowedNumWorkers.
回答1:
Indeed, it did. The limit on the number of allowed local workers per license was removed in the 2014 release. See the release notes. It's just a limitation imposed by pre-2014 licenses; that's why you see it on the machines that have 2012, but not on those that have 2014.
来源:https://stackoverflow.com/questions/24196122/what-determines-maxallowednumworkers