40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
  COMSOL elog  Not logged in ELOG logo
Message ID: 114     Entry time: Mon Jul 31 22:18:57 2017
Author: rana 
Type: General 
Category: General 
Subject: using more than 12 cores in matlab 

Since 2014, the limit of 12 workers using the matlab parallel computing toolbox has been lifted. Today, I was able to get this to work. There's a trick.

Usually, when you start up matlab and run a parallel thing like 'parfor', it just uses a default profile 'local' which limits you to 12 workers. You can try to ask for more by doing 'parpool(40)' for 40 workers, but it will tell you that NumWorkers = 12 and you're out of luck. So instead:

myCluster = parcluster('local')

myCluster.NumWorkers = 40;

saveProfile(myCluster);

parpool('myCluster', 40)

It seems that it needs the max # of workers and the requested number of workers to be 40 to use 40, otherwise you'll just get 12 (as of matlab 2016a).

Attachment 1: Screen_Shot_2017-07-31_at_10.11.35_PM.png  412 kB  | Hide | Hide all
Screen_Shot_2017-07-31_at_10.11.35_PM.png
ELOG V3.1.3-