Parallel processing is not able to use all my cores
79 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Alexander Sonin
el 1 de Sept. de 2025 a las 15:12
Comentada: Alexander Sonin
el 4 de Sept. de 2025 a las 14:11
I have the same problem.
The SuperMicro MBD-H12DSI-N6-B motherboard has 2 x 48-core AMD EPYC 7K62 processors.
But MATLAB (R2024a) sees only one of them and opens a pool with 48 workers.
When multiplying and inverting matrices, the dual-processor system load is 50...65%.
The operating system is Microsoft Windows 10 Pro for Workstations 22H2.
The maxNumCompThreads command produces the following result:
>> N = maxNumCompThreads
N =
48
An attempt to set the maximum number of workers to 96 succeeds:
>> LASTN = maxNumCompThreads(96)
LASTN =
48
>> N = maxNumCompThreads
N =
96
But after that, a pool is opened with 48 workers as well:
>> parpool
Starting parallel pool (parpool) using the 'Processes' profile ...
Connected to parallel pool with 48 workers.
ans =
ProcessPool with properties:
Connected: true
NumWorkers: 48
However, I did not find in the settings where I can set the maximum number of workers.
The feature('numcores') command produces the following result:
>> feature('numcores')
MATLAB detected: 96 physical cores.
MATLAB detected: 96 logical cores.
MATLAB was assigned: 48 logical cores by the OS.
MATLAB is using: 48 logical cores.
MATLAB is not using all logical cores because Operating System restricted the number of cores to: 48.
ans =
48
That is, MATLAB complains about the Windows operating system
What to do?
Is it possible to run all 96 cores?
6 comentarios
John D'Errico
el 1 de Sept. de 2025 a las 20:43
Again, this is not a question about MATLAB in any way. You need to find someone who actually knows something about both the OS, and that processor configuration. And the place you will find that expertise is probably not MATLAB Answers.
Respuesta aceptada
Damian Pietrus
el 1 de Sept. de 2025 a las 23:27
Editada: Damian Pietrus
el 3 de Sept. de 2025 a las 19:06
This is tied to the way that older versions of Windows handled CPUs with more than 64 cores. Versions prior to 11 would create "processor groups" of up to 64 cores each, where "by default, an application is constrained to a single group".
EDIT:
After speaking with a colleague, you should be able to set NumWorkers in the Local/Processes profile to 96, save it, and MATLAB should then be able to use the entire pool. The maxNumCompThreads value is not directly related to process pools.
% Get a handle to the local profile
c = parcluster('Processes');
% Set worker count to 96
c.NumWorkers = 96;
% Save the profile
c.saveProfile;
% Start a local parallel pool with 96 workers
p = parpool('Processes', 96);
4 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!