Work around gcc 6.3.0 vectorizer bug on Cray XE/XK systems 87/4287/1
authorJim Phillips <jim@ks.uiuc.edu>
Wed, 20 Jun 2018 21:19:02 +0000 (16:19 -0500)
committerJim Phillips <jim@ks.uiuc.edu>
Wed, 20 Jun 2018 21:19:02 +0000 (16:19 -0500)
GCC 6.3.0 has a bug when building with -march=bdver1, which
Cray programming environment targets for Opteron on XE/XK machines.
The symptom in NAMD is incorrect pressure values on CPU-only builds.

Change-Id: I3c32bf0c32dce4d7626971707d112a3f2e5c132c

arch/CRAY-XE-gnu.arch

index c3b80e1..1311b53 100644 (file)
@@ -14,10 +14,10 @@ CHARMARCH = gemini_gni-crayxe-persistent-smp
 #
 
 CXX = CC -std=c++11 -DNOHOSTNAME -DNO_GETPWUID
-CXXOPTS = -O3 -ffast-math -fexpensive-optimizations -fomit-frame-pointer
+CXXOPTS = -O3 $(GCCFIX) -ffast-math -fexpensive-optimizations -fomit-frame-pointer
 
 CC = cc
-COPTS = -O3 -ffast-math -fexpensive-optimizations -fomit-frame-pointer
+COPTS = -O3 $(GCCFIX) -ffast-math -fexpensive-optimizations -fomit-frame-pointer
 
 
 #
@@ -42,3 +42,9 @@ else
   $(info found module $(module))
 endif
 
+module := $(filter gcc/%,$(loaded_modules))
+ifeq (gcc/6.3.0,$(module))
+  $(info working around bug in gcc 6.3.0)
+  GCCFIX = -fno-tree-loop-vectorize
+endif
+