parallel computing: matlab only uses half the cores available. Help?
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Luis Hernandez
el 2 de Nov. de 2016
Editada: Dylan Gomes
el 6 de Mzo. de 2023
Hello,
I have a machine with 40 cores and I'm trying to use them all for a job. I have set the preferred number of workers to 40 in the Preferences, but I can see that matlab is only using 20 workers. Any suggestions about how to fix this? Thanks a lot
-L
2 comentarios
Adam
el 2 de Nov. de 2016
Does it have 40 actual cores or is it 20 with hyper-threading? I know next to nothing about hyper-threading, but I know my machine has 28 physical cores, but 56 show up in my task manager due to hyper threading. Matlab only uses the 28 though.
Mujahid Sultan
el 13 de Ag. de 2017
Editada: Mujahid Sultan
el 14 de Ag. de 2017
I have the same issue, "nproc" shows 56 where as Matlab only uses 28 cpus, features('nucores') shows 28 cores. Interestingly the map-reduce function of Matlab uses all 56 cores and returns only results for 28. I am loosing half of my computations somewhere.
Respuesta aceptada
Kojiro Saito
el 2 de Nov. de 2016
On MATLAB,
- Go to Parallel Menu -> Manage Cluster Profiles
- Edit your cluster profile (name is 'local')
- Input 40 (the number of your cores) in "NumWorkers" column and click "Done"
Thanks
0 comentarios
Más respuestas (1)
Luis Hernandez
el 2 de Nov. de 2016
5 comentarios
Kojiro Saito
el 7 de Nov. de 2016
@Luis, could you provide me the version of your MATLAB?
Also, if you can figure out the difference between your settings, please let us know.
Thanks,
Dylan Gomes
el 6 de Mzo. de 2023
Editada: Dylan Gomes
el 6 de Mzo. de 2023
I thought I was having the same issue with MATLAB R2021a, but it turned out that I only actually have 6 physical cores, when I thought I had 12.
>> feature('numCores')
%
% MATLAB detected: 6 physical cores.
% MATLAB detected: 12 logical cores.
% MATLAB was assigned: 12 logical cores by the OS.
% MATLAB is using: 6 logical cores.
% MATLAB is not using all logical cores because hyper-threading is enabled.
Ver también
Categorías
Más información sobre MATLAB Parallel Server en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!