PARFOR not using all logical cores

44 visualizzazioni (ultimi 30 giorni)
Shlomo Geva
Shlomo Geva il 14 Ago 2019
Risposto: Jackson Burns il 14 Ago 2019
I have seen this quastion asked many times over several years, and I was notable to find a satisfactory answer, let alone a solution - if exists.
Matlab does not seem to use all available logical cores.
True for at least two Macs I tested. One with 2018b and the other with 2019a.
The Mac has 4 physical cores, and 8 logical cores - MATLAB only uses 4 cores.
Does PARFOR only use the physical cores?
Otherwise, how can it be "convinced" to use all logical cores?
The suggestion to edit the parallel preferences is not useful and it does not make a difference.
Does anyone have an actual solution or can advise authoritatively not to waste time on this?
Thanks!!
More Info:
This is MATLAB's report on what's going on:
>> feature('numCores')
MATLAB detected: 4 physical cores.
MATLAB detected: 8 logical cores.
MATLAB was assigned: 8 logical cores by the OS.
MATLAB is using: 4 logical cores.
MATLAB is not using all logical cores because hyper-threading is enabled.
ans =
4
Matlab Version:
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.5.0.1033004 (R2018b) Update 2
MATLAB License Number: 31
Operating System: Mac OS X Version: 10.13.6 Build: 17G8030
Java Version: Java 1.8.0_152-b16 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
Computer:
MacBook Pro (15-inch, 2017)
Processor 2.9 Ghz Intel Core i7
Memory 16GB 2133 MHz LPDDR3

Risposte (1)

Jackson Burns
Jackson Burns il 14 Ago 2019
This answer to the same question gives a comprehensive explanation. The short version: No, MATLAB will not make use of all logical cores because of hyperthreading.

Categorie

Scopri di più su Parallel Computing Fundamentals in Help Center e File Exchange

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by