Parallel processing is not able to use all my cores
80 views (last 30 days)
Show older comments
Alexander Sonin
on 1 Sep 2025 at 15:12
Commented: Alexander Sonin
on 4 Sep 2025 at 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 Comments
John D'Errico
on 1 Sep 2025 at 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.
Accepted Answer
Damian Pietrus
on 1 Sep 2025 at 23:27
Edited: Damian Pietrus
on 3 Sep 2025 at 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 Comments
More Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!