8
$\begingroup$

From what I have been told, Mathematica licenses come with a limited number of cores it can run on in parallel.

I have 24 cores on my machine and when I do $ProcessorCount I get 12. Does it mean that I can use 12 cores in parallel with my license?

I have the student edition of version 10.0.2.0 for Mac OS X.

$\endgroup$
10
$\begingroup$

You can evaluate $MaxLicenseProcesses and $MaxLicenseSubprocesses to find out what you are licensed to use. These values are also available by logging in on the Wolfram user portal and reviewing your license information.

Each front-end (graphical or command line) consumes a process. Each parallel subkernel consumes a subprocess. The default kernel configuration usually uses only $MaxLicenseSubprocesses / $MaxLicenseProcesses subkernels in order to "leave room" for other main processes to be started.

$LicenseProcesses and $LicenseSubprocesses show how many of each type of process are in use.

Some of the libraries used internally by the Mathematica implementation are intrinsically multi-threaded. Such threads may spill over onto more processors than the licensed limits would otherwise suggest since, strictly speaking, the limits only apply to kernels and subkernels. Internal thread generation is beyond user control.

$\endgroup$
8
$\begingroup$

It's not a licensing issue

At current, Apple's highest core-count is 12. That's probably what you have.

The confusion may come from the CPU having Hyper-Threading, which is a technology that causes the operating system to see each physical core as two logical cores. In the case of your 12-core processor, the operating system would see 24 logical cores.

Technologies like Hyper-Threading tend to have situational advantages. If a program has a lot of wait times in it, such as if it's working with disks or network interfaces, then Hyper-Threading can allow the CPU to switch jobs more quickly, increasing performance. However number-crunching programs like Mathematica have relatively little need for this sort of juggling; in fact, it's often slower than not having Hyper-Threading at all. As a result, number-crunching programs tend to ignore Hyper-Threading.

So, Mathematica's probably just counting the 12 physical cores, ignoring the 12 additional virtual cores.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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