Require clang 3.6
authorMark Abraham <mark.j.abraham@gmail.com>
Fri, 25 Jan 2019 10:04:57 +0000 (11:04 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Fri, 25 Jan 2019 17:52:58 +0000 (18:52 +0100)
This version is the lowest that supports a smooth c++14 debug experience.
The clang in XCode 6.3 is based off this branch, and that is also the
earliest that supported c++14.

Adjusted build matrices because clang 3.6.2 is still affected by AVX
codegen issues in release and debug mode. clang 3.7 is fine. Thus
moved some minor coverage to the post-submit matrix.

Updated install guide text also for some unrelated compiler-support
things.

Also removed an overlooked gcc version check

Refs #2831

Change-Id: Id780ff06147e54c7a4516cc33c9897a4a4d2d3fa

admin/builds/post-submit-matrix.txt
admin/builds/pre-submit-matrix.txt
cmake/gmxBuildTypeMSAN.cmake
cmake/gmxSimdFlags.cmake
cmake/gmxTestCompilerProblems.cmake
docs/install-guide/index.rst

index 738d022f89f3f9e19303ae52eabbb3e157bee92b..4be49ceff67249dae95d4a71b33fa391977e0d44 100644 (file)
@@ -46,7 +46,9 @@ clang-4 simd=sse4.1 openmp nranks=1 gpuhw=nvidia cuda-8.0 clang_cuda
 
 # Test MPMD PME with library MPI
 # Test clang + OpenMP
-clang-5 openmp simd=avx_128_fma npme=1 nranks=2 mpi
+# Test clang in double precision
+# Test AVX_128_FMA SIMD + Double (Important for Simd4N=Simd4 and sizeof(SimdInt32)!=4*GMX_SIMD_REAL_WIDTH)
+clang-5 double openmp simd=avx_128_fma npme=1 nranks=2 mpi
 
 # Test SSE2 SIMD
 # Test CMAKE_BUILD_TYPE=Release
index 72a78e473a07976d33dfd2ef4385c44addc79470..b4720073e0690b9d3297fe0e409a5660a1052379 100644 (file)
@@ -41,13 +41,11 @@ clang-7 no-hwloc tsan libcxx-7 openmp cmake-3.12.1 simd=avx2_256
 # Test fftpack fallback
 gcc-8 double x11 no-tng fftpack simd=sse4.1
 
-# Test older clang
-# Test clang in double precision
+# Test oldest supported clang (while avoiding AVX codegen issues in it)
 # Test without OpenMP
 # Test thread-MPI
-# Test AVX_128_FMA SIMD + Double (Important for Simd4N=Simd4 and sizeof(SimdInt32)!=4*GMX_SIMD_REAL_WIDTH)
 # Test with TNG support
-clang-3.4 double simd=avx_128_fma thread-mpi no-openmp fftpack cmake-3.11.4 tng
+clang-3.6 simd=sse2 thread-mpi no-openmp fftpack cmake-3.11.4 tng
 
 # Test newest clang at time of release
 # Test with AddressSanitizer (without OpenMP, see below)
index 8d0a9cbc4e417663293f9737df5f602bc0737f51..f85d0a04d444e09650e6dcf0b4ca1a650366f6c9 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2015,2016,2018, by the GROMACS development team, led by
+# Copyright (c) 2015,2016,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.
@@ -71,10 +71,7 @@ function(gmxManageMsanBuild)
 
     foreach(_language C CXX)
         string(REPLACE "X" "+" _human_readable_language ${_language})
-        if (CMAKE_${_language}_COMPILER_ID MATCHES "Clang" AND
-            NOT CMAKE_${_language}_COMPILER_VERSION VERSION_LESS 3.4)
-            # Can't do Memory Sanitizer build with this compiler, so don't
-            # set up flags for it
+        if (CMAKE_${_language}_COMPILER_ID MATCHES "Clang")
            if(${_language} MATCHES CXX)
                 set(_language_flags "${_flags} -nostdinc++")
                if(GMX_MSAN_PATH)
@@ -86,7 +83,7 @@ function(gmxManageMsanBuild)
             set(CMAKE_${_language}_FLAGS_MSAN ${_language_flags} CACHE STRING "${_human_readable_language} flags for Memory Sanitizer" FORCE)
             mark_as_advanced(CMAKE_${_language}_FLAGS_MSAN)
        else()
-            message(FATAL_ERROR "The Memory Sanitizer build is only available with clang ${_human_readable_language} compiler >= 3.4, but it was ${CMAKE_${_language}_COMPILER_ID} and ${CMAKE_${_language}_COMPILER_VERSION}.")
+            message(FATAL_ERROR "The Memory Sanitizer build is only available with clang ${_human_readable_language} compiler, but it was ${CMAKE_${_language}_COMPILER_ID}.")
         endif()
     endforeach()
 
index 07c7d962aa323e8bc5798dfce0a92e70a7fa7fe3..bf17e6af819fd29be44935b6b1cbeb60b88e95e4 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2017,2018, by the GROMACS development team, led by
+# Copyright (c) 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.
@@ -75,11 +75,6 @@ macro(find_power_vsx_toolchain_flags TOOLCHAIN_C_FLAGS_VARIABLE TOOLCHAIN_CXX_FL
         else()
             # Don't add arch-specific flags for unknown architectures.
         endif()
-        # Altivec was originally single-only, and it took a while for compilers
-        # to support the double-precision features in VSX.
-        if(GMX_DOUBLE AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9")
-            message(FATAL_ERROR "Using VSX SIMD in double precision with GCC requires GCC-4.9 or later.")
-        endif()
     endif()
     if(${CMAKE_CXX_COMPILER_ID} MATCHES "XL" OR ${CMAKE_C_COMPILER_ID} MATCHES "XL")
         if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "13.1.5" OR CMAKE_C_COMPILER_VERSION VERSION_LESS "13.1.5")
@@ -133,30 +128,6 @@ endfunction()
 function(gmx_find_simd_avx_128_fma_flags C_FLAGS_RESULT CXX_FLAGS_RESULT C_FLAGS_VARIABLE CXX_FLAGS_VARIABLE)
     find_x86_toolchain_flags(TOOLCHAIN_C_FLAGS TOOLCHAIN_CXX_FLAGS)
 
-    # We don't have the full compiler version string yet (BUILD_C_COMPILER),
-    # so we can't distinguish vanilla from Apple clang versions, but catering for a few rare AMD
-    # hackintoshes is not worth the effort.
-    if (APPLE AND (CMAKE_C_COMPILER_ID STREQUAL "Clang" OR
-                CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
-        message(WARNING "Due to a known compiler bug, Clang up to version 3.2 (and Apple Clang up to version 4.1) produces incorrect code with AVX_128_FMA SIMD.")
-    endif()
-
-    # clang <=3.2 contains a bug that causes incorrect code to be generated for the
-    # vfmaddps instruction and therefore the bug is triggered with AVX_128_FMA.
-    # (see: http://llvm.org/bugs/show_bug.cgi?id=15040).
-    # We can work around this by not using the integrated assembler (except on OS X
-    # which has an outdated assembler that does not support AVX instructions).
-    if (CMAKE_C_COMPILER_ID MATCHES "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_LESS "3.3")
-        # we assume that we have an external assembler that supports AVX
-        message(STATUS "Clang ${CMAKE_C_COMPILER_VERSION} detected, enabling FMA bug workaround")
-        set(TOOLCHAIN_C_FLAGS "${TOOLCHAIN_C_FLAGS} -no-integrated-as")
-    endif()
-    if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.3")
-        # we assume that we have an external assembler that supports AVX
-        message(STATUS "Clang ${CMAKE_CXX_COMPILER_VERSION} detected, enabling FMA bug workaround")
-        set(TOOLCHAIN_CXX_FLAGS "${TOOLCHAIN_CXX_FLAGS} -no-integrated-as")
-    endif()
-
     # AVX128/FMA on AMD is a bit complicated. We need to do detection in three stages:
     # 1) Find the flags required for generic AVX support
     # 2) Find the flags necessary to enable fused-multiply add support
index 81d87c159791f78ba26a7ac983570034072f570a..c1355ac1ab329201adc0ca0aadaaa4c4f4437369 100644 (file)
@@ -61,11 +61,7 @@ TestStruct::TestStruct() : b(0) {}
             message(FATAL_ERROR "No known version of xlC can compile the normal C++11 code in GROMACS, highest version checked is 16.1.0")
         endif()
     endif()
-    if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-        if(WIN32 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5.0")
-            message(WARNING "Using Clang on Windows requires Clang 3.5.0")
-        endif()
-    elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI")
+    if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI")
         message(WARNING "Currently tested PGI compiler versions (up to 15.7) generate binaries that do not pass all regression test, and the generated binaries are significantly slower than with GCC, ICC or Clang. For now we do not recommend PGI beyond development testing - make sure to run the regressiontests.")
     endif()
 
index 933bdc8485ef534be71a92ec4de7aca495de1020..e30e4d5e187e28f09489f2021cb8d0e598906966 100644 (file)
@@ -116,7 +116,7 @@ compiler versions are
 
 * GNU (gcc) 5.1
 * Intel (icc) 17.0.1
-* LLVM (clang) 3.3
+* LLVM (clang) 3.6
 * Microsoft (MSVC) 2017 (C++14 is used)
 
 Other compilers may work (Cray, Pathscale, older clang) but do
@@ -1259,10 +1259,11 @@ 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 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
+through 8.1, version 19 of the Intel compiler, and Clang
+versions 3.6 through 7. For this, we use a variety of GNU/Linux
 flavors and versions as well as recent versions of Windows. Under
 Windows, we test both MSVC 2017 and version 16 of the Intel compiler.
+Other compiler, library, and OS versions are tested less frequently.
 For details, you can
 have a look at the `continuous integration server used by GROMACS`_,
 which runs Jenkins_.