Can parallel computing toolbox not parallellise over multiple CPUs?

4 visualizaciones (últimos 30 días)
Thomas Arildsen
Thomas Arildsen el 10 de Jul. de 2019
Comentada: Wenkang An el 7 de Sept. de 2020
I am programming a parfor loop to run on a computer with 2 CPUs with 12 cores each. Despite several different attempts to initialise a parpool with 24 workers, I get pools with maximum 12 workers. I have Parallel Computing Toolbox but not Distributed Computing Server.
Is there a way to parallellise over all 24 cores with PCT? Is 12 workers perhaps an upper limit in PCT, or is it because two separate CPUs in one computer requires DCS?
  1 comentario
Wenkang An
Wenkang An el 7 de Sept. de 2020
Hi! I'm having the same issue as you described in this post. Can you explain a bit more on "It was a setting for the SLURM job scheduler on the computer that prevented Matlab from using more cores"? Thank you!

Iniciar sesión para comentar.

Respuestas (1)

Matt J
Matt J el 10 de Jul. de 2019
Editada: Matt J el 10 de Jul. de 2019
  3 comentarios
Jason Ross
Jason Ross el 10 de Jul. de 2019
Editada: Jason Ross el 10 de Jul. de 2019
You can change the properties in the Local scheduler to run whatever number of workers you wish.
Parallel > Create and Manage Clusters > local > Edit, then set "Number of workers to start on your local machine" to 24.
If you always want to open the pool with 24, also set the preference to do so - Preferences > Parallel Computing Toolbox > Preferred number of workers in a parallel pool.
One caveat to understand is to check the number of cores vs. number of threads supported by your CPUs. The operating system will report all cores as if they are "real", but processing only happens on the cores. So if you have two CPUs with 6 cores / 12 threads on each, upping the number of workers is not likely to increase your performance, as you will be bottlenecked waiting on the cores.
If you Google your processor you can find this out, the processor manufacurers publish them in the CPU specs.
Thomas Arildsen
Thomas Arildsen el 11 de Jul. de 2019
I figured it out now: It was a setting for the SLURM job scheduler on the computer that prevented Matlab from using more cores.

Iniciar sesión para comentar.

Categorías

Más información sobre Cluster Configuration en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by