turn off hyperthreading when i'am using Matlab

21 次查看(过去 30 天)
Hi,
I would like to turn off the hyper threading when i'm using Matlab in on a computer with the following configuration:
MATLAB: R2010b,
OS: Mac pro,
CPU: Intel Xeon (2 processors),
RAM: 8 GB,
ATI Radeon HD 5870
Any help please, thank you in advance

回答(2 个)

Sarah Wait Zaranek
Depending on your release, you can either turn it off in the preferences - or for newer releases there is a start up option for turning it off. It is -singleCompThread.
If you are using an older version (and want to toggle while running), you can use the maxNumCompThreads command (available in R2007b through R2010a). Loren has a nice blog post about this, see link below.

Walter Roberson
Walter Roberson 2011-3-6
编辑:Jan 2013-1-18
Sarah's answer is good if you want to turn off all threading. If you want to turn off only hyperthreading, here is some information from 2009; I don't know if it has become a regular preference in the meantime.
  2 个评论
Sarah Wait Zaranek
Good Point.
MATLAB looks to the OS to see how many cores the machine has - and uses that to set the number of computational threads. For machines with hyperthreading, the OS doesn't distinguish between real core and "virtual" ones. So, this means if you want hyperthreading off you have two options
1) Turn of all multithreading in MATLAB
2) Turn off hyperthreading on the OS level - then MATLAB will remain multithreaded but use the real cores to set the number of computational threads.
Mohammad Sayyafzadeh
I have a similar issue. The computer has 4 16-core CPUs. 64 physical CPUs, no hyper-threads. But MatLab recognises half of them as hyperthreads and therefore, it uses only 32 cores. Anyone knows why is that and how I can resolve this issue? feature('numCores') MATLAB detected: 32 physical cores. MATLAB detected: 64 logical cores. MATLAB was assigned: 64 logical cores by the OS. MATLAB is using: 32 logical cores. MATLAB is not using all logical cores because hyper-threading is enabled.
ans =
32

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Java Package Integration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by