FAH & QMD & AMD64 & SSE2

The Folding@home project's scientific cores are built with Intel's compilers and libraries. The Pande Group found the Intel compilers and libraries offer the least compromise between speed and legal restrictions, and happens to match the largest number of platforms currently running the F@h client (Intel CPUs).

Vital parts of some cores (e.g. Gromacs) are handwritten in assembler, but others (e.g. Tinker, AMBER, and QMD) rely solely on compiler and library optimizations.

Currently, the Intel compiler generates generic code that runs on any CPU under Windows or Linux. It recognizes SSE and SSE2 in both AMD and Intel. The only exception are the Intel libraries for BLAS/LAPACK which are used by QMD which ignores AMD64 SSE2 capabilities. When QMD work units were handed out to AMD64 systems, they will run without the benefit of SSE2 optimizations. If QMD becomes active again, this may be reconsidered. See Dr. Pande's comment.

The issue was not FAH specific; it manifested itself on every SSE-enabled program built against the advanced features of the noted Intel library. AMD has brought up this crippling by Intels compiler in its lawsuit against Intel, to quote from pages 40 & 41:

124. Intel’s compilers are designed to perform specialized types of optimizations that are particularly advantageous for ISVs developing software programs that rely heavily upon floating point or vectorized mathematical calculations. Such programs include, for example, mathematical modeling, multimedia, and video game applications. 125. Intel has designed its compiler purposely to degrade performance when a program is run on an AMD platform. To achieve this, Intel designed the compiler to compile code along several alternate code paths. Some paths are executed when the program runs on an Intel platform and others are executed when the program is operated on a computer with an AMD microprocessor. (The choice of code path is determined when the program is started, using a feature known as “CPUID” which identifies the computer’s microprocessor.) By design, the code paths were not created equally. If the program detects a “Genuine Intel” microprocessor, it executes a fully optimized code path and operates with the maximum efficiency. However, if the program detects an “Authentic AMD” microprocessor, it executes a different code path that will degrade the program’s performance or cause it to crash.

There is a code modification for changing the "Genuine Intel" checking in the compiler binary, but it is prohibited by both the FAH EULA and the Intel EULA.

AMD has a functionally comparable math library to link with the QMD core, but the speed is not as good as Intel counterpart. And more importantly, the AMD EULA prohibits it from running on Intel CPUs, so it's not a viable solution either.

Reference Links


 * Computer Crime Research Center: AMD sues Intel
 * The Tech Report: Does Intel's compiler cripple AMD performance?
 * swallowtail: Intel's compiler: is crippling the competition acceptable?
 * Computer Crime Research Center: AMD sues Intel
 * The Tech Report: Does Intel's compiler cripple AMD performance?
 * swallowtail: Intel's compiler: is crippling the competition acceptable?
 * swallowtail: Intel's compiler: is crippling the competition acceptable?