[gmx-developers] slightly odd-looking code

Erik Lindahl erik.lindahl at gmail.com
Tue Mar 24 20:49:25 CET 2020


Hi,

[megasnip]
>> 
>> Yes thanks, most of us know ;-) Just updating to add AVX2 would give a
>> clear win.
> 
> Intersting you know this already. It strongly implies any low hanging
> fruit I thought I saw are illusory.
> 

Mark, Paul & Szilard are a bit too humble to boast, but as far as I recall even Cray learnt it from them during a procurement just at them time when Haswell was announced, and that mistake ended up costing Cray quite a few $$$ due to promises about peak floprate :-)

We also check (through timing asm loops) for things like single/dual AVX512 units that aren't available as flags in CPUID. 

However, there is one gap where there are performance gains to be had without excessive efforts:

GROMACS does a really good job detecting the hardware on the host you are compiling on, but if you run on another host you need a different binary, and with many different hosts that leads to... many binaries, which we don't select automatically (apart from our docker images).

We do have some plans for how to improve this, e.g. by using dynamic libraries for different targets that are loaded at runtime. In particular for applications like f at h that could give you both native cuda, native OpenCL, native other-things-to-appear-soon, and native optimal SIMD for each x86 cpu.

Cheers,

Erik



--
Erik Lindahl <erik.lindahl at scilifelab.se>
Professor of Biophysics
Science for Life Laboratory
Stockholm University & KTH
Office (SciLifeLab): +46 8 524 81567
Cell (Sweden): +46 73 4618050 


More information about the gromacs.org_gmx-developers mailing list