Filter löschen
Filter löschen

How to make sure matlab uses all the cores on a remote cluster ?

1 Ansicht (letzte 30 Tage)
Hi
I'm trying to run a code on a remote cluster and I would like to check that matlab uses all the cores I've requested (up to 12). From the time it takes to run, I think only one is used.
Does anybody have a simple script that I could run on the cluster (without hpc module) to check if the problem comes from my script itself or something else ?
Thanks
Stéphane

Akzeptierte Antwort

Raymond Norris
Raymond Norris am 2 Dez. 2014
Try running the following code. Set N to the number of cores you want to run on. This should take ~4 seconds to run.
N = 12;
parpool(N)
tic
parfor idx = 1:2*N
pause(2)
end
toc

Weitere Antworten (1)

Stéphane
Stéphane am 3 Dez. 2014
Thanks :-)

Kategorien

Mehr zu Clusters and Clouds finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by