Merge branch release-2016
authorRoland Schulz <roland.schulz@intel.com>
Tue, 27 Jun 2017 22:46:13 +0000 (15:46 -0700)
committerRoland Schulz <roland.schulz@intel.com>
Tue, 27 Jun 2017 22:46:26 +0000 (15:46 -0700)
Conflicts:
admin/builds/pre-submit-matrix.txt

Checked that intent of test configs is implemented appropriately in
new context. The cuda-8 config newly introduced in release-2016
is already covered in this branch, so we don't need to have that
new configuration here.

src/gromacs/gpu_utils/gpu_utils.cu
src/gromacs/simd/impl_ibm_qpx/impl_ibm_qpx_simd4_double.h
src/gromacs/domdec/domdec.cpp

Trivial

Change-Id: I9b06bb476f5b62c9652c0e5186340ed11b0c31cc

32 files changed:
admin/builds/pre-submit-matrix.txt
cmake/FindNVML.cmake
cmake/gmxManageNvccConfig.cmake
docs/CMakeLists.txt
docs/dev-manual/build-system.rst
docs/dev-manual/formatting.rst
docs/dev-manual/language-features.rst
docs/dev-manual/tools.rst
docs/index.rst
docs/install-guide/index.rst
docs/user-guide/file-formats.rst
docs/user-guide/floating-point.rst [new file with mode: 0644]
docs/user-guide/flow.rst
docs/user-guide/getting-started.rst
docs/user-guide/index.rst
docs/user-guide/managing-simulations.rst
docs/user-guide/mdrun-features.rst
docs/user-guide/mdrun-performance.rst
src/gromacs/domdec/domdec.cpp
src/gromacs/gmxana/gmx_make_edi.cpp
src/gromacs/gmxpreprocess/readir.cpp
src/gromacs/gpu_utils/gpu_utils.cu
src/gromacs/math/tests/functions.cpp
src/gromacs/math/tests/refdata/FunctionTest_InvsixthrootDouble.xml
src/gromacs/math/tests/refdata/FunctionTest_InvsixthrootFloat.xml
src/gromacs/math/tests/refdata/FunctionTest_InvsixthrootInteger.xml
src/gromacs/pulling/pull.cpp
src/gromacs/simd/impl_ibm_qpx/impl_ibm_qpx_simd4_double.h
src/gromacs/simd/impl_x86_avx_128_fma/impl_x86_avx_128_fma_simd4_double.h
src/gromacs/simd/impl_x86_avx_512/impl_x86_avx_512_simd4_double.h
src/gromacs/simd/impl_x86_mic/impl_x86_mic_simd4_double.h
src/programs/mdrun/md.cpp

index b99a7dc66fe4da7e108a42b207fef79cde070dbe..1dd25a6eebfa46510314a05c96a9a6e3a0f04347 100644 (file)
@@ -18,7 +18,8 @@ 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 gpu cuda-8.0 openmp release
+# Test SIMD (AVX2_256) GPU code-path
+gcc-5 gpu cuda-8.0 openmp release simd=avx2_256
 
 # Test with ThreadSanitizer (without OpenMP, because of Redmine #1850)
 # Test AVX2_256 SIMD
index 04f44be96f76a66166220fc4de86d5e719608fd8..c0610ffd48b34d9e6e0c00b41cd643441b0558f4 100644 (file)
@@ -1,7 +1,7 @@
 #
 # 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.
 # --------
 #
 # Find the NVIDIA Management Library (NVML) includes and library. NVML documentation
-# is available at: http://docs.nvidia.com/deploy/nvml-api/index.html 
+# is available at: http://docs.nvidia.com/deploy/nvml-api/index.html
 #
-# NVML is part of the GPU Deployment Kit (GDK) and GPU_DEPLOYMENT_KIT_ROOT_DIR can
-# be specified if the GPU Deployment Kit is not installed in a default location.
+# Starting with CUDA 8 NVML is part of the CUDA Toolkit. Prior to CUDA 8 NVML was part
+# of the GPU Deployment Kit (GDK) and GPU_DEPLOYMENT_KIT_ROOT_DIR can be specified
+# if the GPU Deployment Kit is not installed in a default location.
 #
-# FindNVML defines the following variables: 
+# FindNVML defines the following variables:
 #
 #   NVML_INCLUDE_DIR, where to find nvml.h, etc.
 #   NVML_LIBRARY, the libraries needed to use NVML.
@@ -51,7 +52,7 @@
 
 #   Jiri Kraus, NVIDIA Corp (nvidia.com - jkraus)
 #
-#   Copyright (c) 2008 - 2014 NVIDIA Corporation.  All rights reserved.
+#   Copyright (c) 2008 - 2014,2017 NVIDIA Corporation.  All rights reserved.
 #
 #   This code is licensed under the MIT License.  See the FindNVML.cmake script
 #   for the text of the license.
 ###############################################################################
 
 if( CMAKE_SYSTEM_NAME STREQUAL "Windows"  )
-  set( NVML_LIB_PATHS "C:/Program Files/NVIDIA Corporation/GDK/nvml/lib" )
-  if(GPU_DEPLOYMENT_KIT_ROOT_DIR)
-    list(APPEND NVML_LIB_PATHS "${GPU_DEPLOYMENT_KIT_ROOT_DIR}/nvml/lib")
-  endif()
   set(NVML_NAMES nvml)
-  
-  set( NVML_INC_PATHS "C:/Program Files/NVIDIA Corporation/GDK/nvml/include" )
-  if(GPU_DEPLOYMENT_KIT_ROOT_DIR)
-    list(APPEND NVML_INC_PATHS "${GPU_DEPLOYMENT_KIT_ROOT_DIR}/nvml/include")
+  if(${CUDA_VERSION_STRING} VERSION_LESS "8.0")
+      set( NVML_LIB_PATHS "C:/Program Files/NVIDIA Corporation/GDK/nvml/lib" )
+      if(GPU_DEPLOYMENT_KIT_ROOT_DIR)
+        list(APPEND NVML_LIB_PATHS "${GPU_DEPLOYMENT_KIT_ROOT_DIR}/nvml/lib")
+      endif()
+
+      set( NVML_INC_PATHS "C:/Program Files/NVIDIA Corporation/GDK/nvml/include" )
+      if(GPU_DEPLOYMENT_KIT_ROOT_DIR)
+        list(APPEND NVML_INC_PATHS "${GPU_DEPLOYMENT_KIT_ROOT_DIR}/nvml/include")
+      endif()
+  else()
+    set( NVML_LIB_PATHS "${CUDA_TOOLKIT_ROOT_DIR}/lib/x64" )
+    set( NVML_INC_PATHS ${CUDA_INCLUDE_DIRS} )
   endif()
 else()
