#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2015,2016, by the GROMACS development team, led by
+# Copyright (c) 2015,2016,2017, 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.
import os.path
+# These are accessible later in the script, just like other
+# declared options, via e.g. context.opts.release.
extra_options = {
'mdrun-only': Option.simple,
'static': Option.simple,
'thread-mpi': Option.bool,
'gpu': Option.bool,
'opencl': Option.bool,
- 'openmp': Option.bool
+ 'openmp': Option.bool,
+ 'nranks': Option.string,
+ 'npme': Option.string,
+ 'gpu_id': Option.string
}
+
extra_projects = [Project.REGRESSIONTESTS]
def do_build(context):
# not explicitly set
cmd += ' -ntomp 2'
- if context.opts.gpu:
- if context.opts.mpi or use_tmpi:
- gpu_id = '01' # for (T)MPI use the two GT 640-s
- else:
- gpu_id = '0' # use GPU #0 by default
- cmd += ' -gpu_id ' + gpu_id
+ if context.opts.gpu_id:
+ cmd += ' -gpu_id ' + context.opts.gpu_id
+
+ if context.opts.nranks:
+ nranks = context.opts.nranks
+ else:
+ nranks = '2'
+
+ if context.opts.npme:
+ cmd += ' -npme ' + context.opts.npme
- # TODO: Add options to influence this (should be now local to the build
- # script).
if context.opts.mpi:
- cmd += ' -np 2'
+ cmd += ' -np ' + nranks
elif use_tmpi:
- cmd += ' -nt 2'
+ cmd += ' -nt ' + nranks
if context.opts.double:
cmd += ' -double'
if context.opts.asan:
-gcc-4.4 double no-openmp host=bs_centos63
-clang-3.4 gmxtest+"-npme 1 -nt 3" double no-openmp fftpack release host=bs_centos63
-clang-3.4 double no-openmp fftpack asan host=bs_centos63
-gcc-4.1 double no-openmp simd-sse2 host=bs_nix1004
-gcc-4.3 mpi simd-sse2 host=bs_nix1004
-gcc-4.5 no-openmp atlas mpi host=bs_nix64
-icc-12.1.2 no-openmp no-threadmpi host=bs_nix64
-gcc-4.7 no-openmp host=bs_nix64
-icc-12.1.2 double mkl release host=bs_nix64
-gcc-4.7 double no-threadmpi simd-sse4.1 release host=bs_nix64
-icc-15.0.0 gmxtest+"-ntomp 1" no-threadmpi host=bs_mac
-gcc-4.8 no-openmp no-threadmpi fftpack optimized host=bs_mac
-gcc-4.9 optimized host=bs_mac
-icc-14.0.3 Platform=Phi host=bs_mic
-icc-14.0.3 Platform=Phi optimized host=bs_mic
-clang-3.4 asan host=bs_mic
-msvc-2010 release host=bs_Win2008_64
-msvc-2010 double no-threadmpi fftpack cmake+GMX_PREFER_STATIC_LIBS=OFF release host=bs_Win2008_64
-icc-12.1.2 cmake+GMX_DLOPEN=OFF no-threadmpi fftpack release host=bs_Win2008_64
-clang-3.6 double no-openmp fftpack host=bs_nix1204
-gcc-4.7 gmxtest+"-nt 1" gpu cuda-4.2 double simd-sse4.1 host=bs_nix1204
-gcc-4.4 gpu cuda-4.0 mpi simd-avx_256 host=bs_nix1204
-gcc-4.5 gpu cuda-4.1 atlas mpi simd-sse4.1 host=bs_nix1204
-gcc-4.6 gpu cuda-5.0 no-threadmpi release host=bs_nix1204
-gcc-4.7 gpu cuda-5.5 atlas simd-sse2 release host=bs_nix1204
-gcc-4.4 double mpi simd-avx_256 host=bs_nix1310
-gcc-4.6 double no-threadmpi simd-avx_256 release host=bs_nix1310
-gcc-4.7 gmxtest+"-npme 1 -np 3" no-threadmpi mpi simd-avx2_256 release host=bs_nix1310
-gcc-4.7 gmxtest+"-npme 1 -nt 3 -gpu_id 12" gpu cuda-5.5 simd-sse4.1 release host=bs_nix1310
-clang-3.4 gmxtest+"-npme 1 -nt 3" double no-openmp simd-avx_256 release host=bs_nix1310
-gcc-4.9 tsan host=bs_nix1310
-gcc-4.9 double no-threadmpi optimized host=bs_nix1404
-gcc-4.7 double gmxtest+"-nt 1" host=bs_nix1404
-gcc-5.1 gmxtest+"-npme 1 -np 3" double no-threadmpi mpi host=bs_nix1404
-gcc-5.1 mpi release host=bs_nix1404
+# Comment line(s) preceding each configuration document the main
+# intent behind that configuration, so that we can correctly judge
+# whether to preserve that during maintenance decisions.
+
+# Test the mdrun-only build
+# TODO In combination with gmx from another build, arrange to run regressiontests
+clang-3.7 double mpi no-openmp fftpack mdrun-only
+
+# Test MPMD PME with thread-MPI
+# TODO Add double to this configuration if/when Carsten stablizes essentialdynamics tests
+gcc-5.2 npme=1 nranks=2 no-openmp fftpack simd=avx_128_fma release
+
+# Test non-default GMX_PREFER_STATIC_LIBS behavior
+# TODO enable this
+# msvc-2015 double no-threadmpi no-prefer-static-libs release
+
+# Test behaviour when dlopen is not present
+# TODO enable this
+# icc-16.0 no-dlopen no-threadmpi double mkl release
+
+# Test SSE4.1 SIMD
+# Test single-rank GPU
+gcc-4.8 nranks=1 gpu cuda-7.5 simd=sse4.1
+
+# Test MPMD PME with library MPI
+clang-3.4 npme=1 nranks=2 mpi
+
+# Test non-default use of mdrun -gpu_id
+# Test SSE2 SIMD
+gcc-4.8 gpu npme=1 nranks=2 gpu_id=2 cuda-7.5 simd=sse2 release
+
+# TODO
+# Re-enable Phi build
+# Test without TNG support
+# Test without hwloc support
+# Test with NVML support
+# Test statically linked hwloc support (if/when it can work well)
+# Test 3D DD (2D is partially covered in regressiontests)
+# Test own-fftw build (from local copy of the file)
+# Test mdrun -tunepme (e.g. with relaxed tolerances, for now)
+# Consider testing of other CMake option paths
+# Consider adding our ARM dev boards as slaves to improve cross-platform portability testing.
-gcc-4.8 gpu cuda-6.5 mpi openmp x11
-gcc-4.8 gpu cuda-8.0 openmp release
+# Comment line(s) preceding each configuration document the main
+# intent behind that configuration, so that we can correctly judge
+# whether to preserve that during maintenance decisions.
+#
+# The phrase "at time of release" refers to either the initial
+# GROMACS release from that branch, or the next expected release
+# from that branch. (We will tend not to retroactively support
+# newer infrastructure in CI, unless it's either easy or of
+# high impact.)
+
+# Test older gcc
+# Test oldest supported CUDA
+# Test oldest supported Ubuntu
+# Test X11 build
+# Test MPI with CUDA
+# Test MPMD PME with library MPI
+gcc-4.8 gpu cuda-6.5 mpi npme=1 nranks=2 openmp x11
+
+# Test newest gcc supported by newest CUDA at time of release
+# Test thread-MPI with CUDA
+gcc-5.4 gpu cuda-8.0 openmp release
+
+# Test with ThreadSanitizer (without OpenMP, because of Redmine #1850)
+# Test AVX2_256 SIMD
+# Test fftpack fallback
gcc-4.9 tsan fftpack simd=avx2_256
+
+# Test newest gcc at time of release
+# Test on MacOS
gcc-6.1 double
+
+# Test older clang
+# Test double precision
+# Test without OpenMP
clang-3.4 double no-openmp fftpack
-clang-3.8 no-openmp asan cmake-3.4.3
-# TODO move mdrun-only config to post-submit matrix
-clang-3.7 double mpi no-openmp fftpack mdrun-only cmake-3.4.3
+
+# Test newer clang
+# Test with AddressSanitizer
+clang-3.8 no-openmp asan
+
+# Test oldest supported MSVC on Windows
+# Test newest supported MSVC on Windows
msvc-2015 openmp release
+
+# Test oldest supported icc on Windows
+# Test newest supported icc on Windows
icc-16.0 msvc-2015 fftpack
-icc-16.0 no-thread-mpi openmp mkl simd=avx_256
-gcc-5.1 mpi openmp cmake-3.4.3
-gcc-4.8 openmp opencl cuda-8.0 mpi release
-gcc-5.2 openmp opencl simd=avx_128_fma amdappsdk-3.0
+
+# Test newest cmake at time of release
+# Test MKL
+# Test without any MPI
+# Test on CentOS
+icc-16.0 no-thread-mpi openmp mkl cmake-3.6.1 simd=avx_256
+
+# Test oldest supported cmake
+# Test AVX_128_FMA SIMD
+gcc-5.2 mpi openmp simd=avx_128_fma cmake-3.4.3
+
+# Test NVIDIA OpenCL
+# Test MPI + OpenCL
+gcc-4.8 openmp opencl cuda-7.5 mpi release
+
+# Test AMD OpenCL
+gcc-5.2 openmp opencl amdappsdk-3.0
+
+# TODO
+# Add testing for support for cmake 3.8 for release-2017, e.g. to bs_mic and a CUDA slave (for the new CUDA support)
+# Add testing for support for clang 4.0 for release-2017, and move e.g. ASAN build to it, e.g. to bs_nix-amd
+# Add testing for support for gcc 7 for release-2017, e.g. to bs_mac
+# Add OpenMP support to a clang build
+# Add OpenMP support to ASAN build
+# Test hwloc support
+# Test newest supported LTS Ubuntu
+# Migrate ThreadSanitizer test off GPU build slave
+# Explore adding openmp to ThreadSanitizer configuration, perhaps can avoid Redmine #1850 if done differently
+# Update gcc and clang specifiers per https://redmine.gromacs.org/issues/2161
+# Update gpu testing specifiers per https://redmine.gromacs.org/issues/2161
int main(){__m512 y,x=_mm512_set1_ps(0.5);y=_mm512_fmadd_ps(x,x,x);return (int)_mm512_cmp_ps_mask(x,y,_CMP_LT_OS);}"
TOOLCHAIN_C_FLAGS TOOLCHAIN_CXX_FLAGS
SIMD_${GMX_SIMD}_C_FLAGS SIMD_${GMX_SIMD}_CXX_FLAGS
- "-xMIC-AVX512" "-mavx512f -mfma" "-mavx512f" "/arch:AVX" "-hgnu") # no AVX_512F flags known for MSVC yet
+ "-xCORE-AVX512" "-mavx512f -mfma" "-mavx512f" "/arch:AVX" "-hgnu") # no AVX_512F flags known for MSVC yet
if(NOT SIMD_${GMX_SIMD}_C_FLAGS OR NOT SIMD_${GMX_SIMD}_CXX_FLAGS)
gmx_give_fatal_error_when_simd_support_not_found("AVX 512F" "choose a lower level of SIMD (slower)" "${SUGGEST_BINUTILS_UPDATE}")
# Support for --enable-avx2 was only added in 3.3.5, but
# configuring with it is at worst a warning, even on an earlier
# version.
-if((CMAKE_COMPILER_IS_GNUCC AND (C_COMPILER_VERSION VERSION_GREATER 4.9 OR CXX_COMPILER_VERSION VERSION_GREATER 4.9)) OR
- (CMAKE_C_COMPILER_ID MATCHES "Clang" AND (C_COMPILER_VERSION VERSION_GREATER 3.9 OR CXX_COMPILER_VERSION VERSION_GREATER 3.9)))
- set(_fftw_simd_support_level --enable-sse2;--enable-avx;--enable-avx2;--enable-avx512)
-elseif()
+ # MSVC, GCC < 4.9, Clang < 3.9, and ICC < 15.0.1 do not support AVX-512, so
+ # we should not enable it.
+if(MSVC OR (CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9.0) OR
+ (CMAKE_C_COMPILER_ID MATCHES "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 3.9.0) OR
+ (CMAKE_C_COMPILER_ID MATCHES "Intel" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.1))
set(_fftw_simd_support_level --enable-sse2;--enable-avx;--enable-avx2)
+else()
+ set(_fftw_simd_support_level --enable-sse2;--enable-avx;--enable-avx2;--enable-avx512)
endif()
elseif(${GMX_SIMD} MATCHES "^(VSX)")
set(_fftw_simd_support_level --enable-vsx)
/*
* 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,2017, 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.
int nnbl;
nbnxn_pairlist_t **nbl;
int coulkt, vdwkt = 0;
- int nb, nthreads;
+ int nb, nthreads gmx_unused;
nnbl = nbl_list->nnbl;
nbl = nbl_list->nbl;
/*
* 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,2017, 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.
gatherLoadUBySimdIntTranspose<1>(tab_coul_V, ti_S0, &ctabv_S0, &dum_S0);
gatherLoadUBySimdIntTranspose<1>(tab_coul_F, ti_S2, &ctab0_S2, &ctab1_S2);
gatherLoadUBySimdIntTranspose<1>(tab_coul_V, ti_S2, &ctabv_S2, &dum_S2);
+ ctab1_S0 = ctab1_S0 - ctab0_S0;
+ ctab1_S2 = ctab1_S2 - ctab0_S2;
#endif
#endif
fsub_S0 = fma(frac_S0, ctab1_S0, ctab0_S0);
/*
* 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,2017, 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.
int nnbl;
nbnxn_pairlist_t **nbl;
int coulkt, vdwkt = 0;
- int nb, nthreads;
+ int nb, nthreads gmx_unused;
nnbl = nbl_list->nnbl;
nbl = nbl_list->nbl;
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2017, 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.
};
}
-static inline float gmx_simdcall
+static inline double gmx_simdcall
dotProduct(Simd4Double a, Simd4Double b)
{
__m128d tmp1, tmp2;
};
}
-static inline float gmx_simdcall
+static inline double gmx_simdcall
reduce(Simd4Double a)
{
__m128d a0, a1;