Re: [atlas-devel] Compiling Atlas with hyperthreading
Brought to you by:
rwhaley,
tonyc040457
|
From: R. C. W. <wh...@my...> - 2017-06-29 14:20:34
|
Hyperthreading is an optimization aimed at addressing poorly optimized code. The idea is that most codes cannot drive the backend hardware (ALU/FPU, etc) at the maximal rate, so if you duplicate registers you can, amongst several threads, find enough work to keep the backend busy. ATLAS (or any optimized linear algebra library) already runs the FPU at its maximal rate supported by the cache architecture after cache blocking. If you can already drive the backend at >90% of peak, then hyperthreading can actually *lose* you performance, as the threads bring conflicting data in the cache. It's usually not a night and day difference, but I haven't measured it in the huge blocking era used by recent developer releases (it may be worse there). My general recommendation is turn off hyperthreading for highly optimized codes, and turn it on for relatively unoptimized codes. As to which core IDs correspond to the physical cores, that varies by machine. On x86, you can use CPUID to determine that if you are super-knowledgeable. I usually just turn it off in the BIOS, because I don't like something that may thrash my cache running, even if it might occasionally help :) Cheers, Clint On 06/28/2017 10:32 PM, lixin chu via Math-atlas-devel wrote: > Hello,Would like go check if my understanding is correct for compiling Atlas on a machine that has multiple CPUs and hyperthreading. > I have two types of machine: > - 2 CPU, each with 4 Core, hyperthreaded, 2 threads per core- 2 CPU, each with 8 Cores, hyperthreaded, 2 threads per core > So when I compile Atlas, is it correct that I should use: > -tl 8 0,1,2,3,4,5,6,7 and -tl 16 0,1,....15 (assuming the affinity ID is from 0-7 and 0-15). > That means the number 8 or 16 is the total cores on the machine, not number of cores per CPU. Am I correct ? > I also read somewhere saying that Atlas supports Hyperthreading. What does this mean ? > Does this mean:1. I do not need to disable hyperthreading in BIOS (no performance difference whether it is enabled or disabled, as long as the number of threads and affinity IDs are set correctly when compiling Atlas)2. Or I can make use of the hyperthread, that is, -tl 16 and -tl 32 ? > Thank you very much, > lixin > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > > > _______________________________________________ > Math-atlas-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/math-atlas-devel > |