-  # The Linux installer for the GPU Deployment Kit adds a "usr"
-  # suffix to a custom path if one is used, so a user could
-  # reasonably set GPU_DEPLOYMENT_KIT_ROOT_DIR to the value they
-  # passed to the installer, or the root where they later found the
-  # kit to be installed. Below, we cater for both possibilities.
+  set(NVML_NAMES nvidia-ml)
+
   set( NVML_LIB_PATHS /usr/lib64 )
-  if(GPU_DEPLOYMENT_KIT_ROOT_DIR)
-      list(APPEND NVML_LIB_PATHS
-          "${GPU_DEPLOYMENT_KIT_ROOT_DIR}/src/gdk/nvml/lib"
-          "${GPU_DEPLOYMENT_KIT_ROOT_DIR}/usr/src/gdk/nvml/lib"
-          )
+  if(${CUDA_VERSION_STRING} VERSION_LESS "8.0")
+      # The Linux installer for the GPU Deployment Kit adds a "usr"
+      # suffix to a custom path if one is used, so a user could
+      # reasonably set GPU_DEPLOYMENT_KIT_ROOT_DIR to the value they
+      # passed to the installer, or the root where they later found the
+      # kit to be installed. Below, we cater for both possibilities.
+      if(GPU_DEPLOYMENT_KIT_ROOT_DIR)
+          list(APPEND NVML_LIB_PATHS
+              "${GPU_DEPLOYMENT_KIT_ROOT_DIR}/src/gdk/nvml/lib"
+              "${GPU_DEPLOYMENT_KIT_ROOT_DIR}/usr/src/gdk/nvml/lib"
+              )
+      endif()
+  else()
+     list(APPEND NVML_LIB_PATHS "${CUDA_TOOLKIT_ROOT_DIR}/lib64/stubs")
   endif()
-  set(NVML_NAMES nvidia-ml)
-  
-  set( NVML_INC_PATHS /usr/include/nvidia/gdk/ /usr/include )
-  if(GPU_DEPLOYMENT_KIT_ROOT_DIR)
-      list(APPEND NVML_INC_PATHS
-          "${GPU_DEPLOYMENT_KIT_ROOT_DIR}/include/nvidia/gdk"
-          "${GPU_DEPLOYMENT_KIT_ROOT_DIR}/usr/include/nvidia/gdk"
-          )
+
+  if(${CUDA_VERSION_STRING} VERSION_LESS "8.0")
+      set( NVML_INC_PATHS /usr/include/nvidia/gdk/ /usr/include )
+      if(GPU_DEPLOYMENT_KIT_ROOT_DIR)
+          list(APPEND NVML_INC_PATHS
+              "${GPU_DEPLOYMENT_KIT_ROOT_DIR}/include/nvidia/gdk"
+              "${GPU_DEPLOYMENT_KIT_ROOT_DIR}/usr/include/nvidia/gdk"
+              )
+      endif()
+  else()
+    set( NVML_INC_PATHS ${CUDA_INCLUDE_DIRS} )
   endif()
 endif()
 
index c8561f44febf6f6e004c7c838a56a0d0e54cf0b8..fc974647a67f66e9ba1794b33220877630314453 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,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.
@@ -171,6 +171,10 @@ gmx_dependent_cache_variable(GMX_CUDA_TARGET_COMPUTE "List of CUDA virtual archi
 # assemble the CUDA flags
 list(APPEND GMX_CUDA_NVCC_FLAGS "${GMX_CUDA_NVCC_GENCODE_FLAGS}")
 list(APPEND GMX_CUDA_NVCC_FLAGS "-use_fast_math")
+if (CUDA_VERSION VERSION_EQUAL "8.0")
+    # requesting sm_20 triggers deprecation messages with nvcc 8.0 which we better avoid
+    list(APPEND GMX_CUDA_NVCC_FLAGS "-Wno-deprecated-gpu-targets")
+endif()
 
 # assemble the CUDA host compiler flags
 list(APPEND GMX_CUDA_NVCC_FLAGS "${CUDA_HOST_COMPILER_OPTIONS}")
index 9fe64470444d1b40deb0ce5aeb84c8470606202b..2395f6a647f371e6ff85bbd06bc825e12e9e5b1d 100644 (file)
@@ -120,6 +120,7 @@ if (SPHINX_FOUND)
         user-guide/index.rst
         user-guide/getting-started.rst
         user-guide/flow.rst
+        user-guide/floating-point.rst
         user-guide/system-preparation.rst
         user-guide/cutoff-schemes.rst
         user-guide/managing-simulations.rst
index ae313c1bfbf1d1340de416bd147c46d3a12cceb2..b055116cf657e3fdbbff276d1017a31ef4057a9b 100644 (file)
@@ -217,7 +217,7 @@ Variables affecting compilation/linking
 
 .. cmake:: GMX_DOUBLE
 
-   Many part of GROMACS are implemented in terms of "real" precision,
+   Many part of |Gromacs| are implemented in terms of "real" precision,
    which is actually either a single- or double-precision type,
    according to the value of this flag. Some parts of the code
    deliberately use single- or double-precision types, and these are
index ca2483113b510ea8791dcf75b9ab85626912b4e9..742b3ff2d8e32c4a4824abd5be98e83d428a66d3 100644 (file)
@@ -25,7 +25,7 @@ Additionally:
 
 * All source files and other non-trivial scripts should contain a copyright
   header with a predetermined format and license information (check existing
-  files).  Copyright holder should be "the GROMACS development team" for the
+  files).  Copyright holder should be "the |Gromacs| development team" for the
   years where the code has been in the |Gromacs| source repository, but earlier
   years can hold other copyrights.
 * Whenever you update a file, you should check that the current year is listed
index 3fc98799c775d3692e71b8ba5caa48251923c877..b8f73d59f5597da9d9c8af2fb34778c8aa85f850 100644 (file)
@@ -1,7 +1,7 @@
 Allowed language features
 =========================
 
-GROMACS uses C99 for C files and C++11 for C++ files. 
+|Gromacs| uses C99 for C files and C++11 for C++ files. 
 C++ has a lot of features, but to keep the source code maintainable and easy to read, 
 we will avoid using some of them in Gromacs code. The basic principle is to keep things 
 as simple as possible.
index 56fafcf3d677db59751705812cdde806d63bb2d8..2c05fb59d953f5f49e2ef82a23084f766221a8d4 100644 (file)
@@ -191,10 +191,10 @@ The following make targets are the most useful:
 ``install-guide``
   Makes the INSTALL file for the tarball with Sphinx
 ``webpage-sphinx``
-  Makes all the components of the GROMACS webpage that require Sphinx,
+  Makes all the components of the |Gromacs| webpage that require Sphinx,
   including install guide and user guide.
 ``webpage``
-  Makes the complete GROMACS webpage, requires everything. When complete,
+  Makes the complete |Gromacs| webpage, requires everything. When complete,
   you can browse ``docs/html/index.html`` to find everything.
 
   If built from a release tarball, the ``SOURCE_MD5SUM``,
