6
$\begingroup$

I'm running Mathematica 10.3.1.0 on a machine with 16 cores, but Mathematica (in the Parallel settings) says "Number of processor cores is 8." It's a 16-core Opteron 6300 chip on an Ubuntu system. All 16 cores show up in the system information and function normally within other applications.

I manually set it to 16 (with no error or warning from Mathematica), but running parallel operations throws several errors about kernels seeming to be "dead."

(Note that the license is not a problem. The limitation displays correctly as 16 cores.)

Additional Data: Thanks for the preliminary responses. I am sorry I was not more specific. This is an Opteron 6376 chip, model OS6376WKTGGHKWOF.

To the best of my knowledge (which could be wrong!) this chip has 16 physical cores. I can't find more specific information on product pages, manuals, etc. that lists anything for the number of cores other than "16."

$\endgroup$
6
  • 3
    $\begingroup$ Are you certain your particular chip has 16 physical cores? The system information usually gives the core count in terms of logical cores, which are usually double the physical core count. $\endgroup$
    – IPoiler
    Feb 1, 2016 at 18:18
  • $\begingroup$ Following up on @IPoiler's suggestion, perhaps you could check your specific processor model against this list: Wikipedia Opteron 6k series $\endgroup$
    – MarcoB
    Feb 1, 2016 at 18:23
  • $\begingroup$ Based on that link, it appears there should be 16 cores (I assume I should be reading the column "Cores"). $\endgroup$ Feb 2, 2016 at 22:50
  • $\begingroup$ Please see the comment below Mark Adler's post for my interpretation of the cores issue. As for the dead kernels, I think it might be a licensing limitation. How many subkernel licences do you have? $\endgroup$ Feb 2, 2016 at 22:57
  • 1
    $\begingroup$ Mathematica tries to detect the number of physical cores (if I remember correctly, the check relies on a MKL function). The automatic detection may not be 100% accurate, especially for AMD chips. However, it should be easy to adjust the number of parallel kernels or parallel threads used, see this answer. $\endgroup$
    – ilian
    Feb 4, 2016 at 15:31

1 Answer 1

5
$\begingroup$

First off, the 6300 series has various models with 4, 8, 12, or 16 "cores". You should provide the full model number (in which the "00" in "6300" is filled in with other digits).

Second, there is the issue of how you count "cores". Intel processors have physical cores and logical cores, where there are twice as many of the latter as the former. The resources on a single physical core are shared between two logical cores, called "hyper-threading". This can provide something close to the effect of having that many actual physical cores, since not all of the resources on a physical core are being used all the time. Sometimes the logical cores are called "threads".

On AMD processors, a similar thing is going on with a different terminology, which is "modules" and "cores", where modules are the physical cores, and cores are the logical cores. The details are different, with what core sub-units are duplicated or not in a module.

So what is Mathematica reporting in the preferences and with $ProcessorCount? What I can say is that for my machine, I am getting 2, where my processor (an Intel 3667U) has two physical cores and four logical cores. Maybe others can contribute here with what they see for their multi-core/thread machines.

Update:

The Opteron 6376 has 16 "cores", which is actually 8 modules. Each module has two integer units and one floating point unit. So if you are doing mostly integer stuff, perhaps each module performs well as two cores. But if you are doing mostly floating point stuff, it may be more like one core. As Oleksandr noted in the comments, whether you should consider it to be 8 or 16 will depend on the application.

Interestingly, AMD was recently sued for false advertising and fraud in their claims on the number of cores.

$\endgroup$
5
  • $\begingroup$ I have an iMac with what I believe is an Intel Core i7-2600 (3.4 GHz). According to the Intel spec sheet, this processor has 4 cores and 8 threads. $ProcessorCount yields 4. $\endgroup$
    – Cassini
    Feb 1, 2016 at 20:12
  • $\begingroup$ My pokey little MacBook with an Intel Core M has two cores, by the way. $\endgroup$
    – Cassini
    Feb 1, 2016 at 20:16
  • $\begingroup$ I can confirm that Mathematica treats my i7-3820QM with four physical processors and eight threads as having just four processors for purposes of parallel processing. $\endgroup$
    – bbgodfrey
    Feb 1, 2016 at 21:20
  • $\begingroup$ It is not quite true that a "module" is one "physical core". But nor is it two "physical cores". The vector unit is shared between two cores in a module, as is the instruction fetch/decoder. The ALUs are separate. In an Intel chip, the two threads running on a physical core share all execution resources (everything except registers and some caches), but with AMD, the situation is more complex. This makes it hard to determine whether a module should be considered one core or two--it depends on the application. As far as Mathematica goes, it depends what you are doing with it. $\endgroup$ Feb 2, 2016 at 22:55
  • $\begingroup$ HPC is a prestige application, but it is not particularly profitable. Ordinary servers are usually running integer applications and do not place much importance on floating-point or vector performance. Vector units and instruction decoders take up a large amount of the power and area budget, so AMD has chosen to make these shared resources in order to have more integer cores on the same chip, and thus sell it competitively into the commodity server market. They also are not able to match Intel's clock speeds, so adding more execution resources to the chip is their only hope for performance. $\endgroup$ Feb 2, 2016 at 23:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.