Programatically determine Matlabpool Maximum Number of Local Workers

15 views (last 30 days)
I'm developing some code which will be shared with colleagues running different versions of matlab. Is there a way to programatically tell the maximum number of workers in the local pool?

Accepted Answer

Shashank Prasanna
Shashank Prasanna on 6 May 2013
>> myCluster = parcluster('local');
>> myCluster.NumWorkers
For ver > R2012a, for earlier you may have to use findresource. This change is captured in the release notes for R2012a:
If your colleagues use earlier releases, you may have to do a version check and then an if else block.
>> version -release
  1 Comment
Susan
Susan on 7 May 2013
Thank you. I was able to use findresource on all of the matlab versions that interest us.

Sign in to comment.

More Answers (0)

Categories

Find more on Parallel Computing Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!