Update CMake documentation

This commit is contained in:
Richard Berger 2019-08-02 17:04:59 -04:00
parent de366c27e2
commit eb7fa1b6cb
7 changed files with 714 additions and 109 deletions

View File

@ -33,12 +33,17 @@ tasks, act as a reference and provide examples of typical use cases.
* [Package-Specific Configuration Options](#package-specific-configuration-options)
* [KSPACE Package](#kspace-package)
* [MKL](#mkl)
* [FFTW2](#fftw2)
* [FFTW3](#fftw3)
* [BLAS](#blas)
* [LAPACK](#lapack)
* [PYTHON Package](#python-package)
* [GPU Package](#gpu-package)
* [MESSAGE Package](#message-package)
* [MSCG Package](#mscg-package)
* [VORONOI Package](#voronoi-package)
* [USER-LATTE Package](#user-latte-package)
* [USER-PLUMED Package](#user-plumed-package)
* [USER-SCAFACOS Package](#user-scafacos-package)
* [USER-SMD Package](#user-smd-package)
* [Optional Features](#optional-features)
* [zlib support](#zlib-support)
@ -50,8 +55,6 @@ tasks, act as a reference and provide examples of typical use cases.
* [Building with GNU Compilers](#building-with-gnu-compilers)
* [Building with Intel Compilers](#building-with-intel-compilers)
* [Building with LLVM/Clang Compilers](#building-with-llvmclang-compilers)
* [Examples](#examples)
## Quick Start for the Impatient
If you want to skip ahead and just run the compilation using `cmake`, please
@ -205,8 +208,10 @@ cmake -C ../cmake/presets/all_on.cmake -C ../cmake/presets/nolib.cmake -D PKG_GP
<td>Controls if debugging symbols are added to the generated binaries</td>
<td>
<dl>
<dt><code>Release</code> (default)</dt>
<dt><code>RelWithDebInfo (default)</code></dt>
<dt><code>Release</code></dt>
<dt><code>Debug</code></dt>
<dt><code>MinSizeRel</code></dt>
</dl>
</td>
</tr>
@ -249,6 +254,16 @@ cmake -C ../cmake/presets/all_on.cmake -C ../cmake/presets/nolib.cmake -D PKG_GP
</dl>
</td>
</tr>
<tr>
<td><code>LAMMPS_LONGLONG_TO_LONG</code></td>
<td>Workaround if your system or MPI version does not recognize <code>long long</code> data types</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>LAMMPS_MEMALIGN</code></td>
<td>controls the alignment of blocks of memory allocated by LAMMPS</td>
@ -319,8 +334,8 @@ cmake -C ../cmake/presets/all_on.cmake -C ../cmake/presets/nolib.cmake -D PKG_GP
</td>
</tr>
<tr>
<td><code>LAMMPS_LONGLONG_TO_LONG</code></td>
<td>Workaround if your system or MPI version does not recognize <code>long long</code> data types</td>
<td><code>BUILD_TOOLS</code></td>
<td>control whether to build LAMMPS tools</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
@ -561,23 +576,6 @@ cmake -C ../cmake/presets/all_on.cmake -C ../cmake/presets/nolib.cmake -D PKG_GP
</dl>
</td>
</tr>
<tr>
<td><code>PKG_MEAM</code></td>
<td>
<p>A pair style for the modified embedded atom (MEAM) potential.</p>
<p><strong>Please note that the MEAM package has been superseded by the USER-MEAMC package,
which is a direct translation of the MEAM package to C++. USER-MEAMC contains
additional optimizations making it run faster than MEAM on most machines, while
providing the identical features and USER interface.</strong></p>
</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>PKG_MISC</code></td>
<td>
@ -634,21 +632,6 @@ providing the identical features and USER interface.</strong></p>
</dl>
</td>
</tr>
<tr>
<td><code>PKG_REAX</code></td>
<td>
A pair style which wraps a Fortran library which implements the ReaxFF
potential, which is a universal reactive force field. See the USER-REAXC
package for an alternate implementation in C/C++. Also a fix reax/bonds
command for monitoring molecules as bonds are created and destroyed.
</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>PKG_REPLICA</code></td>
<td>
@ -695,6 +678,16 @@ providing the identical features and USER interface.</strong></p>
</dl>
</td>
</tr>
<tr>
<td><code>PKG_SPIN</code></td>
<td>Model atomic magnetic spins classically, coupled to atoms moving in the usual manner via MD. Various pair, fix, and compute styles.</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>PKG_SNAP</code></td>
<td>
@ -757,6 +750,16 @@ providing the identical features and USER interface.</strong></p>
</dl>
</td>
</tr>
<tr>
<td><code>PKG_MESSAGE</code></td>
<td>Commands to use LAMMPS as either a client or server and couple it to another application.</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>PKG_MSCG</code></td>
<td>
@ -811,6 +814,18 @@ providing the identical features and USER interface.</strong></p>
</dl>
</td>
</tr>
<tr>
<td><code>PKG_VORONOI</code></td>
<td>
A compute command which calculates the Voronoi tesselation of a collection of atoms by wrapping the Voro++ library. This can be used to calculate the local volume or each atoms or its near neighbors.
</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
</tbody>
</table>
@ -825,6 +840,16 @@ providing the identical features and USER interface.</strong></p>
</tr>
</thead>
<tbody>
<tr>
<td><code>PKG_USER-ADIOS</code></td>
<td>ADIOS is a high-performance I/O library. This package implements the dump “atom/adios” and dump “custom/adios” commands to write data using the ADIOS library.</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>PKG_USER-ATC</code></td>
<td>
@ -853,6 +878,18 @@ providing the identical features and USER interface.</strong></p>
</dl>
</td>
</tr>
<tr>
<td><code>PKG_USER-BOCS</code></td>
<td>
This package provides fix bocs, a modified version of fix npt which includes the pressure correction to the barostat as outlined in: N. J. H. Dunn and W. G. Noid, “Bottom-up coarse-grained models that accurately describe the structure, pressure, and compressibility of molecular liquids,” J. Chem. Phys. 143, 243148 (2015).
</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>PKG_USER-CGDNA</code></td>
<td>
@ -1142,6 +1179,30 @@ providing the identical features and USER interface.</strong></p>
</dl>
</td>
</tr>
<tr>
<td><code>PKG_USER-PLUMED</code></td>
<td>
The fix plumed command allows you to use the PLUMED free energy plugin for molecular dynamics to analyze and bias your LAMMPS trajectory on the fly. The PLUMED library is called from within the LAMMPS input script by using the <code>fix plumed</code> command.
</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>PKG_USER-PTM</code></td>
<td>
A <code>compute ptm/atom</code> command that calculates local structure characterization using the Polyhedral Template Matching methodology.
</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>PKG_USER-QTB</code></td>
<td>
@ -1197,6 +1258,33 @@ providing the identical features and USER interface.</strong></p>
</dl>
</td>
</tr>
<tr>
<td><code>PKG_USER-SCAFACOS</code></td>
<td>
A KSpace style which wraps the ScaFaCoS Coulomb solver library to compute long-range Coulombic interactions.
</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>PKG_USER-SDPD</code></td>
<td>
A pair style for smoothed dissipative particle dynamics (SDPD), which is an
extension of smoothed particle hydrodynamics (SPH) to mesoscale where thermal
fluctuations are important (see the USER-SPH package). Also two fixes for
moving and rigid body integration of SPH/SDPD particles (particles of
<code>atom_style meso</code>).</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>PKG_USER-SMD</code></td>
<td>
@ -1280,6 +1368,23 @@ providing the identical features and USER interface.</strong></p>
</dl>
</td>
</tr>
<tr>
<td><code>PKG_USER-YAFF</code></td>
<td>
Some potentials that are also implemented in the Yet Another Force Field (YAFF) code.
The expressions and their use are discussed in the following papers:
<ul>
<li><a href="http://dx.doi.org/10.1002/jcc.23877" target="_blank">Vanduyfhuys et al., J. Comput. Chem., 36 (13), 1015-1027 (2015)</a></li>
<li><a href="http://dx.doi.org/10.1002/jcc.25173" target="_blank">Vanduyfhuys et al., J. Comput. Chem., 39 (16), 999-1011 (2018)</a></li>
</ul>
</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
</tbody>
</table>
@ -1300,14 +1405,27 @@ providing the identical features and USER interface.</strong></p>
<td><code>FFT</code></td>
<td>
<p>FFT library for KSPACE package</p>
<p>If either MKL or FFTW is selected <code>cmake</code> will try to locate these libraries automatically. To control which one should be used please see the options below for each FFT library.</p>
<p>If either MKL or FFTW is selected <code>cmake</code> will try to locate
these libraries automatically. To control which one should be used please see
the options below for each FFT library. Otherwise it will default to KISS
FFT.</p>
</td>
<td>
<dl>
<dt><code>KISS</code></dt>
<dt><code>FFTW3</code></dt>
<dt><code>FFTW2</code></dt>
<dt><code>MKL</code></dt>
<dt><code>KISS</code> (default)</dt>
</dl>
</td>
</tr>
<tr>
<td><code>FFT_SINGLE</code></td>
<td>Use single-precision floating-point in FFT</td>
<td>
<dl>
<dt><code>off</code> (default = double precision)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
@ -1325,60 +1443,6 @@ providing the identical features and USER interface.</strong></p>
</tbody>
</table>
### MKL
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>MKL_INCLUDE_DIRS</code></td>
<td></td>
<td>
</td>
</tr>
<tr>
<td><code>MKL_LIBRARIES</code></td>
<td></td>
<td>
</td>
</tr>
</tbody>
</table>
TODO static vs dynamic linking
### FFTW2
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>FFTW2_INCLUDE_DIRS</code></td>
<td></td>
<td>
</td>
</tr>
<tr>
<td><code>FFTW2_LIBRARIES</code></td>
<td></td>
<td>
</td>
</tr>
</tbody>
</table>
### FFTW3
<table>
@ -1392,24 +1456,57 @@ TODO static vs dynamic linking
<tbody>
<tr>
<td><code>FFTW3_INCLUDE_DIRS</code></td>
<td></td>
<td>path to FFTW3 include files</td>
<td>
</td>
</tr>
<tr>
<td><code>FFTW3_LIBRARIES</code></td>
<td></td>
<td>list of paths to FFTW3 libraries</td>
<td>
</td>
</tr>
</tbody>
</table>
### MKL
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>MKL_INCLUDE_DIRS</code></td>
<td>path to MKL include files</td>
<td>
</td>
</tr>
<tr>
<td><code>MKL_LIBRARIES</code></td>
<td>list of paths to MKL libraries</td>
<td>
</td>
</tr>
</tbody>
</table>
### BLAS
See [FindBLAS documentation](https://cmake.org/cmake/help/latest/module/FindBLAS.html)
### LAPACK
TODO
See [FindLAPACK documentation](https://cmake.org/cmake/help/latest/module/FindLAPACK.html)
### PYTHON Package
See [FindPYTHON documentation](https://cmake.org/cmake/help/latest/module/FindPython.html)
### USER-INTEL Package
<table>
@ -1499,10 +1596,11 @@ target API.
<td>
<dl>
<dt><code>sm_20</code> (Fermi)</dt>
<dt><code>sm_30</code> (Kepler)</dt>
<dt><code>sm_30</code> (Kepler) (default)</dt>
<dt><code>sm_50</code> (Maxwell)</dt>
<dt><code>sm_60</code> (Pascal)</dt>
<dt><code>sm_70</code> (Volta)</dt>
<dt><code>sm_75</code> (Turing)</dt>
</dl>
</td>
</tr>
@ -1534,13 +1632,14 @@ target API.
</tbody>
</table>
### VORONOI Package
### KIM Package
TODO
Requires installation of the KIM library with API v2
### USER-SMD Package
Requires a Eigen3 installation
If `DOWNLOAD_KIM` is set, the KIM library will be downloaded and built inside
the CMake build directory. If the KIM library is already on your system (in a
location CMake cannot find it), set the `PKG_CONFIG_PATH` environment variable
so that `libkim-api` can be found.
<table>
<thead>
@ -1551,9 +1650,323 @@ Requires a Eigen3 installation
</tr>
</thead>
<tbody>
<tr>
<td><code>DOWNLOAD_KIM</code></td>
<td>Download KIM API v2 and compile it as part of the build.</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
</tbody>
</table>
### MESSAGE Package
This package can optionally include support for messaging via sockets, using the open-source [ZeroMQ library](http://zeromq.org/), which must be installed on your system.
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>MESSAGE_ZMQ</code></td>
<td>Build with ZeroMQ support</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>ZMQ_LIBRARY</code></td>
<td>
ZMQ library file (only needed if at custom location)
</td>
<td>
</td>
</tr>
<tr>
<td><code>ZMG_INCLUDE_DIR</code></td>
<td>
Provide include directory of existing ZMQ installation (only needed if at custom location)
</td>
<td>
</td>
</tr>
</tbody>
</table>
### MSCG Package
Requires installation of the MSCG library
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>DOWNLOAD_MSCG</code></td>
<td>Download MSCG and compile it as part of the build</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>MSCG_LIBRARY</code></td>
<td>
MSCG library file (only needed if at custom location)
</td>
<td>
</td>
</tr>
<tr>
<td><code>MSCG_INCLUDE_DIR</code></td>
<td>
Provide include directory of existing MSCG installation (only needed if at custom location)
</td>
<td>
</td>
</tr>
</tbody>
</table>
### VORONOI Package
Requires installation of the Voro++ library
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>DOWNLOAD_VORO</code></td>
<td>Download Voro++ and compile it as part of the build</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>VORO_LIBRARY</code></td>
<td>
Voro++ library file (only needed if at custom location)
</td>
<td>
</td>
</tr>
<tr>
<td><code>VORO_INCLUDE_DIR</code></td>
<td>
Provide include directory of existing Voro++ installation (only needed if at custom location)
</td>
<td>
</td>
</tr>
</tbody>
</table>
### USER-LATTE Package
Requires installation of the LATTE library
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>DOWNLOAD_LATTE</code></td>
<td>Download LATTE and compile it as part of the build</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>LATTE_LIBRARY</code></td>
<td>
LATTE library file (only needed if at custom location)
</td>
<td>
</td>
</tr>
</tbody>
</table>
### USER-PLUMED Package
Requires installation of the PLUMED library
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>DOWNLOAD_PLUMED</code></td>
<td>Download PLUMED and compile it as part of the build</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>PLUMED_MODE</code></td>
<td>
Determines the linkage mode for the PLUMED library.
</td>
<td>
<dl>
<dt><code>static</code> (default)</dt>
<dt><code>shared</code></dt>
<dt><code>runtime</code></dt>
</dl>
</td>
</tr>
</tbody>
</table>
### USER-LATTE Package
Requires installation of the LATTE library
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>DOWNLOAD_LATTE</code></td>
<td>Download LATTE and compile it as part of the build</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>LATTE_LIBRARY</code></td>
<td>
LATTE library file (only needed if at custom location)
</td>
<td>
</td>
</tr>
</tbody>
</table>
### USER-SMD Package
Requires installation of the Eigen3 library
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>DOWNLOAD_EIGEN3</code></td>
<td>Download Eigen3 and compile it as part of the build</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>EIGEN3_INCLUDE_DIR</code></td>
<td></td>
<td>
Provide include directory of existing Eigen3 installation (only needed if at custom location)
</td>
<td>
</td>
</tr>
</tbody>
</table>
### USER-SCAFACOS Package
To build with this package, you must download and build the [ScaFaCoS Coulomb solver library](http://www.scafacos.de/)
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>DOWNLOAD_SCAFACOS</code></td>
<td>Download SCAFACOS and compile it as part of the build</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>SCAFACOS_LIBRARY</code></td>
<td>
SCAFACOS library file (only needed if at custom location)
</td>
<td>
</td>
</tr>
<tr>
<td><code>SCAFACOS_INCLUDE_DIR</code></td>
<td>
SCAFACOS include directory (only needed if at custom location)
</td>
<td>
</td>
</tr>
@ -1791,5 +2204,82 @@ cmake -D CMAKE_C_COMPILER=icc -D CMAKE_CXX_COMPILER=icpc -D CMAKE_Fortran_COMPIL
cmake -D CMAKE_C_COMPILER=clang -D CMAKE_CXX_COMPILER=clang++ -D CMAKE_Fortran_COMPILER=flang ../cmake
```
## LAMMPS Developer Options
## Examples
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
<th>Values</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>ENABLE_TESTING</code></td>
<td>Control wheather to add tests via CTest</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>LAMMPS_TESTING_SOURCE_DIR</code></td>
<td>Custom location of lammps-testing repository (optional). If not specified it will download it via Git</td>
<td>
</td>
</tr>
<tr>
<td><code>LAMMPS_TESTING_GIT_TAG</code></td>
<td>If lammps-testing repository is cloned, this is the tag/commit that will be checked out</td>
<td>
<dl>
<dt><code>master</code> (default)</dt>
</dl>
</td>
</tr>
<tr>
<td><code>ENABLE_COVERAGE</code></td>
<td>Enables code coverage support via gcov and adds a gcovr build target to generate a coverage report.</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>ENABLE_SANITIZE_ADDRESS</code></td>
<td>Enables Address Sanitizer support when compiling using GCC or Clang for detecting memory leaks in binaries while running them. See https://clang.llvm.org/docs/AddressSanitizer.html</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>ENABLE_SANITIZE_UNDEFINED</code></td>
<td>Enables Undefined Behavior Sanitizer support when compiling using GCC or Clang for detecting code that is running into undefined behavior of the language. See https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
<tr>
<td><code>ENABLE_SANITIZE_THREAD</code></td>
<td>Enables Thread Sanitizer support when compiling using GCC or Clang for detecting data races in binaries while running them. See https://clang.llvm.org/docs/ThreadSanitizer.html</td>
<td>
<dl>
<dt><code>off</code> (default)</dt>
<dt><code>on</code></dt>
</dl>
</td>
</tr>
</tbody>
</table>

View File

@ -29,6 +29,7 @@ as described on the "Install"_Install.html doc page.
Build_package
Build_extras
Build_windows
Build_development
END_RST -->

View File

@ -310,6 +310,30 @@ current LAMMPS version (HTML and PDF files), from the website
:line
Build LAMMPS tools :h4,link(tools)
Some tools described in "Auxiliary tools"_Tools.html can be built directly
using CMake or Make.
[CMake variable]:
-D BUILD_TOOLS=value # yes or no (default) :pre
The generated binaries will also become part of the LAMMPS installation (see below)
[Traditional make]:
cd lammps/tools
make all # build all binaries of tools
make binary2txt # build only binary2txt tool
make chain # build only chain tool
make micelle2d # build only micelle2d tool
make thermo_extract # build only thermo_extract tool
:pre
:line
Install LAMMPS after a build :h4,link(install)
After building LAMMPS, you may wish to copy the LAMMPS executable of

View File

@ -120,7 +120,7 @@ The argument can be preceeded or followed by various CMake
command-line options. Several useful ones are:
-D CMAKE_INSTALL_PREFIX=path # where to install LAMMPS executable/lib if desired
-D CMAKE_BUILD_TYPE=type # type = Release or Debug
-D CMAKE_BUILD_TYPE=type # type = RelWithDebInfo (default), Release, MinSizeRel, or Debug
-G output # style of output CMake generates
-DVARIABLE=value # setting for a LAMMPS feature to enable
-D VARIABLE=value # ditto, but cannot come after CMakeLists.txt dir

View File

@ -0,0 +1,86 @@
"Higher level section"_Build.html - "LAMMPS WWW Site"_lws - "LAMMPS
Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Commands_all.html)
:line
Development options (CMake only) :h3
The CMake build of LAMMPS has a few extra options which are useful during
development, testing or debugging.
:line
Verify compilation flags :h4,link(compilation)
Sometimes it is necessary to verify the complete sequence of compilation flags
generated by the CMake build. To enable a more verbose output during
compilation you can use the following option.
-D CMAKE_VERBOSE_MAKEFILE=value # value = no (default) or yes :pre
Another way of doing this without reconfiguration is calling make with variable VERBOSE set to 1:
make VERBOSE=1 :pre
:line
Address, Undefined Behavior, and Thread Sanitizer Support :h4,link(sanitizer)
Compilers such as GCC and Clang support generating binaries which use different
sanitizers to detect problems in code during run-time. They can detect "memory leaks"_https://clang.llvm.org/docs/AddressSanitizer.html,
code that runs into "undefined behavior"_https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html of the
language and "data races"_https://clang.llvm.org/docs/ThreadSanitizer.html in threaded code.
The following settings allow you enable these features if your compiler supports
it. Please note that they come with a performance hit. However, they are
usually faster than using tools like Valgrind.
-D ENABLE_SANITIZE_ADDRESS=value # enable Address Sanitizer, value = no (default) or yes
-D ENABLE_SANITIZE_UNDEFINED=value # enable Undefined Behaviour Sanitizer, value = no (default) or yes
-D ENABLE_SANITIZE_THREAD=value # enable Thread Sanitizer, value = no (default) or yes
:pre
:line
Code Coverage and Testing :h4,link(testing)
We do extensive regression testing of the LAMMPS code base on a continuous
basis. Some of the logic to do this has been added to the CMake build so
developers can run the tests directly on their workstation.
NOTE: this is incomplete and only represents a small subset of tests that we run
-D ENABLE_TESTING=value # enable simple run tests of LAMMPS, value = no (default) or yes
-D LAMMPS_TESTING_SOURCE_DIR=path # path to lammps-testing repository (option if in custom location)
-D LAMMPS_TESTING_GIT_TAG=value # version of lammps-testing repository that should be used, value = master (default) or custom git commit or tag
:pre
If you enable testing in the CMake build it will create an additional target called "test". You can run them with:
make test
:pre
The test cases used come from the lammps-testing repository. They are
derivatives of the examples folder with some modifications to make the run
faster.
You can also collect code coverage metrics while running the tests by enabling
coverage support during building.
-D ENABLE_COVERAGE=value # enable coverage measurements, value = no (default) or yes :pre
This will also add the following targets to generate coverage reports after running the LAMMPS executable:
make test # run tests first!
make gen_coverage_html # generate coverage report in HTML format
make gen_coverage_xml # generate coverage report in XML format
:pre
These reports require GCOVR to be installed. The easiest way to do this to install it via pip:
pip install git+https://github.com/gcovr/gcovr.git :pre
:pre

View File

@ -88,7 +88,7 @@ which GPU hardware to build for.
# generic (default) or intel (Intel CPU) or fermi, kepler, cypress (NVIDIA)
-D GPU_ARCH=value # primary GPU hardware choice for GPU_API=cuda
# value = sm_XX, see below
# default is Cuda-compiler dependent, but typically sm_20
# default is sm_30
-D CUDPP_OPT=value # optimization setting for GPU_API=cuda
# enables CUDA Performance Primitives Optimizations
# value = yes (default) or no
@ -354,6 +354,9 @@ be installed on your system.
[CMake build]:
-D MESSAGE_ZMQ=value # build with ZeroMQ support, value = no (default) or yes
-D ZMQ_LIBRARY=path # ZMQ library file (only needed if a custom location)
-D ZMQ_INCLUDE_DIR=path # ZMQ include directory (only needed if a custom location)
:pre
[Traditional make]:
@ -366,6 +369,7 @@ simply invoke the lib/message/Install.py script with the specified args:
make lib-message # print help message
make lib-message args="-m -z" # build with MPI and socket (ZMQ) support
make lib-message args="-s" # build as serial lib with no ZMQ support
:pre
The build should produce two files: lib/message/cslib/src/libmessage.a
and lib/message/Makefile.lammps. The latter is copied from an

View File

@ -1,4 +1,4 @@
"Higher level section"_Packages.html - "LAMMPS WWW Site"_lws - "LAMMPS
tion"_Packages.html - "LAMMPS WWW Site"_lws - "LAMMPS
Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
@ -1191,7 +1191,7 @@ USER-PLUMED package :link(PKG-USER-PLUMED),h4
The fix plumed command allows you to use the PLUMED free energy plugin
for molecular dynamics to analyze and bias your LAMMPS trajectory on
the fly. The PLUMED library is called from within the LAMMPS input
script by using the "fix plumed _fix_plumed.html command.
script by using the "fix plumed"_fix_plumed.html command.
[Authors:] The "PLUMED library"_#PLUMED is written and maintained by
Massimilliano Bonomi, Giovanni Bussi, Carlo Camiloni and Gareth