How to parallel 4 works with PARFOR with a Core i3 in Matlab

后端 未结 2 598
有刺的猬
有刺的猬 2021-02-09 09:47

I have Matlab R2012b for Ubuntu 64 bits. I have a Intel Core i3 CPU M 330 @ 2.13GHz × 4.

I want to use parfor to parallelize 4 loops at same time. Becau

2条回答
  •  心在旅途
    2021-02-09 10:27

    To increase the default NumWorkers, open the Cluster Profile Manager (Parallel->Manage Cluster Profiles). Pick the localprofile, click edit, and increase NumWorkers to the maximum possible value (in your case 4). Now it is possible to create a matlabpool with more workers than physical cores on your machine.

    However, note that using more workers than cores might lead to decreased performance as compared to having the same number of workers as cores.

提交回复
热议问题