Merge branch origin/release-5-0
[alexxy/gromacs.git] / docs / install-guide / index.rst
1 .. _install guide:
2
3 ******************
4 Installation guide
5 ******************
6
7 .. highlight:: bash
8
9 Introduction to building |Gromacs|
10 ==================================
11
12 These instructions pertain to building |Gromacs|
13 |version|. You might also want to check the `up-to-date installation instructions`_.
14
15 Quick and dirty installation
16 ----------------------------
17 1. Get the latest version of your C and C++ compilers.
18 2. Check that you have CMake version |GMX_CMAKE_MINIMUM_REQUIRED_VERSION| or later.
19 3. Get and unpack the latest version of the |Gromacs| tarball.
20 4. Make a separate build directory and change to it. 
21 5. Run ``cmake`` with the path to the source as an argument
22 6. Run ``make``, ``make check``, and ``make install``
23
24 Or, as a sequence of commands to execute:
25
26 .. parsed-literal::
27
28     tar xfz gromacs-|version|.tar.gz
29     cd gromacs-|version|
30     mkdir build
31     cd build
32     cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON
33     make
34     make check
35     sudo make install
36     source /usr/local/gromacs/bin/GMXRC
37
38 This will download and build first the prerequisite FFT library
39 followed by |Gromacs|. If you already have FFTW installed, you can
40 remove that argument to ``cmake``. Overall, this build of |Gromacs| will
41 be correct and reasonably fast on the machine upon which ``cmake``
42 ran. If you want to get the maximum value for your hardware with
43 |Gromacs|, you will have to read further. Sadly, the interactions of
44 hardware, libraries, and compilers are only going to continue to get
45 more complex.
46
47 Typical installation
48 --------------------
49 As above, and with further details below, but you should consider
50 using the following `CMake options`_ with the
51 appropriate value instead of ``xxx`` :
52
53 * ``-DCMAKE_C_COMPILER=xxx`` equal to the name of the C99 `Compiler`_ you wish to use (or the environment variable ``CC``)
54 * ``-DCMAKE_CXX_COMPILER=xxx`` equal to the name of the C++98 `compiler`_ you wish to use (or the environment variable ``CXX``)
55 * ``-DGMX_MPI=on`` to build using `MPI support`_
56 * ``-DGMX_GPU=on`` to build using nvcc to run with an NVIDIA `native GPU acceleration`_
57 * ``-DGMX_SIMD=xxx`` to specify the level of `SIMD support`_ of the node on which mdrun will run
58 * ``-DGMX_BUILD_MDRUN_ONLY=on`` for `building only mdrun`_, e.g. for compute cluster back-end nodes
59 * ``-DGMX_DOUBLE=on`` to run |Gromacs| in double precision (slower, and not normally useful)
60 * ``-DCMAKE_PREFIX_PATH=xxx`` to add a non-standard location for CMake to `search for libraries, headers or programs`_
61 * ``-DCMAKE_INSTALL_PREFIX=xxx`` to install |Gromacs| to a non-standard location (default ``/usr/local/gromacs``)
62 * ``-DBUILD_SHARED_LIBS=off`` to turn off the building of shared libraries to help with `static linking`_
63 * ``-DGMX_FFT_LIBRARY=xxx`` to select whether to use ``fftw``, ``mkl`` or ``fftpack`` libraries for `FFT support`_
64 * ``-DCMAKE_BUILD_TYPE=Debug`` to build |Gromacs| in debug mode
65
66 Building older versions
67 -----------------------
68 For installation instructions for old |Gromacs| versions, see the
69 documentation for installing
70 `GROMACS 4.5 <http://www.gromacs.org/Documentation/Installation_Instructions_4.5>`_,
71 `GROMACS 4.6 <http://www.gromacs.org/Documentation/Installation_Instructions_4.6>`_,
72 and
73 `GROMACS 5.0 <http://www.gromacs.org/Documentation/Installation_Instructions_5.0>`_.
74
75 Prerequisites
76 =============
77 Platform
78 --------
79 |Gromacs| can be compiled for many operating systems and architectures.
80 These include any distribution of Linux, Mac OS X or Windows, and
81 architectures including x86, AMD64/x86-64, PPC, ARM v7 and SPARC VIII.
82
83 Compiler
84 --------
85 Technically, |Gromacs| can be compiled on any platform with an ANSI C99
86 and C++98 compiler, and their respective standard C/C++ libraries.
87 We use only a few C99 features, but note that the C++ compiler also needs to
88 support these C99 features (notably, int64_t and related things), which are not
89 part of the C++98 standard.
90 Getting good performance on an OS and architecture requires choosing a
91 good compiler. In practice, many compilers struggle to do a good job
92 optimizing the |Gromacs| architecture-optimized SIMD kernels.
93
94 For best performance, the |Gromacs| team strongly recommends you get the
95 most recent version of your preferred compiler for your platform.
96 There is a large amount of |Gromacs| code that depends on effective
97 compiler optimization to get high performance. This makes |Gromacs|
98 performance sensitive to the compiler used, and the binary will often
99 only work on the hardware for which it is compiled.
100
101 * In particular, |Gromacs| includes a lot of explicit SIMD (single
102   instruction, multiple data) optimization that can use assembly
103   instructions available on most modern processors. This can have a
104   substantial effect on performance, but for recent processors you
105   also need a similarly recent compiler that includes support for the
106   corresponding SIMD instruction set to get this benefit. The
107   configuration does a good job at detecting this, and you will
108   usually get warnings if |Gromacs| and your hardware support a more
109   recent instruction set than your compiler.
110
111 * On Intel-based x86 hardware, we recommend you to use the GNU
112   compilers version 4.7 or later or Intel compilers version 12 or
113   later for best performance. The Intel compiler has historically been
114   better at instruction scheduling, but recent gcc versions have
115   proved to be as fast or sometimes faster than Intel.
116
117 * The Intel and GNU compilers produce much faster |Gromacs| executables
118   than the PGI and Cray compilers.
119
120 * On AMD-based x86 hardware up through the "K10" microarchitecture
121   ("Family 10h") Thuban/Magny-Cours architecture (e.g. Opteron
122   6100-series processors), it is worth using the Intel compiler for
123   better performance, but gcc version 4.7 and later are also
124   reasonable.
125
126 * On the AMD Bulldozer architecture (Opteron 6200), AMD introduced
127   fused multiply-add instructions and an "FMA4" instruction format not
128   available on Intel x86 processors. Thus, on the most recent AMD
129   processors you want to use gcc version 4.7 or later for best
130   performance! The Intel compiler will only generate code for the
131   subset also supported by Intel processors, and that is significantly
132   slower.
133
134 * If you are running on Mac OS X, the best option is the Intel
135   compiler. Both clang and gcc will work, but they produce lower
136   performance and each have some shortcomings. Current Clang does not
137   support OpenMP. This may change when clang 3.5 becomes available.
138
139 * For all non-x86 platforms, your best option is typically to use the
140   vendor's default or recommended compiler, and check for specialized
141   information below.
142
143 Compiling with parallelization options
144 --------------------------------------
145 |Gromacs| can run in parallel on multiple cores of a single
146 workstation using its built-in thread-MPI. No user action is required
147 in order to enable this.
148
149 GPU support
150 ^^^^^^^^^^^
151 If you wish to use the excellent native GPU support in |Gromacs|,
152 NVIDIA's CUDA_ version |REQUIRED_CUDA_VERSION| software development kit is required,
153 and the latest version is strongly encouraged. NVIDIA GPUs with at
154 least NVIDIA compute capability |REQUIRED_CUDA_COMPUTE_CAPABILITY| are
155 required, e.g. Fermi or Kepler cards. You are strongly recommended to
156 get the latest CUDA version and driver supported by your hardware, but
157 beware of possible performance regressions in newer CUDA versions on
158 older hardware. Note that while some CUDA compilers (nvcc) might not
159 officially support recent versions of gcc as the back-end compiler, we
160 still recommend that you at least use a gcc version recent enough to
161 get the best SIMD support for your CPU, since |Gromacs| always runs some
162 code on the CPU. It is most reliable to use the same C++ compiler
163 version for |Gromacs| code as used as the back-end compiler for nvcc,
164 but it could be faster to mix compiler versions to suit particular
165 contexts.
166
167 .. _mpi-support:
168
169 MPI support
170 ^^^^^^^^^^^
171 If you wish to run in parallel on multiple machines across a network,
172 you will need to have
173
174 * an MPI library installed that supports the MPI 1.3
175   standard, and
176 * wrapper compilers that will compile code using that library.
177
178 The |Gromacs| team recommends OpenMPI_ version
179 1.6 (or higher), MPICH_ version 1.4.1 (or
180 higher), or your hardware vendor's MPI installation. The most recent
181 version of either of these is likely to be the best. More specialized
182 networks might depend on accelerations only available in the vendor's
183 library. LAMMPI_ might work, but since it has
184 been deprecated for years, it is not supported.
185
186 Often OpenMP_ parallelism is an
187 advantage for |Gromacs|, but support for this is generally built into
188 your compiler and detected automatically.
189
190 In summary, for maximum performance you will need to examine how you
191 will use |Gromacs|, what hardware you plan to run on, and whether you
192 can afford a non-free compiler for slightly better
193 performance. Unfortunately, the only way to find out is to test
194 different options and parallelization schemes for the actual
195 simulations you want to run. You will still get *good*,
196 performance with the default build and runtime options, but if you
197 truly want to push your hardware to the performance limit, the days of
198 just blindly starting programs with ``mdrun`` are gone.
199
200 CMake
201 -----
202 |Gromacs| uses the CMake build system, and requires
203 version |GMX_CMAKE_MINIMUM_REQUIRED_VERSION| or higher. Lower versions
204 will not work. You can check whether CMake is installed, and what
205 version it is, with ``cmake --version``. If you need to install CMake,
206 then first check whether your platform's package management system
207 provides a suitable version, or visit the `CMake installation page`_
208 for pre-compiled
209 binaries, source code and installation instructions. The |Gromacs| team
210 recommends you install the most recent version of CMake you can.
211
212 .. _FFT support:
213
214 Fast Fourier Transform library
215 ------------------------------
216 Many simulations in |Gromacs| make extensive use of fast Fourier
217 transforms, and a software library to perform these is always
218 required. We recommend FFTW_ (version 3 or higher only) or
219 Intel MKL_. The choice of
220 library can be set with ``cmake -DGMX_FFT_LIBRARY=<name>``, where
221 ``<name>`` is one of ``fftw``, ``mkl``, or ``fftpack``. FFTPACK is bundled
222 with |Gromacs| as a fallback, and is acceptable if mdrun performance is
223 not a priority.
224
225 Using FFTW
226 ^^^^^^^^^^
227 FFTW_ is likely to be available for your platform via its package
228 management system, but there can be compatibility and significant
229 performance issues associated with these packages. In particular,
230 |Gromacs| simulations are normally run in "mixed" floating-point
231 precision, which is suited for the use of single precision in
232 FFTW. The default FFTW package is normally in double
233 precision, and good compiler options to use for FFTW when linked to
234 |Gromacs| may not have been used. Accordingly, the |Gromacs| team
235 recommends either
236
237 * that you permit the |Gromacs| installation to download and
238   build FFTW from source automatically for you (use
239   ``cmake -DGMX_BUILD_OWN_FFTW=ON``), or
240 * that you build FFTW from the source code.
241
242 If you build FFTW from source yourself, get the most recent version
243 and follow the `FFTW installation guide`_.
244 Choose the precision for FFTW (i.e. single or float vs. double) to
245 match whether you will later use mixed or double precision for
246 |Gromacs|. There is no need to compile FFTW with
247 threading or MPI support, but it does no harm. On x86 hardware,
248 compile *only* with ``--enable-sse2`` (regardless of precision) even if
249 your processors can take advantage of AVX extensions. Since |Gromacs|
250 uses fairly short transform lengths we do not benefit from the FFTW
251 AVX acceleration, and because of memory system performance
252 limitations, it can even degrade |Gromacs| performance by around
253 20%. There is no way for |Gromacs| to limit the use to SSE2 SIMD at run
254 time if AVX support has been compiled into FFTW, so you need to set
255 this at compile time.
256
257 Using MKL
258 ^^^^^^^^^
259 Using MKL_ with the Intel Compilers version 11 or higher is very
260 simple. Set up your compiler environment correctly, perhaps with a
261 command like ``source /path/to/compilervars.sh intel64`` (or consult
262 your local documentation). Then set ``-DGMX_FFT_LIBRARY=mkl`` when you
263 run cmake. In this case, |Gromacs| will also use MKL for BLAS and LAPACK
264 (see `linear algebra libraries`_). Generally,
265 there is no advantage in using MKL with |Gromacs|, and FFTW is often
266 faster.
267
268 Otherwise, you can get your hands dirty and configure MKL by setting
269
270 ::
271
272     -DGMX_FFT_LIBRARY=mkl
273     -DMKL_LIBRARIES="/full/path/to/libone.so;/full/path/to/libtwo.so"
274     -DMKL_INCLUDE_DIR="/full/path/to/mkl/include"
275
276 where the full list (and order!) of libraries you require are found in
277 Intel's MKL documentation for your system.
278
279 Optional build components
280 -------------------------
281 * Compiling to run on NVIDIA GPUs requires CUDA_
282 * An external Boost library can be used to provide better
283   implementation support for smart pointers and exception handling,
284   but the |Gromacs| source bundles a subset of Boost 1.55.0 as a fallback
285 * Hardware-optimized BLAS and LAPACK libraries are useful
286   for a few of the |Gromacs| utilities focused on normal modes and
287   matrix manipulation, but they do not provide any benefits for normal
288   simulations. Configuring these are discussed at
289   `linear algebra libraries`_.
290 * The built-in |Gromacs| trajectory viewer ``gmx view`` requires X11 and
291   Motif/Lesstif libraries and header files. You may prefer to use
292   third-party software for visualization, such as VMD_ or PyMol_.
293 * An external TNG library for trajectory-file handling can be used,
294   but TNG 1.7.3 is bundled in the |Gromacs| source already
295 * zlib is used by TNG for compressing some kinds of trajectory data
296 * Running the |Gromacs| test suite requires libxml2
297 * Building the |Gromacs| documentation requires ImageMagick, pdflatex,
298   bibtex, doxygen, python, sphinx and pygments.
299 * The |Gromacs| utility programs often write data files in formats
300   suitable for the Grace plotting tool, but it is straightforward to
301   use these files in other plotting programs, too.
302
303 Doing a build of |Gromacs|
304 ==========================
305 This section will cover a general build of |Gromacs| with CMake_, but it
306 is not an exhaustive discussion of how to use CMake. There are many
307 resources available on the web, which we suggest you search for when
308 you encounter problems not covered here. The material below applies
309 specifically to builds on Unix-like systems, including Linux, and Mac
310 OS X. For other platforms, see the specialist instructions below.
311
312 Configuring with CMake
313 ----------------------
314 CMake will run many tests on your system and do its best to work out
315 how to build |Gromacs| for you. If your build machine is the same as
316 your target machine, then you can be sure that the defaults will be
317 pretty good. The build configuration will for instance attempt to
318 detect the specific hardware instructions available in your
319 processor. However, if you want to control aspects of the build, or
320 you are compiling on a cluster head node for back-end nodes with a
321 different architecture, there are plenty of things you can set
322 manually.
323
324 The best way to use CMake to configure |Gromacs| is to do an
325 "out-of-source" build, by making another directory from which you will
326 run CMake. This can be outside the source directory, or a subdirectory
327 of it. It also means you can never corrupt your source code by trying
328 to build it! So, the only required argument on the CMake command line
329 is the name of the directory containing the ``CMakeLists.txt`` file of
330 the code you want to build. For example, download the source tarball
331 and use
332
333 .. parsed-literal::
334
335     tar xfz gromacs-|version|.tgz
336     cd gromacs-|version|
337     mkdir build-gromacs
338     cd build-gromacs
339     cmake ..
340
341 You will see ``cmake`` report a sequence of results of tests and
342 detections done by the |Gromacs| build system. These are written to the
343 ``cmake`` cache, kept in ``CMakeCache.txt``. You can edit this file by
344 hand, but this is not recommended because you could make a mistake.
345 You should not attempt to move or copy this file to do another build,
346 because file paths are hard-coded within it. If you mess things up,
347 just delete this file and start again with ``cmake``.
348
349 If there is a serious problem detected at this stage, then you will see
350 a fatal error and some suggestions for how to overcome it. If you are
351 not sure how to deal with that, please start by searching on the web
352 (most computer problems already have known solutions!) and then
353 consult the gmx-users mailing list. There are also informational
354 warnings that you might like to take on board or not. Piping the
355 output of ``cmake`` through ``less`` or ``tee`` can be
356 useful, too.
357
358 Once ``cmake`` returns, you can see all the settings that were chosen
359 and information about them by using e.g. the curses interface
360
361 ::
362
363     ccmake ..
364
365 You can actually use ``ccmake`` (available on most Unix platforms,
366 if the curses library is supported) directly in the first step, but then
367 most of the status messages will merely blink in the lower part
368 of the terminal rather than be written to standard out. Most platforms
369 including Linux, Windows, and Mac OS X even have native graphical user interfaces for
370 ``cmake``, and it can create project files for almost any build environment
371 you want (including Visual Studio or Xcode).
372 Check out `running CMake`_ for
373 general advice on what you are seeing and how to navigate and change
374 things. The settings you might normally want to change are already
375 presented. You may make changes, then re-configure (using ``c``), so that it
376 gets a chance to make changes that depend on yours and perform more
377 checking. It may take several configuration passes to reach the desired
378 configuration, in particular if you need to resolve errors.
379
380 A key thing to consider here is the setting of
381 ``CMAKE_INSTALL_PREFIX``. You will need to be able to write to this
382 directory in order to install |Gromacs| later, and if you change your
383 mind later, changing it in the cache triggers a full re-build,
384 unfortunately. So if you do not have super-user privileges on your
385 machine, then you will need to choose a sensible location within your
386 home directory for your |Gromacs| installation. Even if you do have
387 super-user privileges, you should use them only for the installation
388 phase, and never for configuring, building, or running |Gromacs|!
389
390 When you have reached the desired configuration with ``ccmake``, the
391 build system can be generated by pressing ``g``.  This requires that the previous
392 configuration pass did not reveal any additional settings (if it did, you need
393 to configure once more with ``c``).  With ``cmake``, the build system is generated
394 after each pass that does not produce errors.
395
396 You cannot attempt to change compilers after the initial run of
397 ``cmake``. If you need to change, clean up, and start again.
398
399 .. _cmake options:
400
401 Using CMake command-line options
402 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
403 Once you become comfortable with setting and changing options, you may
404 know in advance how you will configure |Gromacs|. If so, you can speed
405 things up by invoking ``cmake`` and passing the various options at once
406 on the command line. This can be done by setting cache variable at the
407 cmake invocation using the ``-DOPTION=VALUE``; note that some
408 environment variables are also taken into account, in particular
409 variables like ``CC``, ``CXX``, ``FCC`` (which may be familiar to autoconf users).
410
411 For example, the following command line
412
413 ::
414
415     cmake .. -DGMX_GPU=ON -DGMX_MPI=ON -DCMAKE_INSTALL_PREFIX=/home/marydoe/programs
416
417 can be used to build with GPUs, MPI and install in a custom
418 location. You can even save that in a shell script to make it even
419 easier next time. You can also do this kind of thing with ``ccmake``,
420 but you should avoid this, because the options set with ``-D`` will not
421 be able to be changed interactively in that run of ``ccmake``.
422
423 SIMD support
424 ^^^^^^^^^^^^
425 |Gromacs| has extensive support for detecting and using the SIMD
426 capabilities of many modern HPC CPU architectures. If you are building
427 |Gromacs| on the same hardware you will run it on, then you don't need
428 to read more about this, unless you are getting configuration warnings
429 you do not understand. By default, the |Gromacs| build system will
430 detect the SIMD instruction set supported by the CPU architecture (on
431 which the configuring is done), and thus pick the best
432 available SIMD parallelization supported by |Gromacs|. The build system
433 will also check that the compiler and linker used also support the
434 selected SIMD instruction set and issue a fatal error if they
435 do not.
436
437 Valid values are listed below, and the applicable value with the
438 highest number in the list is generally the one you should choose:
439
440 1. ``None`` For use only on an architecture either lacking SIMD,
441    or to which |Gromacs| has not yet been ported and none of the
442    options below are applicable.
443 2. ``SSE2`` This SIMD instruction set was introduced in Intel
444    processors in 2001, and AMD in 2003. Essentially all x86
445    machines in existence have this, so it might be a good choice if
446    you need to support dinosaur x86 computers too.
447 3. ``SSE4.1`` Present in all Intel core processors since 2007,
448    but notably not in AMD magny-cours. Still, almost all recent
449    processors support this, so this can also be considered a good
450    baseline if you are content with portability between reasonably
451    modern processors.
452 4. ``AVX_128_FMA`` AMD bulldozer processors (2011) have this.
453    Unfortunately Intel and AMD have diverged the last few years;
454    If you want good performance on modern AMD processors
455    you have to use this since it also allows the reset of the
456    code to use AMD 4-way fused multiply-add instructions. The drawback
457    is that your code will not run on Intel processors at all.
458 5. ``AVX_256`` This instruction set is present on Intel processors
459    since Sandy Bridge (2011), where it is the best choice unless
460    you have an even more recent CPU that supports AVX2. While this
461    code will work on recent AMD processors, it is significantly
462    less efficient than the ``AVX_128_FMA`` choice above - do not be
463    fooled to assume that 256 is better than 128 in this case.
464 6. ``AVX2_256`` Present on Intel Haswell processors released in 2013,
465    and it will also enable Intel 3-way fused multiply-add instructions.
466    This code will not work on AMD CPUs.
467 7. ``IBM_QPX`` BlueGene/Q A2 cores have this.
468 8. ``Sparc64_HPC_ACE`` Fujitsu machines like the K computer have this.
469
470 The CMake configure system will check that the compiler you have
471 chosen can target the architecture you have chosen. mdrun will check
472 further at runtime, so if in doubt, choose the lowest setting you
473 think might work, and see what mdrun says. The configure system also
474 works around many known issues in many versions of common HPC
475 compilers. However, since the options also enable general compiler
476 flags for the platform in question, you can end up in situations
477 where e.g. an ``AVX_128_FMA`` binary will just crash on any
478 Intel machine, since the code will try to execute general illegal
479 instructions (inserted by the compiler) before mdrun gets to the
480 architecture detection routines.
481
482 A further ``GMX_SIMD=Reference`` option exists, which is a special
483 SIMD-like implementation written in plain C that developers can use
484 when developing support in |Gromacs| for new SIMD architectures. It is
485 not designed for use in production simulations, but if you are using
486 an architecture with SIMD support to which |Gromacs| has not yet been
487 ported, you may wish to try this option instead of the default
488 ``GMX_SIMD=None``, as it can often out-perform this when the
489 auto-vectorization in your compiler does a good job. And post on the
490 |Gromacs| mailing lists, because |Gromacs| can probably be ported for new
491 SIMD architectures in a few days.
492
493 CMake advanced options
494 ^^^^^^^^^^^^^^^^^^^^^^
495 The options that are displayed in the default view of ``ccmake`` are
496 ones that we think a reasonable number of users might want to consider
497 changing. There are a lot more options available, which you can see by
498 toggling the advanced mode in ``ccmake`` on and off with ``t``. Even
499 there, most of the variables that you might want to change have a
500 ``CMAKE_`` or ``GMX_`` prefix. There are also some options that will be
501 visible or not according to whether their preconditions are satisfied.
502
503 .. _search for libraries, headers or programs:
504
505 Helping CMake find the right libraries, headers, or programs
506 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
507 If libraries are installed in non-default locations their location can
508 be specified using the following environment variables:
509
510 * ``CMAKE_INCLUDE_PATH`` for header files
511 * ``CMAKE_LIBRARY_PATH`` for libraries
512 * ``CMAKE_PREFIX_PATH`` for header, libraries and binaries
513   (e.g. ``/usr/local``).
514
515 The respective ``include``, ``lib``, or ``bin`` is
516 appended to the path. For each of these variables, a list of paths can
517 be specified (on Unix, separated with ":"). Note that these are
518 enviroment variables (and not ``cmake`` command-line arguments) and in
519 a ``bash`` shell are used like:
520
521 ::
522
523     CMAKE_PREFIX_PATH=/opt/fftw:/opt/cuda cmake ..
524
525 Alternatively, these variables are also ``cmake`` options, so they can
526 be set like ``-DCMAKE_PREFIX_PATH=/opt/fftw:/opt/cuda``.
527
528 The ``CC`` and ``CXX`` environment variables are also useful
529 for indicating to ``cmake`` which compilers to use, which can be very
530 important for maximising |Gromacs| performance. Similarly,
531 ``CFLAGS``/``CXXFLAGS`` can be used to pass compiler
532 options, but note that these will be appended to those set by
533 |Gromacs| for your build platform and build type. You can customize
534 some of this with advanced options such as ``CMAKE_C_FLAGS``
535 and its relatives.
536
537 See also the page on `CMake environment variables`_.
538
539 Native GPU acceleration
540 ^^^^^^^^^^^^^^^^^^^^^^^
541 If you have the CUDA_ Toolkit installed, you can use ``cmake`` with:
542
543 ::
544
545     cmake .. -DGMX_GPU=ON -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda
546
547 (or whichever path has your installation). In some cases, you might
548 need to specify manually which of your C++ compilers should be used,
549 e.g. with the advanced option ``CUDA_HOST_COMPILER``.
550
551 By default, optimized code will be generated for CUDA architectures
552 supported by the nvcc compiler (and the |Gromacs| build system). 
553 However, it can be beneficial to manually pick the specific CUDA architecture(s)
554 to generate code for either to reduce compilation time (and binary size) or to
555 target a new architecture not yet supported by the |GROMACS| build system.
556 Setting the desired CUDA architecture(s) and virtual architecture(s)
557 can be done using the ``GMX_CUDA_TARGET_SM`` and ``GMX_CUDA_TARGET_COMPUTE``
558 variables, respectively. These take a semicolon delimited string with 
559 the two digit suffixes of CUDA (virtual) architectures names
560 (for details see the "Options for steering GPU code generation" section of the
561 nvcc man / help or Chapter 6. of the nvcc manual).
562
563 The GPU acceleration has been tested on AMD64/x86-64 platforms with
564 Linux, Mac OS X and Windows operating systems, but Linux is the
565 best-tested and supported of these. Linux running on ARM v7 (32 bit)
566 CPUs also works.
567
568 Static linking
569 ^^^^^^^^^^^^^^
570 Dynamic linking of the |Gromacs| executables will lead to a
571 smaller disk footprint when installed, and so is the default on
572 platforms where we believe it has been tested repeatedly and found to work.
573 In general, this includes Linux, Windows, Mac OS X and BSD systems.
574 Static binaries take much more space, but on some hardware and/or under
575 some conditions they are necessary, most commonly when you are running a parallel
576 simulation using MPI libraries (e.g. BlueGene, Cray).
577
578 * To link |Gromacs| binaries statically against the internal |Gromacs|
579   libraries, set ``-DBUILD_SHARED_LIBS=OFF``.
580 * To link statically against external (non-system) libraries as well,
581   the ``-DGMX_PREFER_STATIC_LIBS=ON`` option can be used. Note, that in
582   general ``cmake`` picks up whatever is available, so this option only
583   instructs ``cmake`` to prefer static libraries when both static and
584   shared are available. If no static version of an external library is
585   available, even when the aforementioned option is ``ON``, the shared
586   library will be used. Also note, that the resulting binaries will
587   still be dynamically linked against system libraries on platforms
588   where that is the default. To use static system libraries,
589   additional compiler/linker flags are necessary, e.g. ``-static-libgcc
590   -static-libstdc++``.
591 * To attempt to link a fully static binary set
592   ``-DGMX_BUILD_SHARED_EXE=OFF``. This will prevent CMake from explicitly
593   setting any dynamic linking flags. This option also sets
594   ``-DBUILD_SHARED_LIBS=OFF`` and ``-DGMX_PREFER_STATIC_LIBS=ON`` by
595   default, but the above caveats apply. For compilers which don't
596   default to static linking, the required flags have to be specified. On
597   Linux, this is usually ``CFLAGS=-static CXXFLAGS=-static``.
598
599 Portability aspects
600 ^^^^^^^^^^^^^^^^^^^
601 Here, we consider portability aspects related to CPU instruction sets,
602 for details on other topics like binaries with statical vs dynamic
603 linking please consult the relevant parts of this documentation or
604 other non-|Gromacs| specific resources.
605
606 A |Gromacs| build will normally not be portable, not even across
607 hardware with the same base instruction set like x86. Non-portable
608 hardware-specific optimizations are selected at configure-time, such
609 as the SIMD instruction set used in the compute-kernels. This
610 selection will be done by the build system based on the capabilities
611 of the build host machine or based on cross-compilation information
612 provided to ``cmake`` at configuration.
613
614 Often it is possible to ensure portability by choosing the least
615 common denominator of SIMD support, e.g. SSE2 for x86, and ensuring
616 the you use ``cmake -DGMX_USE_RDTSCP=off`` if any of the target CPU
617 architectures does not support the ``RDTSCP`` instruction.  However, we
618 discourage attempts to use a single |Gromacs| installation when the
619 execution environment is heterogeneous, such as a mix of AVX and
620 earlier hardware, because this will lead to programs (especially
621 mdrun) that run slowly on the new hardware. Building two full
622 installations and locally managing how to call the correct one
623 (e.g. using the module system) is the recommended
624 approach. Alternatively, as at the moment the |Gromacs| tools do not
625 make strong use of SIMD acceleration, it can be convenient to create
626 an installation with tools portable across different x86 machines, but
627 with separate mdrun binaries for each architecture. To achieve this,
628 one can first build a full installation with the
629 least-common-denominator SIMD instruction set, e.g. ``-DGMX_SIMD=SSE2``,
630 then build separate mdrun binaries for each architecture present in
631 the heterogeneous environment. By using custom binary and library
632 suffixes for the mdrun-only builds, these can be installed to the
633 same location as the "generic" tools installation.
634 `Building just the mdrun binary`_ is possible by setting the
635 ``-DGMX_BUILD_MDRUN_ONLY=ON`` option.
636
637 Linear algebra libraries
638 ^^^^^^^^^^^^^^^^^^^^^^^^
639 As mentioned above, sometimes vendor BLAS and LAPACK libraries
640 can provide performance enhancements for |Gromacs| when doing
641 normal-mode analysis or covariance analysis. For simplicity, the text
642 below will refer only to BLAS, but the same options are available
643 for LAPACK. By default, CMake will search for BLAS, use it if it
644 is found, and otherwise fall back on a version of BLAS internal to
645 |Gromacs|. The ``cmake`` option ``-DGMX_EXTERNAL_BLAS=on`` will be set
646 accordingly. The internal versions are fine for normal use. If you
647 need to specify a non-standard path to search, use
648 ``-DCMAKE_PREFIX_PATH=/path/to/search``. If you need to specify a
649 library with a non-standard name (e.g. ESSL on AIX or BlueGene), then
650 set ``-DGMX_BLAS_USER=/path/to/reach/lib/libwhatever.a``.
651
652 If you are using Intel MKL_ for FFT, then the BLAS and
653 LAPACK it provides are used automatically. This could be
654 over-ridden with ``GMX_BLAS_USER``, etc.
655
656 On Apple platforms where the Accelerate Framework is available, these
657 will be automatically used for BLAS and LAPACK. This could be
658 over-ridden with ``GMX_BLAS_USER``, etc.
659
660 Changing the names of |Gromacs| binaries and libraries
661 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
662 It is sometimes convenient to have different versions of the same
663 |Gromacs| programs installed. The most common use cases have been single
664 and double precision, and with and without MPI. This mechanism can
665 also be used to install side-by-side multiple versions of mdrun
666 optimized for different CPU architectures, as mentioned previously.
667
668 By default, |Gromacs| will suffix programs and libraries for such builds
669 with ``_d`` for double precision and/or ``_mpi`` for MPI (and nothing
670 otherwise). This can be controlled manually with ``GMX_DEFAULT_SUFFIX
671 (ON/OFF)``, ``GMX_BINARY_SUFFIX`` (takes a string) and ``GMX_LIBS_SUFFIX``
672 (also takes a string). For instance, to set a custom suffix for
673 programs and libraries, one might specify:
674
675 ::
676
677     cmake .. -DGMX_DEFAULT_SUFFIX=OFF -DGMX_BINARY_SUFFIX=_mod -DGMX_LIBS_SUFFIX=_mod
678
679 Thus the names of all programs and libraries will be appended with
680 ``_mod``.
681
682 Changing installation tree structure
683 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
684 By default, a few different directories under ``CMAKE_INSTALL_PREFIX`` are used
685 when when |Gromacs| is installed. Some of these can be changed, which is mainly
686 useful for packaging |Gromacs| for various distributions. The directories are
687 listed below, with additional notes about some of them. Unless otherwise noted,
688 the directories can be renamed by editing the installation paths in the main
689 CMakeLists.txt.
690
691 ``bin/``
692     The standard location for executables and some scripts.
693     Some of the scripts hardcode the absolute installation prefix, which needs
694     to be changed if the scripts are relocated.
695 ``include/gromacs/``
696     The standard location for installed headers.
697 ``lib/``
698     The standard location for libraries. The default depends on the system, and
699     is determined by CMake.
700     The name of the directory can be changed using ``GMX_LIB_INSTALL_DIR`` CMake
701     variable.
702 ``lib/pkgconfig/``
703     Information about the installed ``libgromacs`` library for ``pkg-config`` is
704     installed here.  The ``lib/`` part adapts to the installation location of the
705     libraries.  The installed files contain the installation prefix as absolute
706     paths.
707 ``share/cmake/``
708     CMake package configuration files are installed here.
709 ``share/gromacs/``
710     Various data files and some documentation go here.
711     The ``gromacs`` part can be changed using ``GMX_DATA_INSTALL_DIR``. Using this
712     CMake variable is the preferred way of changing the installation path for
713     ``share/gromacs/top/``, since the path to this directory is built into
714     ``libgromacs`` as well as some scripts, both as a relative and as an absolute
715     path (the latter as a fallback if everything else fails).
716 ``share/man/``
717     Installed man pages go here.
718
719 Compiling and linking
720 ---------------------
721 Once you have configured with ``cmake``, you can build |Gromacs| with ``make``.
722 It is expected that this will always complete successfully, and
723 give few or no warnings. The CMake-time tests |Gromacs| makes on the settings
724 you choose are pretty extensive, but there are probably a few cases we
725 have not thought of yet. Search the web first for solutions to
726 problems, but if you need help, ask on gmx-users, being sure to
727 provide as much information as possible about what you did, the system
728 you are building on, and what went wrong. This may mean scrolling back
729 a long way through the output of ``make`` to find the first error
730 message!
731
732 If you have a multi-core or multi-CPU machine with ``N``
733 processors, then using
734
735 ::
736
737     make -j N
738
739 will generally speed things up by quite a bit. Other build generator systems
740 supported by ``cmake`` (e.g. ``ninja``) also work well.
741
742 .. _building just the mdrun binary:
743
744 Building only mdrun
745 ^^^^^^^^^^^^^^^^^^^
746 Past versions of the build system offered "mdrun" and "install-mdrun"
747 targets (similarly for other programs too) to build and install only
748 the mdrun program, respectively. Such a build is useful when the
749 configuration is only relevant for mdrun (such as with
750 parallelization options for MPI, SIMD, GPUs, or on BlueGene or Cray),
751 or the length of time for the compile-link-install cycle is relevant
752 when developing.
753
754 This is now supported with the ``cmake`` option
755 ``-DGMX_BUILD_MDRUN_ONLY=ON``, which will build a cut-down version of
756 ``libgromacs`` and/or the mdrun program (according to whether shared
757 or static). Naturally, now ``make install`` installs only those
758 products. By default, mdrun-only builds will default to static linking
759 against |Gromacs| libraries, because this is generally a good idea for
760 the targets for which an mdrun-only build is desirable. If you re-use
761 a build tree and change to the mdrun-only build, then you will inherit
762 the setting for ``BUILD_SHARED_LIBS`` from the old build, and will be
763 warned that you may wish to manage ``BUILD_SHARED_LIBS`` yourself.
764
765 Installing |Gromacs|
766 --------------------
767 Finally, ``make install`` will install |Gromacs| in the
768 directory given in ``CMAKE_INSTALL_PREFIX``. If this is a system
769 directory, then you will need permission to write there, and you
770 should use super-user privileges only for ``make install`` and
771 not the whole procedure.
772
773 .. _getting access to GROMACS:
774
775 Getting access to |Gromacs| after installation
776 ----------------------------------------------
777 |Gromacs| installs the script ``GMXRC`` in the ``bin``
778 subdirectory of the installation directory
779 (e.g. ``/usr/local/gromacs/bin/GMXRC``), which you should source
780 from your shell:
781
782 ::
783
784     source /your/installation/prefix/here/bin/GMXRC
785
786 It will detect what kind of shell you are running and set up your
787 environment for using |Gromacs|. You may wish to arrange for your
788 login scripts to do this automatically; please search the web for
789 instructions on how to do this for your shell. 
790
791 Many of the |Gromacs| programs rely on data installed in the
792 ``share/gromacs`` subdirectory of the installation directory. By
793 default, the programs will use the environment variables set in the
794 ``GMXRC`` script, and if this is not available they will try to guess the
795 path based on their own location.  This usually works well unless you
796 change the names of directories inside the install tree. If you still
797 need to do that, you might want to recompile with the new install
798 location properly set, or edit the ``GMXRC`` script.
799
800 Testing |Gromacs| for correctness
801 ---------------------------------
802 Since 2011, the |Gromacs| development uses an automated system where
803 every new code change is subject to regression testing on a number of
804 platforms and software combinations. While this improves
805 reliability quite a lot, not everything is tested, and since we
806 increasingly rely on cutting edge compiler features there is
807 non-negligible risk that the default compiler on your system could
808 have bugs. We have tried our best to test and refuse to use known bad
809 versions in ``cmake``, but we strongly recommend that you run through
810 the tests yourself. It only takes a few minutes, after which you can
811 trust your build.
812
813 The simplest way to run the checks is to build |Gromacs| with
814 ``-DREGRESSIONTEST_DOWNLOAD``, and run ``make check``.
815 |Gromacs| will automatically download and run the tests for you.
816 Alternatively, you can download and unpack the GROMACS
817 regression test suite |gmx-regressiontests-package| tarball yourself
818 and use the advanced ``cmake`` option ``REGRESSIONTEST_PATH`` to
819 specify the path to the unpacked tarball, which will then be used for
820 testing. If the above does not work, then please read on.
821
822 The regression tests are also available from the download_ section.
823 Once you have downloaded them, unpack the tarball, source
824 ``GMXRC`` as described above, and run ``./gmxtest.pl all``
825 inside the regression tests folder. You can find more options
826 (e.g. adding ``double`` when using double precision, or
827 ``-only expanded`` to run just the tests whose names match
828 "expanded") if you just execute the script without options.
829
830 Hopefully, you will get a report that all tests have passed. If there
831 are individual failed tests it could be a sign of a compiler bug, or
832 that a tolerance is just a tiny bit too tight. Check the output files
833 the script directs you too, and try a different or newer compiler if
834 the errors appear to be real. If you cannot get it to pass the
835 regression tests, you might try dropping a line to the gmx-users
836 mailing list, but then you should include a detailed description of
837 your hardware, and the output of ``mdrun -version`` (which contains
838 valuable diagnostic information in the header).
839
840 A build with ``-DGMX_BUILD_MDRUN_ONLY`` cannot be tested with
841 ``make check`` from the build tree, because most of the tests
842 require a full build to run things like ``grompp``. To test such an
843 mdrun fully requires installing it to the same location as a normal
844 build of |Gromacs|, downloading the regression tests tarball manually
845 as described above, sourcing the correct ``GMXRC`` and running the
846 perl script manually. For example, from your |Gromacs| source
847 directory:
848
849 ::
850
851     mkdir build-normal
852     cd build-normal
853     cmake .. -DCMAKE_INSTALL_PREFIX=/your/installation/prefix/here
854     make -j 4
855     make install
856     cd ..
857     mkdir build-mdrun-only
858     cd build-mdrun-only
859     cmake .. -DGMX_MPI=ON -DGMX_GPU=ON -DGMX_BUILD_MDRUN_ONLY=ON -DCMAKE_INSTALL_PREFIX=/your/installation/prefix/here
860     make -j 4
861     make install
862     cd /to/your/unpacked/regressiontests
863     source /your/installation/prefix/here/bin/GMXRC
864     ./gmxtest.pl all -np 2
865
866 If your mdrun program has been suffixed in a non-standard way, then
867 the ``./gmxtest.pl -mdrun`` option will let you specify that name to the
868 test machinery. You can use ``./gmxtest.pl -double`` to test the
869 double-precision version. You can use ``./gmxtest.pl -crosscompiling``
870 to stop the test harness attempting to check that the programs can
871 be run. You can use ``./gmxtest.pl -mpirun srun`` if your command to
872 run an MPI program is called ``srun``.
873
874 The ``make check`` target also runs integration-style tests that may run
875 with MPI if ``GMX_MPI=ON`` was set. To make these work, you may need to
876 set the CMake variables ``MPIEXEC``, ``MPIEXEC_NUMPROC_FLAG``, ``NUMPROC``,
877 ``MPIEXEC_PREFLAGS`` and ``MPIEXEC_POSTFLAGS`` so that
878 ``mdrun-mpi-test_mpi`` would run on multiple ranks via the shell command
879
880     $ ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${NUMPROC} ${MPIEXEC_PREFLAGS} \
881           mdrun-mpi-test_mpi ${MPIEXEC_POSTFLAGS} -otherflags
882
883 Typically, one might use variable values ``mpirun``, ``-np``, ``2``, ``''``,
884 ``''`` respectively, in order to run on two ranks.
885
886
887 Testing |Gromacs| for performance
888 ---------------------------------
889 We are still working on a set of benchmark systems for testing
890 the performance of |Gromacs|. Until that is ready, we recommend that
891 you try a few different parallelization options, and experiment with
892 tools such as ``gmx tune_pme``.
893
894 Having difficulty?
895 ------------------
896 You are not alone - this can be a complex task! If you encounter a
897 problem with installing |Gromacs|, then there are a number of
898 locations where you can find assistance. It is recommended that you
899 follow these steps to find the solution:
900
901 1. Read the installation instructions again, taking note that you
902    have followed each and every step correctly.
903
904 2. Search the |Gromacs| webpage_ and users emailing list for information
905    on the error. Adding
906    ``site:https://mailman-1.sys.kth.se/pipermail/gromacs.org_gmx-users``
907    to a Google search may help filter better results.
908
909 3. Search the internet using a search engine such as Google.
910
911 4. Post to the |Gromacs| users emailing list gmx-users for
912    assistance. Be sure to give a full description of what you have
913    done and why you think it did not work. Give details about the
914    system on which you are installing.  Copy and paste your command
915    line and as much of the output as you think might be relevant -
916    certainly from the first indication of a problem. In particular,
917    please try to include at least the header from the mdrun logfile,
918    and preferably the entire file.  People who might volunteer to help
919    you do not have time to ask you interactive detailed follow-up
920    questions, so you will get an answer faster if you provide as much
921    information as you think could possibly help. High quality bug
922    reports tend to receive rapid high quality answers.
923
924 Special instructions for some platforms
925 =======================================
926
927 Building on Windows
928 -------------------
929 Building on Windows using native compilers is rather similar to
930 building on Unix, so please start by reading the above. Then, download
931 and unpack the |Gromacs| source archive. Make a folder in which to do
932 the out-of-source build of |Gromacs|. For example, make it within the
933 folder unpacked from the source archive, and call it ``build-gromacs``.
934
935 For CMake, you can either use the graphical user interface provided on
936 Windows, or you can use a command line shell with instructions similar
937 to the UNIX ones above. If you open a shell from within your IDE
938 (e.g. Microsoft Visual Studio), it will configure the environment for
939 you, but you might need to tweak this in order to get either a 32-bit
940 or 64-bit build environment. The latter provides the fastest
941 executable. If you use a normal Windows command shell, then you will
942 need to either set up the environment to find your compilers and
943 libraries yourself, or run the ``vcvarsall.bat`` batch script provided
944 by MSVC (just like sourcing a bash script under Unix).
945
946 With the graphical user interface, you will be asked about what
947 compilers to use at the initial configuration stage, and if you use
948 the command line they can be set in a similar way as under UNIX. You
949 will probably make your life easier and faster by using the new
950 facility to download and install FFTW automatically.
951
952 For the build, you can either load the generated solutions file into
953 e.g. Visual Studio, or use the command line with ``cmake --build`` so
954 the right tools get used.
955
956 Building on Cray
957 ----------------
958 |Gromacs| builds mostly out of the box on modern Cray machines, but
959
960 * you may need to specify the use of static binaries
961   with ``-DGMX_BUILD_SHARED_EXE=off``,
962 * you may need to set the F77 environmental variable to ``ftn`` when
963   compiling FFTW,
964
965 Building on BlueGene
966 --------------------
967
968 BlueGene/Q
969 ^^^^^^^^^^
970 There is currently native acceleration on this platform for the Verlet
971 cut-off scheme. There are no plans to provide accelerated kernels for
972 the group cut-off scheme, but the default plain C kernels will work
973 (slowly).
974
975 Only static linking with XL compilers is supported by |Gromacs|. Dynamic
976 linking would be supported by the architecture and |Gromacs|, but has no
977 advantages other than disk space, and is generally discouraged on
978 BlueGene for performance reasons.
979
980 Computation on BlueGene floating-point units is always done in
981 double-precision. However, mixed-precision builds of |Gromacs| are still
982 normal and encouraged since they use cache more efficiently. The
983 BlueGene hardware automatically converts values stored in single
984 precision in memory to double precision in registers for computation,
985 converts the results back to single precision correctly, and does so
986 for no additional cost. As with other platforms, doing the whole
987 computation in double precision normally shows no improvement in
988 accuracy and costs twice as much time moving memory around.
989
990 You need to arrange for FFTW to be installed correctly, following the
991 above instructions.
992
993 MPI wrapper compilers should be used for compiling and linking. Both
994 xlc and bgclang are supported back ends - either might prove to be
995 faster in practice. The MPI wrapper compilers can make it awkward to
996 attempt to use IBM's optimized BLAS/LAPACK called ESSL (see the
997 section on `linear algebra libraries`_. Since mdrun is the only part
998 of |Gromacs| that should normally run on the compute nodes, and there is
999 nearly no need for linear algebra support for mdrun, it is recommended
1000 to use the |Gromacs| built-in linear algebra routines - this is never
1001 a problem for normal simulations.
1002
1003 The recommended configuration is to use
1004
1005 ::
1006
1007     cmake .. -DCMAKE_C_COMPILER=mpicc \
1008              -DCMAKE_CXX_COMPILER=mpicxx \
1009              -DCMAKE_TOOLCHAIN_FILE=Platform/BlueGeneQ-static-XL-CXX.cmake \
1010              -DCMAKE_PREFIX_PATH=/your/fftw/installation/prefix \
1011              -DGMX_MPI=ON \
1012              -DGMX_BUILD_MDRUN_ONLY=ON
1013     make
1014     make install
1015
1016 which will build a statically-linked MPI-enabled mdrun for the compute
1017 nodes. Or use the Platform/BlueGeneQ-static-bgclang-cxx
1018 toolchain file if compiling with bgclang. Otherwise, |Gromacs| default configuration
1019 behaviour applies.
1020
1021 It is possible to configure and make the remaining |Gromacs| tools with
1022 the compute-node toolchain, but as none of those tools are MPI-aware
1023 and could then only run on the compute nodes, this would not normally
1024 be useful. Instead, these should be planned to run on the login node,
1025 and a separate |Gromacs| installation performed for that using the login
1026 node's toolchain - not the above platform file, or any other
1027 compute-node toolchain.
1028
1029 Note that only the MPI build is available for the compute-node
1030 toolchains. The |Gromacs| thread-MPI or no-MPI builds are not useful at
1031 all on BlueGene/Q.
1032
1033 BlueGene/P
1034 ^^^^^^^^^^
1035 There is currently no SIMD support on this platform and no plans to
1036 add it. The default plain C kernels will work.
1037
1038 Fujitsu PRIMEHPC
1039 ^^^^^^^^^^^^^^^^
1040 This is the architecture of the K computer, which uses Fujitsu
1041 Sparc64VIIIfx chips. On this platform, |Gromacs| has
1042 accelerated group kernels using the HPC-ACE instructions, no
1043 accelerated Verlet kernels, and a custom build toolchain. Since this
1044 particular chip only does double precision SIMD, the default setup
1045 is to build |Gromacs| in double. Since most users only need single, we have added
1046 an option GMX_RELAXED_DOUBLE_PRECISION to accept single precision square root
1047 accuracy in the group kernels; unless you know that you really need 15 digits
1048 of accuracy in each individual force, we strongly recommend you use this. Note
1049 that all summation and other operations are still done in double.
1050
1051 The recommended configuration is to use
1052
1053 ::
1054
1055     cmake .. -DCMAKE_TOOLCHAIN_FILE=Toolchain-Fujitsu-Sparc64-mpi.cmake \
1056              -DCMAKE_PREFIX_PATH=/your/fftw/installation/prefix \
1057              -DCMAKE_INSTALL_PREFIX=/where/gromacs/should/be/installed \
1058              -DGMX_MPI=ON \
1059              -DGMX_BUILD_MDRUN_ONLY=ON \
1060              -DGMX_RELAXED_DOUBLE_PRECISION=ON
1061     make
1062     make install
1063
1064 Intel Xeon Phi
1065 ^^^^^^^^^^^^^^
1066 |Gromacs| has preliminary support for Intel Xeon Phi. Only symmetric
1067 (aka native) mode is supported. |Gromacs| is functional on Xeon Phi, but
1068 it has so far not been optimized to the same level as other
1069 architectures have. The performance depends among other factors on the
1070 system size, and for
1071 now the performance might not be faster than CPUs. Building for Xeon
1072 Phi works almost as any other Unix. See the instructions above for
1073 details. The recommended configuration is
1074
1075 ::
1076
1077     cmake .. -DCMAKE_TOOLCHAIN_FILE=Platform/XeonPhi
1078     make
1079     make install
1080
1081 Tested platforms
1082 ================
1083 While it is our best belief that |Gromacs| will build and run pretty
1084 much everywhere, it is important that we tell you where we really know
1085 it works because we have tested it. We do test on Linux, Windows, and
1086 Mac with a range of compilers and libraries for a range of our
1087 configuration options. Every commit in our git source code repository
1088 is currently tested on x86 with gcc versions ranging from 4.4 through
1089 4.7, and versions 12 and 13 of the Intel compiler as well as Clang
1090 version 3.1 through 3.4. For this, we use a variety of GNU/Linux
1091 flavors and versions as well as recent version of Mac OS X.  Under
1092 Windows we test both MSVC and the Intel compiler. For details, you can
1093 have a look at the `continuous integration server used by GROMACS`_,
1094 which runs Jenkins_.
1095
1096 We test irregularly on ARM v7, BlueGene/Q, Cray, Fujitsu PRIMEHPC, Google
1097 Native Client and other environments, and with other compilers and
1098 compiler versions, too.