Bump required gcc compiler to 5.1
authorMark Abraham <mark.j.abraham@gmail.com>
Thu, 24 Jan 2019 13:55:53 +0000 (14:55 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Fri, 25 Jan 2019 05:53:34 +0000 (06:53 +0100)
This prepares for the C++14 switch. Bumped CUDA version to 8.0 (which
we anyway will bump to 9.0 for C++14 support shortly). Bumped
regressiontests version requirement to 5.1 (and the cmake version to
3.9.6, which we forgot recently).

Removed references to minimum versions of gcc and clang that are now
always satisfied by our minimum requirements for those.

Refs #2831

Change-Id: Ifa062b361af08848fd92c3906fd2af04cfa1b8d6

15 files changed:
CMakeLists.txt
admin/builds/post-submit-matrix.txt
admin/builds/pre-submit-matrix.txt
admin/builds/regressiontests-update.py
admin/builds/release-matrix.txt
cmake/gmxBuildTypeReference.cmake
cmake/gmxBuildTypeTSAN.cmake
cmake/gmxCFlags.cmake
cmake/gmxManageNvccConfig.cmake
docs/dev-manual/build-system.rst
docs/install-guide/index.rst
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdrun/integrator.h
src/gromacs/mdrun/minimize.cpp
src/gromacs/utility/gmxregex.cpp

index d14d72f49bd32f2f7f6fa728a83fa1bc955ffedd..f9e6cb5152adc6026f2045a114790d91bcf25979 100644 (file)
@@ -185,11 +185,12 @@ option(GMX_USE_OPENCL "Enable OpenCL acceleration" OFF)
 
 # Decide on GPU settings based on user-settings and GPU/CUDA
 # detection. VS2017 requires CUDA 9.0, for the other arch/compilers
-# rest we require CUDA 7.0 or later (including for clang-CUDA).
+# rest we require CUDA 8.0 or later (including for clang-CUDA)
+# because that is the earliest version that supports gcc 5.x
 if(MSVC)
     set(REQUIRED_CUDA_VERSION 9.0)
 else()
-    set(REQUIRED_CUDA_VERSION 7.0)
+    set(REQUIRED_CUDA_VERSION 8.0)
 endif()
 set(REQUIRED_CUDA_COMPUTE_CAPABILITY 3.0)
 
index 4808372448daaf2299e55b3f829b9d8039d3b3d3..5c817acad951e0883d89c8beaa4fd66548b4fddf 100644 (file)
@@ -29,7 +29,7 @@ icc-17 simd=avx_256 npme=1 nranks=2 no-openmp  double fftpack release
 
 # Test CUDA build on a agent with no CUDA devices
 # Test without TNG support
-gcc-4.9 gpuhw=none cuda-10.0 openmp no-tng release-with-assert
+gcc-8 gpuhw=none cuda-10.0 openmp no-tng release-with-assert
 
 # Test non-default GMX_PREFER_STATIC_LIBS behavior
 # TODO enable this
index d4fcfa523e16bbe0ecd722b28ed96aefa2e3111e..72a78e473a07976d33dfd2ef4385c44addc79470 100644 (file)
 # newer infrastructure in CI, unless it's either easy or of
 # high impact.)
 
-# Test older gcc
+# Test oldest supported gcc
 # Test oldest supported CUDA
-# Test oldest supported cmake
 # Test oldest supported Ubuntu
 # Test MPI with CUDA
 # Test MPI with gcc
 # Test MPMD PME with library MPI
-gcc-4.8 gpuhw=nvidia cuda-7.0 cmake-3.9.6 mpi npme=1 nranks=2 openmp
+gcc-5 gpuhw=nvidia cuda-8.0 cmake-3.10.0 mpi npme=1 nranks=2 openmp
 
 # Test non-default use of mdrun -gpu_id
 # Test newest gcc supported by newest CUDA at time of release
@@ -69,11 +68,12 @@ msvc-2017 openmp release-with-assert
 # Test hwloc support
 icc-19 no-thread-mpi double openmp mkl cmake-3.9.6 simd=none release hwloc
 
+# Test oldest supported cmake
 # Test NVIDIA OpenCL
 # Test external clFFT (for build speed)
 # Test MPI + OpenCL
 # Test AVX2_256 SIMD
-gcc-6 openmp gpuhw=nvidia opencl-1.2 clFFT-2.14 mpi simd=avx2_256
+gcc-6 openmp gpuhw=nvidia opencl-1.2 clFFT-2.14 cmake-3.9.6 mpi simd=avx2_256
 
 # Test AMD OpenCL
 # Test external clFFT (for build speed)
index 7786d17274820563ba2a79e87b78ce44e8eae820..f1dcdaf6880f6ecee026880c1369192841efd4e2 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2016, by the GROMACS development team, led by
+# Copyright (c) 2016,2019, 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.
@@ -34,7 +34,7 @@
 
 import os.path
 
-build_options = ['gcc-4.8', 'cmake-3.4.3']
+build_options = ['gcc-5', 'cmake-3.9.6']
 extra_projects = [Project.REGRESSIONTESTS]
 
 def run_build(context, cmake_opts):
index 15f7314c9a655cab3dd8041d11936dcf8d774743..2ec302ceb28161ae9d0a865e959f0c26f752b478 100644 (file)
 # minimal assertions, as we intend the code to be built and used
 # by end users).
 
-# Test oldest supported gcc at time of release
 # Test mpi support
 # Test mdrun-only build
-gcc-4.8 mpi mdrun-only release cmake-3.9.6
+gcc-6 mpi mdrun-only release cmake-3.9.6
 
 # Test static linking with gcc
 # Test newest gcc at time of release
@@ -38,6 +37,7 @@ icc-19 double release
 # Test newest supported clang version
 clang-5 static double release cmake-3.10.0
 
+# Test oldest supported gcc at time of release
 # Test with GPU support
 # Test with newest CUDA at time of release
 gcc-5 gpuhw=nvidia cuda-10.0 release
index 8116ac7b7f44cafb4b12764ffee92ec2ef5eafe9..9d5b99ac6e95d05d42a4c653df2f3900930d8b25 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2012,2013,2014,2015,2016, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014,2015,2016,2019, 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.
@@ -48,8 +48,8 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Reference")
     set(GMX_SOFTWARE_INVSQRT OFF CACHE BOOL "Disabled for regressiontests reference builds" FORCE)
     set(GMX_THREAD_MPI OFF CACHE BOOL "Disabled for regressiontests reference builds" FORCE)
 
-    if(NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR NOT "${CMAKE_C_COMPILER_VERSION}" MATCHES "4.8")
+    if(NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_VERSION}" VERSION_GREATER_EQUAL "6")
         message(WARNING "Reference values for regressiontests should use GROMACS compiled with "
-            "gcc 4.8, but your configuration is using ${CMAKE_C_COMPILER_ID}-${CMAKE_C_COMPILER_VERSION}.")
+            "gcc 5.x, but your configuration is using ${CMAKE_C_COMPILER_ID}-${CMAKE_C_COMPILER_VERSION}.")
     endif()
 endif()
