Ho Matlab R2012b per Ubuntu 64 bit. Ho una CPU Intel Core i3 M 330 @ 2.13GHz × 4.Come parallelo 4 funziona con PARFOR con un Core i3 in Matlab
Voglio usare parfor per parallelizzare 4 loop allo stesso tempo. Perché Intel Core i3 ha 2 core e 4 thread utilizzare questo codice:
if matlabpool('size') == 0 % checking to see if my pool is already open
matlabpool(4)
else
matlabpool close
matlabpool(4)
end
E io ottenere il seguente errore:
Errore:
You requested a minimum of 4 workers, but the cluster "local" has the NumWorkers property set to allow a maximum of 2 workers. To run a communicating job on more workers than this (up to a maximum of 12 for the Local cluster), increase the value of the NumWorkers property for the cluster. The default value of NumWorkers for a Local cluster is the number of cores on the local machine.
Perché? Il valore predefinito di NumWorkers nella mia macchina è 2, ma se posso fare 4 loop contemporaneamente, come posso ottenerlo?
Sì, questo è davvero corretto. +1 – Jonas
Due domande: perché più lavoratori che core hanno ridotto le prestazioni? Come posso conoscere il valore predefinito di NumWorkers per un cluster locale? –
Il valore predefinito è il numero di core fisici (questo è anche indicato nel messaggio di errore che hai citato nella tua domanda). Più dipendenti dei core * possono * ridurre le prestazioni perché non funzionano su nuclei fisicamente separati, cioè potrebbero influenzarsi a vicenda. –