index db6a2546ff7de6203287beacda4ed94190dc250d..62e2d4ce4a2cfab9f7f1faba996e474ac1476631 100644 (file)
@@ -21,7 +21,7 @@ Contents:
 
 * Answers to `Frequently Asked Questions <http://www.gromacs.org/Documentation/FAQs>`_
 
-* Coping with `errors while using GROMACS <http://www.gromacs.org/Documentation/Errors>`_
+* Coping with `errors while using |Gromacs| <http://www.gromacs.org/Documentation/Errors>`_
 
 * Links to `tutorial material <http://www.gromacs.org/Documentation/Tutorials>`_
 
index 09950835793bd507346058a0194a5fd7e608f8eb..429d9a7b028edb09bba0ee201068db0bc9f3b1cf 100644 (file)
@@ -295,9 +295,10 @@ or similar before running CMake including setting
 If you need to customize this further, use
 
 ::
-    -DGMX_FFT_LIBRARY=mkl
-    -DMKL_LIBRARIES="/full/path/to/libone.so;/full/path/to/libtwo.so"
-    -DMKL_INCLUDE_DIR="/full/path/to/mkl/include"
+
+    cmake -DGMX_FFT_LIBRARY=mkl \
+          -DMKL_LIBRARIES="/full/path/to/libone.so;/full/path/to/libtwo.so" \
+          -DMKL_INCLUDE_DIR="/full/path/to/mkl/include"
 
 The full list and order(!) of libraries you require are found in Intel's MKL documentation for your system.
 
@@ -415,8 +416,8 @@ You cannot attempt to change compilers after the initial run of
 
 .. _non-standard location:
 
-Where to install GROMACS
-^^^^^^^^^^^^^^^^^^^^^^^^
+Where to install |Gromacs|
+^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 |Gromacs| is installed in the directory to which
 ``CMAKE_INSTALL_PREFIX`` points. It may not be the source directory or
@@ -598,7 +599,7 @@ By default, optimized code will be generated for CUDA architectures
 supported by the nvcc compiler (and the |Gromacs| build system). 
 However, it can be beneficial to manually pick the specific CUDA architecture(s)
 to generate code for either to reduce compilation time (and binary size) or to
-target a new architecture not yet supported by the |GROMACS| build system.
+target a new architecture not yet supported by the |Gromacs| build system.
 Setting the desired CUDA architecture(s) and virtual architecture(s)
 can be done using the ``GMX_CUDA_TARGET_SM`` and ``GMX_CUDA_TARGET_COMPUTE``
 variables, respectively. These take a semicolon delimited string with 
@@ -835,7 +836,7 @@ directory, then you will need permission to write there, and you
 should use super-user privileges only for ``make install`` and
 not the whole procedure.
 
-.. _getting access to GROMACS:
+.. _getting access to |Gromacs|:
 
 Getting access to |Gromacs| after installation
 ----------------------------------------------
@@ -878,7 +879,7 @@ trust your build.
 The simplest way to run the checks is to build |Gromacs| with
 ``-DREGRESSIONTEST_DOWNLOAD``, and run ``make check``.
 |Gromacs| will automatically download and run the tests for you.
-Alternatively, you can download and unpack the GROMACS
+Alternatively, you can download and unpack the |Gromacs|
 regression test suite |gmx-regressiontests-package| tarball yourself
 and use the advanced ``cmake`` option ``REGRESSIONTEST_PATH`` to
 specify the path to the unpacked tarball, which will then be used for
index 35a42269ecb7849b1a4c31b3906fe7e3373585b1..8df8dd64e2ce86756b4af91b28084c74d43a1d7e 100644 (file)
@@ -19,7 +19,7 @@ Structure files
 ---------------
 
 :ref:`gro`
-    GROMACS format
+    |Gromacs| format
 :ref:`g96`
     GROMOS-96 format
 :ref:`pdb`
@@ -124,7 +124,7 @@ dat
 
 Files with the dat file extension contain generic input or output.
 As it is not possible
-to categorize all data file formats, GROMACS has a generic file format called
+to categorize all data file formats, |Gromacs| has a generic file format called
 dat of which no format is given.
 
 .. _dlg:
@@ -204,7 +204,7 @@ See also :ref:`gmx energy`.
 eps
 ---
 
-The eps file format is not a special GROMACS format, but just a
+The eps file format is not a special |Gromacs| format, but just a
 variant of the standard PostScript(tm). A sample eps file as
 generated by the :ref:`gmx xpm2ps` program is
 included below. It shows the secondary structure of a peptide as a function
@@ -221,7 +221,7 @@ g96
 A file with the g96 extension can be a GROMOS-96 initial/final
 configuration file or a coordinate trajectory file or a combination of both.
 The file is fixed format, all floats are written as 15.9 (files can get huge).
-GROMACS supports the following data blocks in the given order:
+|Gromacs| supports the following data blocks in the given order:
 
  * Header block:
 
@@ -236,7 +236,7 @@ GROMACS supports the following data blocks in the given order:
 
 See the GROMOS-96 manual for a complete description of the blocks.
 
-Note that all GROMACS programs can read compressed or g-zipped files.
+Note that all |Gromacs| programs can read compressed or g-zipped files.
 
 .. _gro:
 
@@ -290,7 +290,7 @@ right):
 
 Note that separate molecules or ions (e.g. water or Cl-) are regarded
 as residues.  If you want to write such a file in your own program
-without using the GROMACS libraries you can use the following formats:
+without using the |Gromacs| libraries you can use the following formats:
 
 C format
     ``"%5d%-5s%5s%5d%8.3f%8.3f%8.3f%8.4f%8.4f%8.4f"``
@@ -326,7 +326,7 @@ topology files (with the :ref:`top` extension).
 log
 ---
 
-Logfiles are generated by some GROMACS programs and are usually in
+Logfiles are generated by some |Gromacs| programs and are usually in
 human-readable format. Use ``more logfile``.
 
 .. _m2p:
@@ -478,7 +478,7 @@ which are produced with :ref:`gmx mdrun` and read by
 ndx
 ---
 
-The GROMACS index file (usually called index.ndx) contains some
+The |Gromacs| index file (usually called index.ndx) contains some
 user definable sets of atoms. The file can be read by
 most analysis programs, by the graphics program
 (:ref:`gmx view`)
@@ -514,7 +514,7 @@ out
 ---
 
 Files with the out file extension contain generic output. As it is not possible
-to categorize all data file formats, GROMACS has a generic file format called
+to categorize all data file formats, |Gromacs| has a generic file format called
 out of which no format is given.
 
 .. _pdb:
@@ -528,7 +528,7 @@ structure files in the protein databank file format.  The protein
 databank file format describes the positions of atoms in a molecular
 structure. Coordinates are read from the ATOM and HETATM records,
 until the file ends or an ENDMDL record is encountered.
-GROMACS programs can read and write a simulation box in the
+|Gromacs| programs can read and write a simulation box in the
 CRYST1 entry.
 The pdb format can also be used as a trajectory format:
 several structures, separated by ENDMDL, can be read from
@@ -553,7 +553,7 @@ rtp
 
 The rtp file extension stands for residue topology.
 Such a file is needed by :ref:`gmx pdb2gmx`
-to make a GROMACS topology for a protein contained in a :ref:`pdb`
+to make a |Gromacs| topology for a protein contained in a :ref:`pdb`
 file. The file contains the default interaction type for the 4 bonded
 interactions and residue entries, which consist of atoms and
 optionally bonds, angles dihedrals and impropers.
@@ -797,7 +797,7 @@ trr
 
 Files with the trr file extension contain the trajectory of a simulation.
 In this file all the coordinates, velocities, forces and energies are
-printed as you told GROMACS in your mdp file. This file is in portable binary
+printed as you told |Gromacs| in your mdp file. This file is in portable binary
 format and can be read with :ref:`gmx dump`::
 
     gmx dump -f traj.trr
@@ -818,14 +818,14 @@ frames etc.) using:
 xpm
 ---
 
-The GROMACS xpm file format is compatible with the XPixMap format
+The |Gromacs| xpm file format is compatible with the XPixMap format
 and is used for storing matrix data.
-Thus GROMACS xpm files can be viewed directly with programs like XV.
+Thus |Gromacs| xpm files can be viewed directly with programs like XV.
 Alternatively, they can be imported into GIMP and scaled to 300 DPI,
 using strong antialiasing for font and graphics.
 The first matrix data line in an xpm file corresponds to the last matrix
 row.
-In addition to the XPixMap format, GROMACS xpm files may contain
+In addition to the XPixMap format, |Gromacs| xpm files may contain
 extra fields. The information in these fields is used when converting
 an xpm file to EPS with :ref:`gmx xpm2ps`.
 The optional extra field are:
@@ -841,7 +841,7 @@ The optional extra field are:
  * Between the colormap and the matrix data, the fields ``x-axis`` and/or
    ``y-axis`` may be present followed by the tick-marks for that axis.
 
-The example GROMACS xpm file below contains all the extra fields.
+The example |Gromacs| xpm file below contains all the extra fields.
 The C-comment delimiters and the colon in the extra fields are optional.
 
 ::
@@ -985,12 +985,12 @@ on your linker command line.
 xvg
 ---
 
-Almost all output from GROMACS analysis tools is ready as input for
+Almost all output from |Gromacs| analysis tools is ready as input for
 Grace, formerly known as Xmgr. We use Grace, because it is very flexible, and it is also
 free software. It produces PostScript(tm) output, which is very suitable
 for inclusion in eg. LaTeX documents, but also for other word processors.
 
-A sample Grace session with GROMACS data is shown below:
+A sample Grace session with |Gromacs| data is shown below:
 
 .. image:: xvgr.gif
    :alt:  hallo
diff --git a/docs/user-guide/floating-point.rst b/docs/user-guide/floating-point.rst
new file mode 100644 (file)
index 0000000..387df4a
--- /dev/null
@@ -0,0 +1,36 @@
+Floating point arithmetic
+=========================
+
+|Gromacs| spends its life doing arithmetic on real numbers, often summing many
+millions of them. These real numbers are encoded on computers in so-called
+binary floating-point representation. This representation is somewhat like
+scientific exponential notation (but uses binary rather than decimal), and is
+necessary for the fastest possible speed for calculations. Unfortunately the
+laws of algebra only approximately apply to binary floating-point. In part,
+this is because some real numbers that are represented simply and exactly in
+decimal (like 1/5=0.2) have no exact representation in binary floating-point,
+just as 1/3 cannot be represented in decimal. There are many sources you can
+find with a search engine that discuss this issue more exhaustively, such as
+`Wikipedia <https://en.wikipedia.org/wiki/Floating-point_arithmetic>`__ and
+David Goldberg's 1991 paper *What every computer scientist should know about
+floating-point arithmetic* (`article <https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html>`__,
+`addendum <https://docs.oracle.com/cd/E37069_01/html/E39019/z400228248508.html>`__).
+Bruce Dawson also has a written a number of very valuable blog posts on modern
+floating-point programming at his
+`Random ASCII site <https://randomascii.wordpress.com/category/floating-point/>`__
+that are worth reading.
+
+So, the sum of a large number of binary representations of exact decimal
+numbers need not equal the expected algebraic or decimal result. Users observe
+this phenomenon in sums of partial charges expressed to two decimal places that
+sometimes only approximate the integer total charge to which they contribute
+(however a deviation in the first decimal place would always be indicative of a
+badly-formed topology).  When |Gromacs| has to represent such floating-point
+numbers in output, it sometimes uses a computer form of scientific notation
+known as E notation. In such notation, a number like -9.999971e-01 is actually
+-0.9999971, which is close enough to -1 for purposes of assessing the total
+charge of a system.
+
+It is also not appropriate for |Gromacs| to guess to round things, because such
+rounding relies on assumptions about the inputs that need not be true. Instead
+the user needs to understand how their tools work.
index 9d81f3618fd24f737cb4597970ee71070dd65431..725f99885d40f60ecaa9b7af103a4aaa76a7d605 100644 (file)
@@ -1,7 +1,7 @@
 Flow Chart
 ==========
 
-This is a flow chart of a typical GROMACS MD run of a protein
+This is a flow chart of a typical |Gromacs| MD run of a protein
 in a box of water.
 A more detailed example is available in :doc:`getting-started`.
 Several steps of energy minimization may be necessary,
index f173b661f6b1df998515807f9a1d898c2d5ff2e5..918f158b13179be0f118a519967729940d1f503f 100644 (file)
@@ -37,7 +37,7 @@ then you have to find where your version of |Gromacs| is installed. In
 the default case, the binaries are located in
 ``/usr/local/gromacs/bin``, however, you can ask your local system
 administrator for more information, and then follow the advice for
-:ref:`getting access to GROMACS`.
+:ref:`getting access to |Gromacs|`.
 
 Flowchart of typical simulation
 -------------------------------
index 0f48df976f87bd72f7ece503d347d384c8116c2d..624286e512d42c7e48d942bc03b1ff64661b8efe 100644 (file)
@@ -20,6 +20,7 @@ For background on algorithms and implementations, see the
    :maxdepth: 2
 
    getting-started
+   floating-point
    system-preparation
    cutoff-schemes
    mdrun-features
index 136cd4b33e83e1a49a032a4a5a3032ff3e7b4fcf..c65ce51d2b77fabf8faf08f33f42d055cfeb46f9 100644 (file)
@@ -173,7 +173,7 @@ The following factors affect the reproducibility of a simulation, and thus its o
   the calculations. Since the speed estimate is not deterministic, the
   results may vary from run to run.
 * Random numbers used for instance as a seed for generating velocities
-  (in GROMACS at the preprocessing stage).
+  (in |Gromacs| at the preprocessing stage).
 * Uninitialized variables in the code (but there shouldn't be any)
 * Dynamic linking to different versions of shared libraries (e.g. for FFTs)
 * Dynamic load balancing, since particles are redistributed to
@@ -194,7 +194,7 @@ is a cornerstone of science in general, and hence it is important.
 The `Central Limit Theorem <https://en.wikipedia.org/wiki/Central_limit_theorem>`
 tells us that in the case of infinitely long
 simulations, all observables converge to their equilibrium
-values. Molecular simulations in GROMACS adhere to this theorem, and
+values. Molecular simulations in |Gromacs| adhere to this theorem, and
 hence, for instance, the energy of your system will converge to a
 finite value, the diffusion constant of your water molecules will
 converge to a finite value, and so on. That means all the important
index 18626798c7cd9fb7fa32a08337d9030abdb0d44e..a559a50e46f5bcb9927ed263eaea5b5106c93372 100644 (file)
@@ -48,7 +48,7 @@ Running a related series of lambda points for a free-energy
 computation is also convenient to do this way.
 
 This feature requires
-:ref:`configuring GROMACS with an external MPI library <mpi-support>`
+:ref:`configuring |Gromacs| with an external MPI library <mpi-support>`
 so that the set of
 simulations can communicate. The ``n`` simulations within the set can
 use internal MPI parallelism also, so that ``mpirun -np x mdrun_mpi``
@@ -119,7 +119,7 @@ coupling parameter (e.g. temperature), which ascends over the set of
 input files. The random seed for replica exchange is set with
 ``-reseed``. After every exchange, the velocities are scaled and
 neighbor searching is performed. See the Reference Manual for more
-details on how replica exchange functions in GROMACS.
+details on how replica exchange functions in |Gromacs|.
 
 Controlling the length of the simulation
 ----------------------------------------
@@ -140,7 +140,7 @@ lipid bilayer at a position and orientation specified by the user.
 
 This method was initially described as a ProtSqueeze technique 
 (Yesylevskyy S.O., J Chem Inf Model 47(5) (2007) 1986-94) and 
-later implemented in GROMACS as g_membed tool (Wolf et al, J Comp Chem 31 (2010) 2169-2174). 
+later implemented in |Gromacs| as g_membed tool (Wolf et al, J Comp Chem 31 (2010) 2169-2174). 
 Currently the functionality of g_membed is available in mdrun if 
 ``-membed`` option is specified (see below).
 
index 80f9e55a37cca134e51cab2a7b6b3816fbf8b3e7..1491d4140035057fc6df5af1ecc3ba2ad0f283c3 100644 (file)
@@ -1,6 +1,6 @@
 Getting good performance from mdrun
 ===================================
-The GROMACS build system and the :ref:`gmx mdrun` tool has a lot of built-in
+The |Gromacs| build system and the :ref:`gmx mdrun` tool has a lot of built-in
 and configurable intelligence to detect your hardware and make pretty
 effective use of that hardware. For a lot of casual and serious use of
 :ref:`gmx mdrun`, the automatic machinery works well enough. But to get the
@@ -51,7 +51,7 @@ definitions. Experienced HPC users can skip this section.
         up to 8 hardware threads per core.
         This feature can usually be enabled or disabled either in
         the hardware bios or through a setting in the Linux operating
-        system. GROMACS can typically make use of this, for a moderate
+        system. |Gromacs| can typically make use of this, for a moderate
         free performance boost. In most cases it will be
         enabled by default e.g. on new x86 processors, but in some cases
         the system administrators might have disabled it. If that is the
@@ -113,8 +113,8 @@ definitions. Experienced HPC users can skip this section.
         numbers of floating-point instructions in a single cycle.
 
 
-GROMACS background information
-------------------------------
+|Gromacs| background information
+--------------------------------
 The algorithms in :ref:`gmx mdrun` and their implementations are most relevant
 when choosing how to make good use of the hardware. For details,
 see the Reference Manual. The most important of these are
@@ -124,11 +124,11 @@ see the Reference Manual. The most important of these are
     Domain Decomposition
         The domain decomposition (DD) algorithm decomposes the
         (short-ranged) component of the non-bonded interactions into
-        domains that share spatial locality, which permits efficient
-        code to be written. Each domain handles all of the
+        domains that share spatial locality, which permits the use of
+        efficient algorithms. Each domain handles all of the
         particle-particle (PP) interactions for its members, and is
-        mapped to a single rank. Within a PP rank, OpenMP threads can
-        share the workload, or the work can be off-loaded to a
+        mapped to a single MPI rank. Within a PP rank, OpenMP threads
+        can share the workload, and some work can be off-loaded to a
         GPU. The PP rank also handles any bonded interactions for the
         members of its domain. A GPU may perform work for more than
         one PP rank, but it is normally most efficient to use a single
@@ -159,11 +159,11 @@ Running mdrun within a single node
 are efficient to use within a single :term:`node`. The default configuration
 using a suitable compiler will deploy a multi-level hybrid parallelism
 that uses CUDA, OpenMP and the threading platform native to the
-hardware. For programming convenience, in GROMACS, those native
+hardware. For programming convenience, in |Gromacs|, those native
 threads are used to implement on a single node the same MPI scheme as
 would be used between nodes, but much more efficient; this is called
 thread-MPI. From a user's perspective, real MPI and thread-MPI look
-almost the same, and GROMACS refers to MPI ranks to mean either kind,
+almost the same, and |Gromacs| refers to MPI ranks to mean either kind,
 except where noted. A real external MPI can be used for :ref:`gmx mdrun` within
 a single node, but runs more slowly than the thread-MPI version.
 
@@ -172,13 +172,13 @@ and do its best to make fairly efficient use of the whole node. The
 log file, stdout and stderr are used to print diagnostics that
 inform the user about the choices made and possible consequences.
 
-A number of command-line parameters are available to vary the default
+A number of command-line parameters are available to modify the default
 behavior.
 
 ``-nt``
     The total number of threads to use. The default, 0, will start as
     many threads as available cores. Whether the threads are
-    thread-MPI ranks, or OpenMP threads within such ranks depends on
+    thread-MPI ranks, and/or OpenMP threads within such ranks depends on
     other settings.
 
 ``-ntmpi``
@@ -196,7 +196,7 @@ behavior.
     The total number of ranks to dedicate to the long-ranged
     component of PME, if used. The default, -1, will dedicate ranks
     only if the total number of threads is at least 12, and will use
-    around one-third of the ranks for the long-ranged component.
+    around a quarter of the ranks for the long-ranged component.
 
 ``-ntomp_pme``
     When using PME with separate PME ranks,
@@ -245,12 +245,14 @@ behavior.
     are no separate PME ranks.
 
 ``-nb``
-    Can be set to "auto", "cpu", "gpu", "cpu_gpu."
+    Used to set where to execute the non-bonded interactions.
+    Can be set to "auto", "cpu", "gpu", "gpu_cpu."
     Defaults to "auto," which uses a compatible GPU if available.
     Setting "cpu" requires that no GPU is used. Setting "gpu" requires
     that a compatible GPU be available and will be used. Setting
-    "cpu_gpu" permits the CPU to execute a GPU-like code path, which
-    will run slowly on the CPU and should only be used for debugging.
+    "gpu_cpu" lets the GPU compute the local and the CPU the non-local
+    non-bonded interactions. Is only faster under a narrow range of
+    conditions.
 
 Examples for mdrun on one node
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -329,7 +331,7 @@ MPI setup is restricted to one node, then the resulting
 
 Running mdrun on more than one node
 -----------------------------------
-This requires configuring GROMACS to build with an external MPI
+This requires configuring |Gromacs| to build with an external MPI
 library. By default, this mdrun executable is run with
 :ref:`mdrun_mpi`. All of the considerations for running single-node
 mdrun still apply, except that ``-ntmpi`` and ``-nt`` cause a fatal
@@ -767,3 +769,73 @@ Limitations of interest to |Gromacs| developers:
   multiple of 32
 - Some Ewald tabulated kernels are known to produce incorrect results, so
   (correct) analytical kernels are used instead.
+
+Performance checklist
+---------------------
+
+There are many different aspects that affect the performance of simulations in
+|Gromacs|. Most simulations require a lot of computational resources, therefore
+it can be worthwhile to optimize the use of those resources. Several issues
+mentioned in the list below could lead to a performance difference of a factor
+of 2. So it can be useful go through the checklist.
+
+|Gromacs| configuration
+^^^^^^^^^^^^^^^^^^^^^^^
+
+* Don't use double precision unless you're absolute sure you need it.
+* Compile the FFTW library (yourself) with the correct flags on x86 (in most
+  cases, the correct flags are automatically configured).
+* On x86, use gcc or icc as the compiler (not pgi or the Cray compiler).
+* On POWER, use gcc instead of IBM's xlc.
+* Use a new compiler version, especially for gcc (e.g. from the version 5 to 6
+  the performance of the compiled code improved a lot).
+* MPI library: OpenMPI usually has good performance and causes little trouble.
+* Make sure your compiler supports OpenMP (some versions of Clang don't).
+* If you have GPUs that support either CUDA or OpenCL, use them.
+
+  * Configure with ``-DGMX_GPU=ON`` (add ``-DGMX_USE_OPENCL=ON`` for OpenCL).
+  * For CUDA, use the newest CUDA availabe for your GPU to take advantage of the
+    latest performance enhancements.
+  * Use a recent GPU driver.
+  * If compiling on a cluster head node, make sure that ``GMX_CPU_ACCELERATION``
+    is appropriate for the compute nodes.
+
+Run setup
+^^^^^^^^^
+
+* For an approximately spherical solute, use a rhombic dodecahedron unit cell.
+* When using a time-step of 2 fs, use :mdp:`cutoff-scheme` = :mdp:`h-bonds`
+  (and not :mdp:`all-bonds`), since this is faster, especially with GPUs,
+  and most force fields have been parametrized with only bonds involving
+  hydrogens constrained.
+* You can increase the time-step to 4 or 5 fs when using virtual interaction
+  sites (``gmx pdb2gmx -vsite h``).
+* For massively parallel runs with PME, you might need to try different numbers
+  of PME ranks (``gmx mdrun -npme ???``) to achieve best performance;
+  ``gmx tune_pme`` can help automate this search.
+* For massively parallel runs (also ``gmx mdrun -multidir``), or with a slow
+  network, global communication can become a bottleneck and you can reduce it
+  with ``gmx mdrun -gcom`` (note that this does affect the frequency of
+  temperature and pressure coupling).
+
+Checking and improving performance
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+* Look at the end of the ``md.log`` file to see the performance and the cycle
+  counters and wall-clock time for different parts of the MD calculation. The
+  PP/PME load ratio is also printed, with a warning when a lot of performance is
+  lost due to imbalance.
+* Adjust the number of PME ranks and/or the cut-off and PME grid-spacing when
+  there is a large PP/PME imbalance. Note that even with a small reported
+  imbalance, the automated PME-tuning might have reduced the initial imbalance.
+  You could still gain performance by changing the mdp parameters or increasing
+  the number of PME ranks.
+* If the neighbor searching takes a lot of time, increase nstlist (with the
+  Verlet cut-off scheme, this automatically adjusts the size of the neighbour
+  list to do more non-bonded computation to keep energy drift constant).
+
+  * If ``Comm. energies`` takes a lot of time (a note will be printed in the log
+    file), increase nstcalcenergy or use ``mdrun -gcom``.
+  * If all communication takes a lot of time, you might be running on too many
+    cores, or you could try running combined MPI/OpenMP parallelization with 2
+    or 4 OpenMP threads per MPI process.
index a67795f897858ca94ccd415932fc8070afb9d7d7..85df75f43d9599335fdb3692eaa9d6bb4404b4ee 100644 (file)
@@ -128,7 +128,7 @@ struct gmx_domdec_master_t
 
 #define DD_NLOAD_MAX 9
 
-const char *edlbs_names[edlbsNR] = { "off", "auto", "locked", "on" };
+const char *edlbs_names[edlbsNR] = { "off", "auto", "locked", "on", "on" };
 
 /* The size per charge group of the cggl_flag buffer in gmx_domdec_comm_t */
 #define DD_CGIBS 2
index 41c836aa3cba1ec3bba4a3ba286eaa2594270595..10bf7bbe863bb0ff7fd29f22f0c56565839e9886 100644 (file)
@@ -405,7 +405,7 @@ int read_conffile(const char *confin, rvec **x)
 
 
 void read_eigenvalues(int vecs[], const char *eigfile, real values[],
-                      gmx_bool bHesse, real kT)
+                      gmx_bool bHesse, real kT, int natoms_average_struct)
 {
     int      neig, nrow, i;
     double **eigval;
@@ -441,7 +441,20 @@ void read_eigenvalues(int vecs[], const char *eigfile, real values[],
     {
         for (i = 0; vecs[i]; i++)
         {
-            if (vecs[i] > (neig-6))
+            /* Make sure this eigenvalue does not correspond to one of the last 6 eigenvectors of the
+             * covariance matrix. These correspond to the rotational and translational degrees of
+             * freedom and will be zero within numerical accuracy.
+             *
+             * Note that the total number of eigenvectors produced by gmx covar depends on:
+             * 1) the total number of degrees of freedom of the system (3N, with N the number of atoms)
+             * 2) the number S of independent configurations fed into gmx covar.
+             * For long trajectories with lots of frames, usually S >= 3N + 1, so that one indeed gets
+             * 3N eigenvalues (of which the last 6 will have zero eigenvalues).
+             * For S < 3N + 1, however, the covariance matrix becomes rank deficient, and the number
+             * of possible eigenvalues is just S - 1. Since in make_edi we only know N but not S, we can
+             * only warn the user if he picked one of the last 6 of 3N.
+             */
+            if (vecs[i] > ( 3 * natoms_average_struct - 6 ))
             {
                 gmx_fatal(FARGS, "ERROR: You have chosen one of the last 6 eigenvectors of the COVARIANCE Matrix. That does not make sense, since they correspond to the 6 rotational and translational degrees of freedom.\n\n");
             }
@@ -899,7 +912,7 @@ int gmx_make_edi(int argc, char *argv[])
 
         if (listen[evFLOOD][0] != 0)
         {
-            read_eigenvalues(listen[evFLOOD], opt2fn("-eig", NFILE, fnm), evStepList[evFLOOD], bHesse, kB*T);
+            read_eigenvalues(listen[evFLOOD], opt2fn("-eig", NFILE, fnm), evStepList[evFLOOD], bHesse, kB*T, nav);
         }
 
         edi_params.flood.tau       = tau;
index a2952f296e24ba68efad0df35f5f8ea5bc9f2eb5..fe78463b0babc40a86b581d00053d28294a969a5 100644 (file)
@@ -1254,6 +1254,7 @@ void check_ir(const char *mdparin, t_inputrec *ir, t_gromppopts *opts,
                     evdw_names[ir->vdwtype],
                     eintmod_names[eintmodPOTSHIFT],
                     eintmod_names[eintmodNONE]);
+            warning_error(wi, err_buf);
         }
     }
 
index 4554f78415722a5c605353b89fe678b0ceacd5fe..9e34ed1e7b1d5c905dc05ab873acd859f4382c10 100644 (file)
@@ -269,9 +269,9 @@ static bool getApplicationClocks(const gmx_device_info_t *cuda_dev,
     {
         return false;
     }
-    HANDLE_NVML_RET_ERR(nvml_stat, "nvmlDeviceGetApplicationsClock failed");
+    HANDLE_NVML_RET_ERR(nvml_stat, "nvmlDeviceGetApplicationsClock failed for NVIDIA_CLOCK_SM");
     nvml_stat = nvmlDeviceGetApplicationsClock(cuda_dev->nvml_device_id, NVML_CLOCK_MEM, app_mem_clock);
-    HANDLE_NVML_RET_ERR(nvml_stat, "nvmlDeviceGetApplicationsClock failed");
+    HANDLE_NVML_RET_ERR(nvml_stat, "nvmlDeviceGetApplicationsClock failed for NVIDIA_CLOCK_MEM");
 
     return true;
 }
@@ -443,7 +443,7 @@ static gmx_bool reset_gpu_application_clocks(const gmx_device_info_t gmx_unused
             app_mem_clock == cuda_dev->nvml_set_app_mem_clock)
         {
             nvml_stat = nvmlDeviceSetApplicationsClocks(cuda_dev->nvml_device_id, cuda_dev->nvml_orig_app_mem_clock, cuda_dev->nvml_orig_app_sm_clock);
-            HANDLE_NVML_RET_ERR( nvml_stat, "nvmlDeviceGetApplicationsClock failed" );
+            HANDLE_NVML_RET_ERR( nvml_stat, "nvmlDeviceSetApplicationsClock failed" );
         }
     }
     nvml_stat = nvmlShutdown();
index 488a9bc80f37d34e50e1297506c3b608970ef161..b5306392a6580d2d887e4e531e57637ff3a8cf76 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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.
@@ -251,7 +251,7 @@ TEST(FunctionTest, InvsixthrootFloat)
 
     for (float f = 1.0; f < 10.0; f += 1.0)
     {
-        result.push_back(gmx::sixthroot(f));
+        result.push_back(gmx::invsixthroot(f));
     }
     checker.checkSequence(result.begin(), result.end(), "InvsixthrootFloat");
 }
@@ -264,7 +264,7 @@ TEST(FunctionTest, InvsixthrootDouble)
 
     for (double d = 1.0; d < 10.0; d += 1.0)
     {
-        result.push_back(gmx::sixthroot(d));
+        result.push_back(gmx::invsixthroot(d));
     }
     checker.checkSequence(result.begin(), result.end(), "InvsixthrootDouble");
 }
@@ -277,7 +277,7 @@ TEST(FunctionTest, InvsixthrootInteger)
 
     for (int i = 1; i < 10; i++)
     {
-        result.push_back(gmx::sixthroot(i));
+        result.push_back(gmx::invsixthroot(i));
     }
     checker.checkSequence(result.begin(), result.end(), "InvsixthrootInteger");
 }
index 953643a0f3f86fdef4b4b037d8ac622d7eac1cf6..e3bef69cfaf3c0c5598870fb00a809d8df654df2 100644 (file)
@@ -4,13 +4,13 @@
   <Sequence Name="InvsixthrootDouble">
     <Int Name="Length">9</Int>
     <Real>1</Real>
-    <Real>1.122462048309373</Real>
-    <Real>1.2009369551760027</Real>
-    <Real>1.2599210498948732</Real>
-    <Real>1.3076604860118306</Real>
-    <Real>1.3480061545972777</Real>
-    <Real>1.3830875542684886</Real>
-    <Real>1.4142135623730951</Real>
-    <Real>1.4422495703074083</Real>
+    <Real>0.89089871814033927</Real>
+    <Real>0.83268317765560429</Real>
+    <Real>0.79370052598409968</Real>
+    <Real>0.76472449133173004</Real>
+    <Real>0.74183637559040227</Real>
+    <Real>0.72302002639948371</Real>
+    <Real>0.70710678118654746</Real>
+    <Real>0.69336127435063477</Real>
   </Sequence>
 </ReferenceData>
index cbae418a2ee2c1c1b58ec048bd6d3ad82be1112e..c3f377dce839745dc1ce6da7d38aea5c91335d84 100644 (file)
@@ -4,13 +4,13 @@
   <Sequence Name="InvsixthrootFloat">
     <Int Name="Length">9</Int>
     <Real>1</Real>
-    <Real>1.122462</Real>
-    <Real>1.2009369</Real>
-    <Real>1.2599211</Real>
-    <Real>1.3076605</Real>
-    <Real>1.3480061</Real>
-    <Real>1.3830875</Real>
-    <Real>1.4142135</Real>
-    <Real>1.4422495</Real>
+    <Real>0.8908987</Real>
+    <Real>0.83268321</Real>
+    <Real>0.79370052</Real>
+    <Real>0.76472449</Real>
+    <Real>0.74183637</Real>
+    <Real>0.72302002</Real>
+    <Real>0.70710677</Real>
+    <Real>0.69336128</Real>
   </Sequence>
 </ReferenceData>
index 34d0ec59852ef872200f2f25adc95104d79f5ec1..b7ac89dacd39ac4834d8edd924e957aed19e902e 100644 (file)
@@ -4,13 +4,13 @@
   <Sequence Name="InvsixthrootInteger">
     <Int Name="Length">9</Int>
     <Real>1</Real>
-    <Real>1.122462048309373</Real>
-    <Real>1.2009369551760027</Real>
-    <Real>1.2599210498948732</Real>
-    <Real>1.3076604860118306</Real>
-    <Real>1.3480061545972777</Real>
-    <Real>1.3830875542684886</Real>
-    <Real>1.4142135623730951</Real>
-    <Real>1.4422495703074083</Real>
+    <Real>0.89089871814033927</Real>
+    <Real>0.83268317765560429</Real>
+    <Real>0.79370052598409968</Real>
+    <Real>0.76472449133173004</Real>
+    <Real>0.74183637559040227</Real>
+    <Real>0.72302002639948371</Real>
+    <Real>0.70710678118654746</Real>
+    <Real>0.69336127435063477</Real>
   </Sequence>
 </ReferenceData>
index d430f8a609ab02040c1c8a182c333b5738fc083f..a944b712ebe1d87e583d07cc31ce232526c1caae 100644 (file)
@@ -1325,7 +1325,8 @@ static void do_constraint(struct pull_t *pull, t_pbc *pbc,
             continue;
         }
 
-        pcrd->f_scal = dr_tot[c]/((pull->group[pcrd->params.group[0]].invtm + pull->group[pcrd->params.group[1]].invtm)*dt*dt);
+        /* Accumulate the forces, in case we have multiple constraint steps */
+        pcrd->f_scal += dr_tot[c]/((pull->group[pcrd->params.group[0]].invtm + pull->group[pcrd->params.group[1]].invtm)*dt*dt);
 
         if (vir != nullptr && pcrd->params.eGeom != epullgDIRPBC && bMaster)
         {
index c93403685207532e12a47eeb0be02ae9696090ab..e3e146bfb00a68d951474f2bdeed7909d25b4187 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 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.
@@ -227,7 +227,7 @@ trunc(Simd4Double x)
     };
 }
 
-static inline float gmx_simdcall
+static inline double gmx_simdcall
 dotProduct(Simd4Double a, Simd4Double b)
 {
     vector4double dp_sh0 = vec_mul(a.simdInternal_, b.simdInternal_);
index 1036eaace2c8a8daf9e8d702836f118ec47fc49c..d51633ec7df9b33aee8e8bc8e16dd9508717a606 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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.
@@ -256,7 +256,7 @@ trunc(Simd4Double x)
     };
 }
 
-static inline float gmx_simdcall
+static inline double gmx_simdcall
 dotProduct(Simd4Double a, Simd4Double b)
 {
     __m128d tmp1, tmp2;
@@ -359,7 +359,7 @@ blend(Simd4Double a, Simd4Double b, Simd4DBool sel)
     };
 }
 
-static inline float gmx_simdcall
+static inline double gmx_simdcall
 reduce(Simd4Double a)
 {
     __m128d a0, a1;
index ecf2eca5a385d480a47290cc3a1e6e615d946aa6..44d13a1e0614bcc6425efe99c9a45381f46706bb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 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.
@@ -258,7 +258,7 @@ trunc(Simd4Double x)
     };
 }
 
-static inline float gmx_simdcall
+static inline double gmx_simdcall
 dotProduct(Simd4Double a, Simd4Double b)
 {
     __m128d tmp1, tmp2;
@@ -364,7 +364,7 @@ blend(Simd4Double a, Simd4Double b, Simd4DBool sel)
     };
 }
 
-static inline float gmx_simdcall
+static inline double gmx_simdcall
 reduce(Simd4Double a)
 {
     __m128d a0, a1;
index 4ed2602c373ad3d07a6692689f5b27258e274f20..29320adf412280aafbac9a5769caf139e2d27a48 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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.
@@ -268,7 +268,7 @@ trunc(Simd4Double x)
     };
 }
 
-static inline float gmx_simdcall
+static inline double gmx_simdcall
 dotProduct(Simd4Double a, Simd4Double b)
 {
     return _mm512_mask_reduce_add_pd(_mm512_int2mask(7),
@@ -382,7 +382,7 @@ blend(Simd4Double a, Simd4Double b, Simd4DBool sel)
     };
 }
 
-static inline float gmx_simdcall
+static inline double gmx_simdcall
 reduce(Simd4Double a)
 {
     return _mm512_mask_reduce_add_pd(_mm512_int2mask(0xF), a.simdInternal_);
index d6046d5b7885cfa4087563e5077f19a4b737c65b..66feead51ee8ed5d9397cc1846ec64c53e67b8b8 100644 (file)
@@ -628,11 +628,6 @@ double gmx::do_md(FILE *fplog, t_commrec *cr, const gmx::MDLogger &mdlog,
             copy_mat(ekind->tcstat[i].ekinh, ekind->tcstat[i].ekinh_old);
         }
     }
-    if (ir->eI != eiVV)
-    {
-        enerd->term[F_TEMP] *= 2; /* result of averages being done over previous and current step,
-                                     and there is no previous step */
-    }
 
     /* need to make an initiation call to get the Trotter variables set, as well as other constants for non-trotter
        temperature control */
@@ -640,16 +635,28 @@ double gmx::do_md(FILE *fplog, t_commrec *cr, const gmx::MDLogger &mdlog,
 
     if (MASTER(cr))
     {
-        if (constr && !ir->bContinuation && ir->eConstrAlg == econtLINCS)
-        {
-            fprintf(fplog,
-                    "RMS relative constraint deviation after constraining: %.2e\n",
-                    constr_rmsd(constr));
-        }
-        if (EI_STATE_VELOCITY(ir->eI))
+        if (!ir->bContinuation)
         {
-            fprintf(fplog, "Initial temperature: %g K\n", enerd->term[F_TEMP]);
+            if (constr && ir->eConstrAlg == econtLINCS)
+            {
+                fprintf(fplog,
+                        "RMS relative constraint deviation after constraining: %.2e\n",
+                        constr_rmsd(constr));
+            }
+            if (EI_STATE_VELOCITY(ir->eI))
+            {
+                real temp = enerd->term[F_TEMP];
+                if (ir->eI != eiVV)
+                {
+                    /* Result of Ekin averaged over velocities of -half
+                     * and +half step, while we only have -half step here.
+                     */
+                    temp *= 2;
+                }
+                fprintf(fplog, "Initial temperature: %g K\n", temp);
+            }
         }
+
         if (bRerunMD)
         {
             fprintf(stderr, "starting md rerun '%s', reading coordinates from"