Parallel processing is not able to use all my cores

79 次查看(过去 30 天)
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 个评论
Alexander Sonin
Alexander Sonin 2025-9-1,16:29
Why "Operating System restricted the number of cores to: 48" ???
How to lift this restriction?
John D'Errico
John D'Errico 2025-9-1,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.

请先登录,再进行评论。

采纳的回答

Damian Pietrus
Damian Pietrus 2025-9-1,23:27
编辑:Damian Pietrus 2025-9-3,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 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by