Bug #1092
MSVC AVX nbnxn kernels don't compile
Description
With AVX the nbnxn kernels don't compile with MSVC2010:
c:\users\roland\git\gromacs4.6\src\mdlib\nbnxn_kernels\nbnxn_kernel_simd_2xnn_outer.h(633) : error C2059: syntax error : 'bad suffix on number'
c:\users\roland\git\gromacs4.6\src\mdlib\nbnxn_kernels\nbnxn_kernel_simd_2xnn_outer.h(633) : error C2146: syntax error : missing ')' before identifier 'b10110001'
c:\users\roland\git\gromacs4.6\src\mdlib\nbnxn_kernels\nbnxn_kernel_simd_2xnn_outer.h(633) : error C2059: syntax error : ')'
Associated revisions
History
#1 Updated by Erik Lindahl about 8 years ago
Fixed by using the _MM_SHUFFLE() macro. Patch coming.
#2 Updated by Erik Lindahl about 8 years ago
Hm. Using _MM_SHUFFLE() fixed the building, but apparently the nbnxn kernels have problems with double precision AVX256 using MSVC. Both the RF and PME NBNXN complex tests segfault.
#3 Updated by Erik Lindahl about 8 years ago
- Status changed from New to Closed
Compilation problem fixed by gerrit commit 1965. However, while compilation now works there is a bug for double-precision AVX_256 nbnxn kernels in single precision 32-bit on windows. See redmine issue #1097.
Fixes SSE/AVX compilation under Windows
- 32-bit MSVC cannot handle more than 3 xmm/ymm register
arguments due to stack alignment, so some group kernel
routines have been copied into optional macros. These are
only used for 32-bit MSVC compiles; other alternatives including
icc on windows use the normal functions that are easier to debug.
- Since the windows compilers control 32 vs 64 bit with flags, a
new log file entry has been added to show whether the present
build is a 32 or 64 bit one.
- Minor fixes to enable double precision AVX_128_FMA builds on
windows.
- Replace use of explicit binary constants with _MM_SHUFFLE()
macro in nbnxn kernels to make it compile under windows.
With these fixes, both SSE2, SSE4, and AVX256 group kernels pass
regressiontests in single and double with MSVC2010, MSVC2012, and
icc 2013.1 used with visual studio 2012. The nbnxn kernels pass
all tests with the exception of 32-bit double precision AVX_256
where all three compilers still fail (Refs #1097).
Fixes #1092, #1093, #1068.
Change-Id: I6807b102af1db01cafba26a45284f5c38c7498fd