Matlab 2014a not using all logical cores

5 Ansichten (letzte 30 Tage)
Arran
Arran am 11 Jun. 2014
Kommentiert: Titus Edelhofer am 12 Jun. 2014
When looking at the number of cores used the following is produced:
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')
I have set the NumWorkers value in the Cluster Profile Manager to 64 and parallel preferences are 64 also. Can someone explain why only 32 logical cores are being used instead of all 64?
To clarify, the 64 cores represent 32 physical cores that are hyperthreaded.
Thanks!

Antworten (2)

Thomas Ibbotson
Thomas Ibbotson am 11 Jun. 2014
See Edric's answer to another question about hyperthreading here: http://www.mathworks.com/matlabcentral/answers/80129#answer_89842
  2 Kommentare
Arran
Arran am 11 Jun. 2014
Hmm, so I would not see any/little difference in computational benchmarks?
Is there a benchmark I could run that would show a difference between Matlab using hyperthreading and no hyperthreading?
Thomas Ibbotson
Thomas Ibbotson am 12 Jun. 2014
As the performance is dependent on the problem, I would recommend measuring the performance of your code using 32 workers, and 64 workers to see if hyperthreading provides any benefit in your case.

Melden Sie sich an, um zu kommentieren.


Titus Edelhofer
Titus Edelhofer am 11 Jun. 2014
Hi,
to clarify: "only 32 logical cores are being used" means you see in the task manager only 50% usage instead of the expected 100%? Have you checked that indeed 64 workers are started (64 MATLAB tasks while doing your computations)?
Titus
  3 Kommentare
Thomas Ibbotson
Thomas Ibbotson am 12 Jun. 2014
I think to answer your questions we need to be clear about how MATLAB is being multi-threaded. MATLAB even without PCT is multi-threaded for many of the core math functions, and by default it will only use the non-hyper-threaded cores, which is what that message is saying.
If you are using PCT workers however, each worker will use one core. So by starting 64 workers you are indeed using 64 cores. However, as we said before starting more workers than physical cores is unlikely to provide any benefit and may be detrimental to performance.
Titus Edelhofer
Titus Edelhofer am 12 Jun. 2014
Hi Arran,
if you are interested in measuring the performance you might play around with using the function maxNumCompThreads. As Thomas wrote, you need to distinguish between explicitly parallelizing (using the Parallel Computing Toolbox with N workers) or implicit parallelization due to multithreading. Here the default MATLAB uses (which in most cases give the best results, there are of course as always exceptions) number of threads = number of physical cores.
Titus

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by