Reputation: 83
I am trying to use parallelization and I have one quick question.
I saw another post saying that 'I saw from another post saying that 'All releases newer than R2013b can utilize up to 512 workers (CPU cores) on a local machine through the Parallel Computing Toolbox'
However, I am not sure how many workers I can use with my computer.
I have 32 cores(64 logical cores) and 128 GB of memory.
Does this mean I can use 32 number of workers? or can I use 64 number of workers since I have 64 logical cores?
Or is 'number of workers' something independent from the number of cores? In the Parallel preferences, I think I can write any number I want as a number of workers so I am bit confused....
I put 36 as a number of workers in 'Parallel preferences' but when I run the code, it says the number of workers is 32. So I guess Matlab automatically chooses the maximum number of workers....?
Thanks in advance.
Upvotes: 1
Views: 934
Reputation: 25160
The default number of workers used by Parallel Computing Toolbox is the number of physical cores on your machine, as this generally gives the best performance. There are cases where a different number of workers can give you better performance, which is why you're able to modify this preference.
For example, if your workers need lots of memory, you might be better off running fewer workers than you have cores.
Conversely, for some workloads, you might find that you can run more workers and still get good performance (although I think cases like this are rarer).
Note that the "Preferred number of workers in a parallel pool" preference is separate from the NumWorkers
property that you specify in the Cluster Profile Manager.
Upvotes: 1