turn off hyperthreading when i'am using Matlab
조회 수: 20 (최근 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
댓글 수: 0
답변 (2개)
Sarah Wait Zaranek
2011년 3월 6일
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.
댓글 수: 1
Sarah Wait Zaranek
2011년 3월 6일
Just noticed you are in 10b. The startup option is the way to go for you.
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
2011년 3월 6일
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
2015년 11월 12일
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 Center 및 File Exchange에서 Java Package Integration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!