maxNumCompThreads() is limited to 1 on a multi-CPU Linux system

Issue:
>> maxNumCompThreads()
ans =
1
Steps taken:
1) Fresh network install of R2024b and R2025b in default folder using sudo
2) All available toolboxes (including Parallel Computing Toolbox) were installed.
3) Other non-MATLAB software using multithreading runs fine and can utilize all available CPUs
Question
Has anybody experienced similar issue before please? The lscpu shows "Core(s) per socket: 1" with 24 sockets available. "cat /proc/cpuinfo | grep "physical id" outputs 24 lines all pointing to physical ID: 0. Could it be because of the one-core-per-socket split?
Importantly, other multiprocessing tools, for instance python-based torch implementations, or tools like MRtrix, all recognize 24 cores without any problems.
I will appreciate any help on this.
Many thanks in advance!
Supporting information
System specifications
% Operating system: Debian GNU/Linux 12 (bookworm) x86_64
% Kernel: 6.1.0-41-amd64
CPU specifications (given by lscpu):
% Architecture: x86_64
% CPU op-mode(s): 32-bit, 64-bit
% Address sizes: 46 bits physical, 48 bits virtual
% Byte Order: Little Endian
% CPU(s): 24
% On-line CPU(s) list: 0-23
% Vendor ID: GenuineIntel
% Model name: Intel(R) Core(TM) Ultra 9 285
% CPU family: 6
% Model: 198
% Thread(s) per core: 1
% Core(s) per socket: 1
% Socket(s): 24
% Stepping: 2
% CPU(s) scaling MHz: 19%
% CPU max MHz: 7000.0000
% CPU min MHz: 800.0000
% BogoMIPS: 4992.00
"cat /proc/cpuinfo | grep "physical id"
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0

5 件のコメント

Walter Roberson
Walter Roberson 2025 年 11 月 24 日
maxNumCompThreads() would be 1 if the Parallel Computing Toolbox is not installed or is not licensed.
Walter Roberson
Walter Roberson 2025 年 11 月 24 日
% Kernel: 6.1.0-41-amd64
That suggests you are using an AMD system.
% Model name: Intel(R) Core(TM) Ultra 9 285
That suggests that you are using a hardcore Intel system.
Perhaps you need an Intel-based Linux kernel?
Daniel
Daniel 2025 年 11 月 25 日
1) Parallel Computing Toolbox is licensed and installed. It is a university-wide license for the whole MATLAB suite, so all toolboxes are licensed. The toolbox was installed as a part of the installation.
ver
2) I think amd64 is just a x64 architecture, which is also what Intel uses, it is not a brand-specific solution. If this would be the issue, I believe other multithreading software would fail as well.
Walter Roberson
Walter Roberson 2025 年 11 月 25 日
Hmmm....
There is the possibility that somehow the process pool settings are messed up.
Daniel
Daniel 2025 年 11 月 26 日
Thank you Walter for your help, your input guided me into the right direction and looking deeper into the local parpool cluster.

サインインしてコメントする。

 採用された回答

Daniel
Daniel 2025 年 11 月 26 日
編集済み: Daniel 2025 年 12 月 3 日

0 投票

I think I solved it. The solution involved:
1) adjust the number of workers within the local cluster
c = parcluster('local');
c.NumWorkers = 24;
2) save the adjusted cluster profile
saveProfile(c)
3) stop parpool and restart
delete(gcp('nocreate'));
parpool
The NumWorkers within the parcluster('local') was set to 1 by default. Same for the number of threads. With the procedure above, I managed to spawn the desired amount of parallel workers.
*EDIT: removing an unnecessary step from the solution.

その他の回答 (1 件)

Justin Hontz
Justin Hontz 2026 年 2 月 25 日 16:37

1 投票

It seems that this issue is caused by a bug in the Linux kernel for this particular CPU model (Intel(R) Core(TM) Ultra 9 285K). See here:
Upgrading to a newer Linux kernel version (e.g. 6.12.73+deb12-amd64) appears to fix the issue.

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

リリース

R2025b

質問済み:

2025 年 11 月 24 日

回答済み:

2026 年 2 月 25 日 16:37

Community Treasure Hunt

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

Start Hunting!

Translated by