Compilation optimization options for AMD Threadripper, worth the effort?

Hi all,
At work we have build a number of Threadripper 2950 systems for science research, for example Relion:
Mostly we use them for GPU based calculations, but the cores in the 2950 compete very favorably with much more expensive Xeon machines in processing.
If anyone has advice about building or recompiling software specifically with Threadripper optimisations I’d love to hear about it. Especially any experiences about improvements, or lack of them!


Unless you run Gentoo, it’s not easy to apply those optimizations system wide. Gentoo’s Portage supports that kind of customization, but most binary package managers do not.

For Gentoo, add -march=znver1 to make.conf and rebuild world, assuming you’re using GCC 6.3 or greater (you almost certainly are).

Nvidia’s driver stack is proprietary, and won’t benefit from any optimizations anywhere. If you’re using CUDA cores to accelerate the compute load, it’s “immune” from optimization anyway.

ROCm’s stack might benefit from Zen-specific optimizations, but no first-hand experience there.

It is absolutely not worth your time applying Zen-specific optimizations if you’ll need to build a non-Gentoo distro from source to get it. The amount of overhead to build and maintain custom builds is signifigantly greater than any gains you’ll see in software.


Awesome! Thank you for the helpful reply.
I’m not sure I want to go down the route of setting up our own linux setup for this either!
Perhaps all I will do first is compile the software with a few different switches and see if performance improves. A processing run can take several days, so even a few percent will be very welcome.
I have not had any input from someone who has done this, on here or elsewhere. So I’m assuming the results will be not great.