Fix SIMD unit tests on BG/Q
authorMark Abraham <mark.j.abraham@gmail.com>
Mon, 23 Mar 2015 15:49:53 +0000 (15:49 +0000)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Wed, 6 May 2015 10:32:17 +0000 (12:32 +0200)
These got broken in https://gerrit.gromacs.org/#/c/3956/2 when I
inadvertently removed -O3 -NDEBUG from the compiler flags after
version 1. With XL compilers, the CMake default for release mode
is -O -DNDEBUG, and that gives an internal compiler error for
the SIMD unit tests.

Also removed commentary about debug versions of XL compilers, since they
are not appropriate when we're no longer hard-coding compilers.

Change-Id: I5cb06695c061336bea7678353efa153d1f6be955

cmake/Platform/BlueGeneQ-static-XL-C.cmake
cmake/Platform/BlueGeneQ-static-XL-CXX.cmake

index 3999635f62a71c2d933209762a6da1e79399a3c7..e09f98fb5541f4e6a3910f859c61ff9a57740145 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2013,2014, by the GROMACS development team, led by
+# Copyright (c) 2013,2014,2015 by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -74,10 +74,7 @@ __BlueGeneQ_set_static_flags(XL C)
 __BlueGeneQ_set_static_flags(XL CXX)
 
 set(CMAKE_SYSTEM_NAME BlueGeneQ-static CACHE STRING "Cross-compiling for BlueGene/Q" FORCE)
-# xl.ndebug is appropriate for production calculations. For debugging,
-# use xl to add back error checks and assertions. Using the
-# thread-safe compiler version is required, so use (e.g.)
-# CMAKE_C_COMPILER=/bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlc_r
-# CMAKE_CXX_COMPILER=/bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlcxx_r
+set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Compiler optimization flags")
+set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Compiler optimization flags")
 
 mark_as_advanced(CMAKE_XL_CreateExportList) # No idea what spams this
index 3999635f62a71c2d933209762a6da1e79399a3c7..e09f98fb5541f4e6a3910f859c61ff9a57740145 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2013,2014, by the GROMACS development team, led by
+# Copyright (c) 2013,2014,2015 by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -74,10 +74,7 @@ __BlueGeneQ_set_static_flags(XL C)
 __BlueGeneQ_set_static_flags(XL CXX)
 
 set(CMAKE_SYSTEM_NAME BlueGeneQ-static CACHE STRING "Cross-compiling for BlueGene/Q" FORCE)
-# xl.ndebug is appropriate for production calculations. For debugging,
-# use xl to add back error checks and assertions. Using the
-# thread-safe compiler version is required, so use (e.g.)
-# CMAKE_C_COMPILER=/bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlc_r
-# CMAKE_CXX_COMPILER=/bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlcxx_r
+set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Compiler optimization flags")
+set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Compiler optimization flags")
 
 mark_as_advanced(CMAKE_XL_CreateExportList) # No idea what spams this