I have a code which works really good in a parallelized way (with ParallelTable
). I have a machine with 1 processor, 4 physical/8 logical cores, there 100% of the CPU is used for calculations:
I have another machine with 22 physical/44 logical cores. It also worked 100% there (i.e. it used 44 cores). Today I got another processor for that machine, so it has now 44/88 cores. But surprisingly, now it only uses 44 cores:
Of course, I started the 88 kernels manually:
For the reasons above, I don't think it's a problem with multithreading (as explained here), but that Mathematica does can not use two processors simultaneously. Unfortunately, I have not found any relevant information about this.
I will be very happy for every possible suggestion which leads to a solution (or workaround).
Edit - more details on the system:
The computer is a HP Z840 Workstation with 2 Intel Xeon E5-2699v4 CPUs with 2x22 physical/2x44 logical cores (see in the link, Boost your HP Workstation performance when you need to by adding a second processor to your existing single-processor system). Windows as well as several benchmarking programs detect and use the two Processors simultaneously.
I use Windows 10, and Mathematica 11.0.
Edit2 (more details):
When executing ParallelEvaluate[$KernelID]
, it gives me a list from 1-88. When I execute $ProcessorCount
, it gives me 22.
Edit3 (Parallelize
with different Method
):
Suggested in the discussion by rhermans, i tried different Method
s, all from the documentation:
Parallelize[Map[Labeled[Framed[#], $KernelID] &, Range[10]], Method -> "FinestGrained"]
Parallelize[Map[Labeled[Framed[#], $KernelID] &, Range[10]], Method -> "CoarsestGrained"]
Parallelize[Table[Labeled[Framed[i], $KernelID], {i, 12}], Method -> "EvaluationsPerKernel" -> 2]
Parallelize[Table[Labeled[Framed[i], $KernelID], {i, 18}], Method -> "ItemsPerEvaluation" -> 5]
Parallelize[Table[Labeled[Framed[i], $KernelID], {i, 20}], Method -> Automatic]
Parallelize[Select[Range[4000, 5000], PrimeQ[2^# - 1] &], Method -> "FinestGrained"]
All of them have the same behaviour as stated above: only 44 out of 88 cores are running. Furthermore, the 44 cores stay at high (50-70%) CPU use, even after they finished the evaluation.