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

后端 未结 2 600
有刺的猬
有刺的猬 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:24

    To programmatically change the value of NumWorkers from 2 to 4 of the local cluster profile, you can use:

    myCluster = parcluster('local');
    myCluster.NumWorkers = 4;  % 'Modified' property now TRUE
    saveProfile(myCluster);    % 'local' profile now updated,
                               % 'Modified' property now FALSE    
    

提交回复
热议问题