Feature #1541

MSVC 32bit doesn't support SIMD

Added by Roland Schulz almost 3 years ago. Updated over 2 years ago.

Target version:


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.

Associated revisions

Revision 4b120dde (diff)
Added by Erik Lindahl almost 3 years ago

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.

Fixes #1541.

Change-Id: I7026fb4e1fb6b88c8aa18b060a631cbb80231cd4


#1 Updated by Erik Lindahl almost 3 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.

#2 Updated by Roland Schulz almost 3 years ago

VS2013 supports it if using _vectorcall calling convention.

#3 Updated by Gerrit Code Review Bot almost 3 years ago

Gerrit received a related patchset '1' for Issue #1541.
Uploader: Erik Lindahl ()
Change-Id: I7026fb4e1fb6b88c8aa18b060a631cbb80231cd4
Gerrit URL:

#4 Updated by Erik Lindahl almost 3 years ago

  • Status changed from New to Fix uploaded

#5 Updated by Roland Schulz over 2 years ago

  • Status changed from Fix uploaded to Closed

Also available in: Atom PDF