index c84c76d0aed75114b52c114b8d083e7b9abdda5b..35e0759b681d442ad3bf5d4944fd9f3d7bd95467 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2014,2017,2018, by the GROMACS development team, led by
+# Copyright (c) 2014,2017,2018,2019, 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.
@@ -32,9 +32,9 @@
 # To help us fund GROMACS development, we humbly ask that you cite
 # the research papers on the package. Check out http://www.gromacs.org.
 
-# Custom build type "TSAN", to be used for compiling GROMACS 
-# with clang 3.4 or gcc 4.8 (currently pre-release) with ThreadSanitizer
-# (aka "TSan") turned on, so that the tests can be run to detect data races.
+# Custom build type "TSAN", to be used for compiling GROMACS with
+# clang or gcc with ThreadSanitizer (aka "TSan") turned on, so that
+# the tests can be run to detect data races.
 #
 # The main advantage of the clang version is that there can be a
 # suppressions file that acts at compile time, though there is no use of 
@@ -81,12 +81,6 @@ foreach(_language C CXX)
     string(TOUPPER "${CMAKE_BUILD_TYPE}" _cmake_build_type)
     if (_cmake_build_type STREQUAL TSAN)
         set(TMPI_ATOMICS_DISABLED 1)
-        if (NOT((CMAKE_${_language}_COMPILER_ID MATCHES "Clang" AND
-                    CMAKE_${_language}_COMPILER_VERSION VERSION_GREATER 3.2.999)
-             OR (CMAKE_${_language}_COMPILER_ID MATCHES "GNU" AND
-                    CMAKE_${_language}_COMPILER_VERSION VERSION_GREATER 4.7.999)))
-            message(FATAL_ERROR "The ThreadSanitizer build is only available with clang ${_human_readable_language} >=3.3 and gnu ${_human_readable_language} >=4.8.")
-        endif()
     endif()
 
 endforeach()
