4
$\begingroup$

I am running some codes in parallel in a new computer and I notice that mathematica is using only one socket.

processors

The computer has two sockets with 28 cores each one as in the picture but $ProcessorCount" is giving 28 cores and I have 56.

I tried to unlock processorCount and set a new value as described here but the problem persists.

I also tested some of the methods as in this post

We have another computer with an Intel Xeon ES 2660 also with two sockets of 24 cores each one and with the 12.2 version of mathematica and is working fine.... giving me in 100% all cores in a parallel operation...

Note: Hyperthreading is activated but I am using number of number of kernels = number of physical processors.

I am using windows 10 and mathematica 12.2

UPDATE: After the Szabolcs answers, the picture looks confuse. I have two sockets with 28 cores (total = 56 cores). In Preferences -> Parallell it says Number of procesor cores = 28. I can launch 56 or 112 kernels and the picture is always the same... the half, so for some reason Mathematica is not detecting the second processor.

any hint to solve this issue?

UPDATE 2: Is know that "usually" the hyperthreading does not speed the computations, following this post I decided to disable the hyperthreading from the BIOS and now Mathematica is detecting the 56 physical cores in windows 10.

Note: In addition, before disabling hyperthreading where Mathematica was detecting only 26 physical cores. In the task manager-set affinity one group was disabled. I am not expert but I am not sure if in someway windows was limiting the number of cores.

BTW. disabling hyperthreading solved my problem.

Thank you

$\endgroup$
11
  • $\begingroup$ (1) By default, Mathematica starts as many kernels as the number of physical cores you have (logical cores appearing due to hyper-threading are not counted). Therefore, on systems with hyper-threading, you will see half as many kernels as the number of cores shown by the OS, just as in your screenshot. This is normal. (2) You can start as many kernels as you please (as your license allows), regardless of how many CPU cores you have. $\endgroup$
    – Szabolcs
    Jul 6 at 14:48
  • $\begingroup$ Hello @Szabolcs thanks for your answer but in fact, as can be seen in the picture, the computer has 56 physical cores distributed in two sockets (each one with 26), this gives a a total of 112 logical cores. Mathematica is using only the half. $\endgroup$ Jul 6 at 14:54
  • $\begingroup$ Correction: Hello @Szabolcs thanks for your answer I understand now. Is curious but in another computer I have a few less cores with hyper-threading activated and all of them are activated in a parallel computation. $\endgroup$ Jul 6 at 15:00
  • $\begingroup$ Your screenshot is showing 56 cores working at 100%. One kernel was started for each physical core, so 56 in total. However, you can start as many kernels as you want using LaunchKernels[]. $\endgroup$
    – Szabolcs
    Jul 6 at 15:38
  • 3
    $\begingroup$ Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. $\endgroup$
    – bbgodfrey
    Jul 6 at 16:30
2
$\begingroup$

I solved this issue by disabling hyperthreading directly from the BIOS. Now Mathematica is using all cores. $ProcessorCount is now giving 56.

$\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.