使用CPU的所有核心

时间:2016-02-19 09:57:26

标签: matlab parallel-processing intel cpu-speed hyperthreading

我想在matlab上使用并行计算,我有i7-960 CPU,4核和8个线程,当我在matlab中运行功能(' numCores')命令时,我得到了这个

feature('numCores') 
MATLAB detected: 3 physical cores.
MATLAB detected: 6 logical cores.
MATLAB was assigned: 6 logical cores by the OS.
MATLAB is using: 3 logical cores.
MATLAB is not using all logical cores because hyper-threading is enabled.

ans =

     3

为什么matlab只检测到3个物理内核!以及如何使用所有逻辑和物理内核进行并行计算。 感谢。

1 个答案:

答案 0 :(得分:0)

要使用所有逻辑进程(线程数),您需要在matlab设置中更改NumWorkers。 在matlab 2018菜单中遵循以下步骤: 首选项>>并行计算工具箱>>集群配置文件管理器>>单击右下角的“编辑” >>将“ NumWorkers”设置为逻辑进程数(在您的情况下为8)。 >完成>>关闭并应用