index 0faf9f5c0eb7f61228a60ddb576c83603f80c62a..8416e544ef2a1b7865346e59b8e474c180f849a3 100644 (file)
@@ -71,6 +71,8 @@ function(gmx_set_cmake_compiler_flags)
         # type. Used for, e.g., -Wno-array-bounds in Release to work around
         # gcc-4.8 being a little too vocal about some perfectly good code,
         # while using RelWithAssert (ie. without that suppression) in Jenkins.
+        #
+        # TODO check the behaviour of more recent gcc on the improved code
         set(GMXC_${language}FLAGS_RELEASE "${GMXC_${language}FLAGS_RELEASE} ${GMXC_${language}FLAGS_RELEASE_ONLY}")
 
         # Modify the real CMake variables for compiler flags for all
@@ -111,8 +113,6 @@ macro (gmx_c_flags)
             GMX_TEST_CFLAG(CFLAGS_WARN "-Wall -Wno-unused -Wunused-value -Wunused-parameter" GMXC_CFLAGS)
             GMX_TEST_CFLAG(CFLAGS_WARN_EXTRA "-Wextra -Wno-missing-field-initializers -Wno-sign-compare -Wpointer-arith" GMXC_CFLAGS)
             GMX_TEST_CFLAG(CFLAGS_WARN_UNDEF "-Wundef" GMXC_CFLAGS)
-            # Since 4.8 on by default. For previous version disabling is a no-op. Only disabling for Release because with assert
-            # the warnings are OK.
             GMX_TEST_CFLAG(CFLAGS_WARN_REL "-Wno-array-bounds" GMXC_CFLAGS_RELEASE_ONLY)
             if(CYGWIN)
                 GMX_TEST_CFLAG(CFLAGS_WARN_SUBSCRIPT "-Wno-char-subscripts" GMXC_CFLAGS)
index 4640ea1d76d8afa64de385d898516b0aaf14be70..1b26a8a26fd01ff52e2e68aa9ce1274c6ffc9874 100644 (file)
@@ -67,8 +67,10 @@ if(CUDA_HOST_COMPILER_CHANGED)
     set(CUDA_HOST_COMPILER_OPTIONS "")
 
     if(APPLE AND CMAKE_C_COMPILER_ID MATCHES "GNU")
-        # Some versions of gcc-4.8 and gcc-4.9 produce errors (in particular on OS X)
-        # if we do not use -D__STRICT_ANSI__. It is harmless, so we might as well add it for all versions.
+        # Some versions of gcc-4.8 and gcc-4.9 have produced errors
+        # (in particular on OS X) if we do not use
+        # -D__STRICT_ANSI__. It is harmless, so we might as well add
+        # it for all versions.
         list(APPEND CUDA_HOST_COMPILER_OPTIONS "-D__STRICT_ANSI__")
     endif()
 
