Project

General

Profile

Bug #2340

avx512fma test code warning with icpc

Added by Mark Abraham almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
build system
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

[1007/1273] Building CXX object src/gr.../hardware/identifyavx512fmaunits.cpp.o
icpc: command line warning #10121: overriding '-march=core-avx2' with '-xCORE-AVX512'

Is there a way to have the compiler flags for this file only include the one for avx512 compilation? We don't need the usual gromacs flags since the only code here is to test for the avx512 support.

Associated revisions

Revision 391ce917 (diff)
Added by Roland Schulz almost 2 years ago

Replace intrinsic with inline asm for AVX512 unit test

Without high optimization, some compilers (icc) produce
assembly that lead to lots of store-to-load forwarding
during initialization, which screws up timing results.
The modified code uses inline asm without loading from
memory, which is fine since the inline (volatile) asm
will not be optimized. Tested to work and detect 2 FMA
units on Core i9-7920X and 1 FMA on Xeon Silver 4116,
with with gcc-5.4, gcc-7.1, icc 2017 and clang-5 with
optimization levels from -O0 to -O3. We also avoid
warning if we override the architecture with the
AVX-512 flags for the source file containing the asm.

Fixes #2340.

Change-Id: I3aea95b162c55c7773182a69f639dff1a01d0603

History

#1 Updated by Roland Schulz almost 2 years ago

There is no easy way to remove the other flag in cmake. But we can disable the warning for this one file.

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

Gerrit received a related patchset '1' for Issue #2340.
Uploader: Erik Lindahl ()
Change-Id: gromacs~release-2018~I3aea95b162c55c7773182a69f639dff1a01d0603
Gerrit URL: https://gerrit.gromacs.org/7317

#3 Updated by Erik Lindahl almost 2 years ago

  • Status changed from New to Fix uploaded

#4 Updated by Erik Lindahl almost 2 years ago

  • Status changed from Fix uploaded to Resolved

#5 Updated by Erik Lindahl almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF