Refer to "mixed" precision in user-facing documentation
authorMark Abraham <mark.j.abraham@gmail.com>
Sat, 28 Jun 2014 19:57:18 +0000 (21:57 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sun, 29 Jun 2014 15:24:27 +0000 (17:24 +0200)
GROMACS has used mixed precision for many years, so we may as well be
accurate about it. In the code, we should continue to refer to single
precision for aspects of the implementation, but mdrun should not
be referred to as running in "single precision."

Also removed useless install-guide section from manual.

Change-Id: I3c26acedcdb391de50bdcb6a5e913ea0cfc32845

cmake/gmxManageFFTLibraries.cmake
install-guide/install-guide.md
manual/algorithms.tex
manual/forcefield.tex
manual/install.tex
manual/plots/verlet-drift.eps
manual/plots/verlet-drift.xvg
manual/special.tex
share/html/online/mdp_opt.html

index 78a67531dc0bc9c88671e8df5a209251d2dd5b5c..4bbfc2df4e94ce5baf9661ff73fe7d87a5046c1c 100644 (file)
@@ -73,7 +73,7 @@ if(${GMX_FFT_LIBRARY} STREQUAL "FFTW3")
 
     string(TOUPPER "${FFTW}" FFTW)
     if(NOT ${FFTW}_FOUND)
-      MESSAGE(FATAL_ERROR "Cannot find FFTW 3 (with correct precision - libfftw3f for single-precision GROMACS or libfftw3 for double-precision GROMACS). Either choose the right precision, choose another FFT(W) library (-DGMX_FFT_LIBRARY), enable the advanced option to let GROMACS build FFTW 3 for you (-GMX_BUILD_OWN_FFTW=ON), or use the really slow GROMACS built-in fftpack library (-DGMX_FFT_LIBRARY=fftpack).")
+      MESSAGE(FATAL_ERROR "Cannot find FFTW 3 (with correct precision - libfftw3f for mixed-precision GROMACS or libfftw3 for double-precision GROMACS). Either choose the right precision, choose another FFT(W) library (-DGMX_FFT_LIBRARY), enable the advanced option to let GROMACS build FFTW 3 for you (-GMX_BUILD_OWN_FFTW=ON), or use the really slow GROMACS built-in fftpack library (-DGMX_FFT_LIBRARY=fftpack).")
     endif()
 
     set(PKG_FFT "${${FFTW}_PKG}")
index 15fb7ce80c81801a674f78e7c65a40c9129d19e9..2b19bcf0dfda9d9e0a20187698b826680e4be7da 100644 (file)
@@ -210,8 +210,9 @@ not a priority.
 FFTW is likely to be available for your platform via its package
 management system, but there can be compatibility and significant
 performance issues associated with these packages. In particular,
-GROMACS simulations are normally run in single floating-point
-precision whereas the default FFTW package is normally in double
+GROMACS simulations are normally run in "mixed" floating-point
+precision, which is suited for the use of single precision in
+FFTW. The default FFTW package is normally in double
 precision, and good compiler options to use for FFTW when linked to
 GROMACS may not have been used. Accordingly, the GROMACS team
 recommends either
@@ -229,8 +230,9 @@ will see a warning that advises how you can eliminate this risk
 If you build FFTW from source yourself, get the most recent version
 and follow its [installation
 guide](http://www.fftw.org/doc/Installation-and-Customization.html#Installation-and-Customization).
-Choose the precision (i.e. single or float vs. double) to match what
-you will later require for GROMACS. There is no need to compile with
+Choose the precision for FFTW (i.e. single or float vs. double) to
+match whether you will later use mixed or double precision for
+GROMACS. There is no need to compile FFTW with
 threading or MPI support, but it does no harm. On x86 hardware,
 compile *only* with `--enable-sse2` (regardless of precision) even if
 your processors can take advantage of AVX extensions. Since GROMACS
index c4398ec94c89546d8fe7d1ea2528edd76f9d0b50..eab3d5488953fd010c866f3a08d45d1fa946af06 100644 (file)
@@ -744,9 +744,10 @@ buffer calculation and results in a smaller buffer size.
   the cut-off. Error estimates due to finite Verlet buffer size are
   shown for a $1 \times 1$ atom pair list and $4 \times 4$ atom pair
   list without and with (dashed line) cancellation of positive and
-  negative errors. Real energy drift is shown for double- and
-  single-precision simulations. Single-precision rounding errors in
-  the SETTLE constraint algorithm cause the drift to become negative
+  negative errors. Real energy drift is shown for simulations using
+  double- and mixed-precision settings. Rounding errors in the SETTLE
+  constraint algorithm from the use of single precision causes
+  the drift to become negative
   at large buffer size. Note that at zero buffer size, the real drift
   is small because positive (H-H) and negative (O-H) energy errors
   cancel.}
index 2768c14ada67f3ffb3e3204e1b5b54ea95b1a744..f20986fc617ff7547f5e8cb5dad0fd3a0ff52bb2 100644 (file)
@@ -2028,7 +2028,7 @@ are evaluated during neighbor list generation.
 The \normindex{virial} is calculated from the sum of the short- and
 long-range forces.
 This means that the virial can be slightly asymmetrical at non-NS steps.
-In single precision, the virial is almost always asymmetrical because the
+When mdrun is compiled to use mixed precision, the virial is almost always asymmetrical because the
 off-diagonal elements are about as large as each element in the sum.
 In most cases this is not really a problem, since the fluctuations in the
 virial can be 2 orders of magnitude larger than the average.
index 5cc9245aa8a33d617b7d9d0885ccf6ab05d71dd7..5386ba59018cb1b93b37c9717383b172dc67e6c3 100644 (file)
 % the research papers on the package. Check out http://www.gromacs.org.
 
 \chapter{Technical Details}
-\label{ch:install}
-\section{Installation}
-The entire {\gromacs} package is Free Software, licensed under the GNU
-Lesser General Public License; either version 2.1 of the License, or
-(at your option) any later version.
-The main distribution site is our WWW server at {\wwwpage}. 
 
-The package is mainly distributed as source code, but others provide
-packages for Linux and Mac. Check your Linux distribution tools
-(search for gromacs). On Mac OS X the {\bf port} tool will allow you
-to install a recent version.
-On the home page you will find all the information you need to 
-\normindex{install} the package, mailing lists with archives,
-and several additional on-line resources like contributed topologies, etc.
-%% The default installation action is simply to unpack the source code and
-%% then issue:
-%% \begin{verbatim}
-%% ./configure
-%% make
-%% make install
-%% \end{verbatim}
-%% The configuration script should automatically determine the best options
-%% for your platform, and it will tell you if anything is missing on
-%% your system. You will also find detailed step-by-step installation
-%% instructions on the website. There is a \normindex{cmake} based
-%% installation route as well:
-%% \begin{verbatim}
-%% cmake
-%% make
-%% make install
-%% \end{verbatim}
-%% which is being tested in the wild since {\gromacs} version 4.5.
-
-\section{Single or Double precision}
-{\gromacs} can be compiled in either single\index{single
-precision|see{precision, single}}\index{precision, single} or
-\pawsindex{double}{precision}. It is very important to note here that
-single precision is actually mixed precision. Using single precision
+\section{Mixed or Double precision}
+{\gromacs} can be compiled in either mixed\index{mixed
+precision|see{precision, mixed}}\index{precision, mixed} or
+\pawsindex{double}{precision}. Documentation of previous {\gromacs}
+versions referred to ``single precision'', but the implementation
+has made selective use of double precision for many years.
+Using single precision
 for all variables would lead to a significant reduction in accuracy.
-Although in single precision all state vectors, i.e. particle coordinates,
+Although in ``mixed precision'' all state vectors, i.e. particle coordinates,
 velocities and forces, are stored in single precision, critical variables
 are double precision. A typical example of the latter is the virial,
 which is a sum over all forces in the system, which have varying signs.
 In addition, in many parts of the code we managed to avoid double precision
 for arithmetic, by paying attention to summation order or reorganization
-of mathematical expressions. The default choice is single precision,
+of mathematical expressions. The default configuration uses mixed precision,
 but it is easy to turn on double precision by adding the option
 {\tt -DGMX_DOUBLE=on} to {\tt cmake}. Double precision
-will be 20 to 100\% slower than single precision depending on the
+will be 20 to 100\% slower than mixed precision depending on the
 architecture you are running on. Double precision will use somewhat
 more memory and run input, energy and full-precision trajectory files
-will be almost twice as large.  SIMD (single-instruction multiple-data)
-intrinsics non-bonded force and/or energy kernels are available for x86
-hardware in single and double precision in different SSE and AVX flavors;
-the minimum requirement is SSE2.
-IBM Blue Gene Q intrinsics will be available soon. Some other parts of
-the code, especially PME, also employ x86 SIMD intrinsics. All other
-hardware will use optimized C kernels. The Verlet non-bonded scheme
-uses SIMD non-bonded kernels that are C pre-processor macro driven,
-therefore it is straightforward to implement SIMD acceleration
-for new architectures; a guide is provided on {\wwwpage}.
+will be almost twice as large.
 
-The energies in single precision are accurate up to the last decimal,
+The energies in mixed precision are accurate up to the last decimal,
 the last one or two decimals of the forces are non-significant.
 The virial is less accurate than the forces, since the virial is only one
 order of magnitude larger than the size of each element in the sum over
@@ -104,13 +65,14 @@ In most cases this is not really a problem, since the fluctuations in the
 virial can be two orders of magnitude larger than the average.
 Using cut-offs for the Coulomb interactions cause large errors
 in the energies, forces, and virial.
-Even when using a reaction-field or lattice-sum method, the errors
-are larger than, or comparable to, the errors due to the single precision.
+Even when using a reaction-field or lattice sum method, the errors
+are larger than, or comparable to, the errors due to the partial use of
+single precision.
 Since MD is chaotic, trajectories with very similar starting conditions will
-diverge rapidly, the divergence is faster in single precision than in double
+diverge rapidly, the divergence is faster in mixed precision than in double
 precision.
 
-For most simulations single precision is accurate enough.
+For most simulations, mixed precision is accurate enough.
 In some cases double precision is required to get reasonable results:
 \begin{itemize}
 \item normal mode analysis,
index 5145b296485a4b5ab7e44a6de4a49585905234c0..b8109d59b45f1afa89fa09c29f39202e58bacf78 100644 (file)
@@ -765,7 +765,7 @@ gsave
 553 590 translate
 0 rotate
 0 -20  m
-(single precision) show
+(mixed precision) show
 grestore
 newpath
 0.000000 0.000000 0.000000 setrgbcolor
index 37c4dd3e7096b2312cc4719c9cd0fcee65061cf9..2d576e69755c4947e2b6d0d6f002dc226c3a86ea 100644 (file)
@@ -66,7 +66,7 @@
 @    string font 4
 @    string just 0
 @    string char size 1.000000
-@    string def "single precision"
+@    string def "mixed precision"
 @with g0
 @g0 on
 @g0 label off
index f2514cea1cef9b49cb4a85f6fff2353e211753ba..353d7cee7936b31fb1ad29706070fe044832688b 100644 (file)
@@ -1543,9 +1543,9 @@ This results in the following errors for each interval:
 V and V' are continuous, while V'' is the first discontinuous
 derivative.
 The number of points per nanometer is 500 and 2000
-for single- and double-precision versions of {\gromacs}, respectively.
+for mixed- and double-precision versions of {\gromacs}, respectively.
 This means that the errors in the potential and force will usually
-be smaller than the single precision accuracy.
+be smaller than the mixed precision accuracy.
 
 {\gromacs} stores $A_0$, $A_1$, $A_2$ and $A_3$.
 The force routines get a table with these four parameters and
@@ -1603,7 +1603,7 @@ order: $x$, $f(x)$, $-f'(x)$, $g(x)$, $-g'(x)$, $h(x)$, $-h'(x)$.
 The $x$ should run from 0 to $r_c+1$ (the value of {\tt table_extension} can be
 changed in the {\tt .mdp} file).
 You can choose the spacing you like; for the standard tables {\gromacs}
-uses a spacing of 0.002 and 0.0005 nm when you run in single
+uses a spacing of 0.002 and 0.0005 nm when you run in mixed
 and double precision, respectively.  In this
 context, $r_c$ denotes the maximum of the two cut-offs {\tt rvdw} and
 {\tt rcoulomb} (see above). These variables need not be the same (and
index 310a6c9a3dad436b56456b9a91664f8dc58c1f2a..8c34b3d2c5717dd8e6f20e8d51767ecb3b3b4c72 100644 (file)
@@ -661,7 +661,7 @@ from 0 to the largest cut-off distance + <b>table-extension</b>
 and should be uniformly spaced. For the pair interactions the table
 length in the file will be used.
 The optimal spacing, which is used for non-user tables,
-is <tt>0.002</tt> [nm] when you run in single precision
+is <tt>0.002</tt> [nm] when you run in mixed precision
 or <tt>0.0005</tt> [nm] when you run in double precision.
 The function value at <tt>x=0</tt> is not important. More information is
 in the printed manual.</dd>