index cf5b38fb8ace04a129a61fe50f7e97866eb1bd16..020a35fec069f34cf6365961750e9fb9aee2edac 100644 (file)
@@ -55,7 +55,7 @@ testing. Their implementations can be found in ``cmake/gmxBuildTypeXXX.cmake``.
 **Reference**
   This build type compiles a version of |Gromacs| aimed solely at correctness. All
   parallelization and optimization possibilities are disabled. This build type is
-  compiled with gcc 4.7 to generate the regression test reference values, against
+  compiled with gcc 5 to generate the regression test reference values, against
   which all other |Gromacs| builds are tested.
 
 **RelWithAssert**
@@ -69,19 +69,19 @@ testing. Their implementations can be found in ``cmake/gmxBuildTypeXXX.cmake``.
   be useful for the tools.
 
 **TSAN**
-  Builds |Gromacs| for use with ThreadSanitzer in gcc >= 4.8 and clang
-  >= 3.4 (http://clang.llvm.org/docs/ThreadSanitizer.html) to detect
+  Builds |Gromacs| for use with ThreadSanitzer in gcc and clang
+  (http://clang.llvm.org/docs/ThreadSanitizer.html) to detect
   data races. This disables the use of atomics in ThreadMPI,
   preferring the mutex-based implementation.
 
 **ASAN**
-  Builds |Gromacs| for use with AddressSanitzer in gcc >= 4.8 and
-  clang >= 3.4 (http://clang.llvm.org/docs/AddressSanitizer.html) to
+  Builds |Gromacs| for use with AddressSanitzer in gcc and
+  clang (http://clang.llvm.org/docs/AddressSanitizer.html) to
   detect many kinds of memory mis-use. By default, AddressSanitizer
   includes LeakSanitizer.
 
 **MSAN**
-  Builds |Gromacs| for use with AddressSanitzer in clang >= 3.4
+  Builds |Gromacs| for use with AddressSanitzer in clang
   (http://clang.llvm.org/docs/MemorySanitizer.html) to detect
   reads of unitialized memory. This functionality requires that
   dependencies of the |Gromacs| build have been built in a compatible
index ef7abae53f4cda981b6063f5a18421defc7125c6..933bdc8485ef534be71a92ec4de7aca495de1020 100644 (file)
@@ -114,7 +114,7 @@ You should strive to use the most recent version of your
 compiler. Since we require full C++11 support the minimum supported
 compiler versions are
 
-* GNU (gcc) 4.8.1
+* GNU (gcc) 5.1
 * Intel (icc) 17.0.1
 * LLVM (clang) 3.3
 * Microsoft (MSVC) 2017 (C++14 is used)
@@ -138,7 +138,7 @@ other compilers, read on.
 
 On Linux, both the Intel and clang compiler use the libstdc++ which
 comes with gcc as the default C++ library. For |Gromacs|, we require
-the compiler to support libstc++ version 4.8.1 or higher. To select a
+the compiler to support libstc++ version 5.1 or higher. To select a
 particular libstdc++ library, use:
 
 * For Intel: ``-DCMAKE_CXX_FLAGS=-gcc-name=/path/to/gcc/binary``
@@ -1258,7 +1258,7 @@ much everywhere, it is important that we tell you where we really know
 it works because we have tested it. We do test on Linux, Windows, and
 Mac with a range of compilers and libraries for a range of our
 configuration options. Every commit in our git source code repository
-is currently tested on x86 with a number of gcc versions ranging from 4.8.1
+is currently tested on x86 with a number of gcc versions ranging from 5.1
 through 7, versions 16 and 18 of the Intel compiler, and Clang
 versions 3.4 through 5. For this, we use a variety of GNU/Linux
 flavors and versions as well as recent versions of Windows. Under
index f3a44de6659d7bd9dcd1c4df6fb744c8f74e1109..f43b13e7a274c15392230a841155e79cf44691db 100644 (file)
@@ -270,8 +270,8 @@ check_solvent_cg(const gmx_moltype_t    *molt,
     gmx_bool              perturbed;
     gmx_bool              has_vdw[4];
     gmx_bool              match;
-    real                  tmp_charge[4]  = { 0.0 }; /* init to zero to make gcc4.8 happy */
-    int                   tmp_vdwtype[4] = { 0 };   /* init to zero to make gcc4.8 happy */
+    real                  tmp_charge[4]  = { 0.0 }; /* init to zero to make gcc 7 happy */
+    int                   tmp_vdwtype[4] = { 0 };   /* init to zero to make gcc 7 happy */
     int                   tjA;
     gmx_bool              qm;
     solvent_parameters_t *solvent_parameters;
index 38cd678f88f1c00f1a5f1606b58dee64d92a147d..26b10d08d173640c53513cea917af4406b3a7cf7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018,2019, 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.
@@ -184,12 +184,7 @@ struct Integrator
      * based on the .mdp integrator field. */
     void run(unsigned int ei, bool doRerun);
     //! We only intend to construct such objects with an initializer list.
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)
-    // Aspects of the C++11 spec changed after GCC 4.8.5, and
-    // compilation of the initializer list construction in runner.cpp
-    // fails in GCC 4.8.5.
     Integrator() = delete;
-#endif
 };
 
 }      // namespace gmx
index 4fa463095eac9f56d25df4b97b4f5a35a561e651..7a11fdbbb6054fb59e4e92cf504a30d8109e8e49 100644 (file)
@@ -742,12 +742,7 @@ class EnergyEvaluator
 {
     public:
         //! We only intend to construct such objects with an initializer list.
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)
-        // Aspects of the C++11 spec changed after GCC 4.8.5, and
-        // compilation of the initializer list construction in
-        // runner.cpp fails in GCC 4.8.5.
         EnergyEvaluator() = delete;
-#endif
         /*! \brief Evaluates an energy on the state in \c ems.
          *
          * \todo In practice, the same objects mu_tot, vir, and pres
index 2ddaf67604499b6cb46cdcc768cd8e615e51eb08..656a4b7419135641864c6768343d272c29dab13e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2014,2015,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015,2017,2018,2019, 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.
@@ -49,7 +49,7 @@
 #    include <sys/types.h>
 // old Mac needs sys/types.h before regex.h
 #    include <regex.h>
-#elif HAVE_CXX11_REGEX
+#else
 #    include <regex>
 #endif
 
@@ -60,13 +60,9 @@ namespace gmx
 {
 
 // static
-bool Regex::isSupported()
+bool Regex::isSupported() //TODO: Remove
 {
-#if HAVE_POSIX_REGEX || HAVE_CXX11_REGEX
     return true;
-#else
-    return false;
-#endif
 }
 
 #if HAVE_POSIX_REGEX
@@ -111,7 +107,7 @@ class Regex::Impl
 
         regex_t                 regex_;
 };
-#elif HAVE_CXX11_REGEX
+#else
 class Regex::Impl
 {
     public:
@@ -152,28 +148,6 @@ class Regex::Impl
     private:
         std::regex              regex_;
 };
-#else
-class Regex::Impl
-{
-    public:
-        explicit Impl(const char * /*value*/)
-        {
-            GMX_THROW(NotImplementedError(
-                              "GROMACS is compiled without regular expression support"));
-        }
-        explicit Impl(const std::string & /*value*/)
-        {
-            GMX_THROW(NotImplementedError(
-                              "GROMACS is compiled without regular expression support"));
-        }
-
-        bool match(const char * /*value*/) const
-        {
-            // Should never be reached.
-            GMX_THROW(NotImplementedError(
-                              "GROMACS is compiled without regular expression support"));
-        }
-};
 #endif
 
 Regex::Regex()