MSVC 32bit doesn't support SIMD
Compiling with MSVC a 32bit binary fails unless setting GMX_SIMD=None, because we pass gmx_simd_real_t per argument. I assume we don't plan to fix this. But we should mention in the install guide that it isn't supported. We might also want to put either an error in CMakeLists (saying that 5.0 doesn't support building a fast binary for Win32 and that one should use 4.6 for Win32) or automatically set GMX_SIMD to none.
Enable SIMD register calling convention with gmx_simdcall
Cmake now checks if the compiler supports _vectorcall or
_regcall calling convention modifiers, and sets gmx_simdcall
to one of these if supported, otherwise a blank string.
This should enable 32-bit MSVC to accept our SIMD routines
(starting from MSVC 2013), and with ICC it can at least in
theory improve performance slightly by using more registers
for argument passing in 64-bit mode too. Presently this is
only useful on x86, but the infrastructure will work if we
find similar calling conventions on other architectures.
#1 Updated by Erik Lindahl over 4 years ago
- Tracker changed from Bug to Feature
- Priority changed from Normal to Low
This is a well-known bug in the MSVC compiler that Microsoft never appears to want to fix. While they claim it's an integral part of their ABI, as far as I recall it works great using ICC. Not really a Gromacs bug we can fix, but maybe it would be good recommending a different compiler.