1.. index:: suffix
2
3suffix command
4==============
5
6Syntax
7""""""
8
9.. parsed-literal::
10
11   suffix style args
12
13* style = *off* or *on* or *gpu* or *intel* or *kk* or *omp* or *opt* or *hybrid*
14* args = for hybrid style, default suffix to be used and alternative suffix
15
16Examples
17""""""""
18
19.. code-block:: LAMMPS
20
21   suffix off
22   suffix on
23   suffix gpu
24   suffix intel
25   suffix hybrid intel omp
26   suffix kk
27
28Description
29"""""""""""
30
31This command allows you to use variants of various styles if they
32exist.  In that respect it operates the same as the :doc:`-suffix command-line switch <Run_options>`.  It also has options to turn
33off or back on any suffix setting made via the command line.
34
35The specified style can be *gpu*, *intel*, *kk*, *omp*, *opt* or
36*hybrid*\ . These refer to optional packages that LAMMPS can be built
37with, as described on the :doc:`Build package <Build_package>` doc page.
38The "gpu" style corresponds to the GPU package, the "intel" style to
39the INTEL package, the "kk" style to the KOKKOS package, the
40"omp" style to the OPENMP package, and the "opt" style to the OPT
41package.
42
43These are the variants these packages provide:
44
45* GPU = a handful of pair styles and the PPPM kspace_style, optimized to
46  run on one or more GPUs or multicore CPU/GPU nodes
47* INTEL = a collection of pair styles and neighbor routines
48  optimized to run in single, mixed, or double precision on CPUs and
49  Intel(R) Xeon Phi(TM) co-processors.
50* KOKKOS = a collection of atom, pair, and fix styles optimized to run
51  using the Kokkos library on various kinds of hardware, including GPUs
52  via CUDA and many-core chips via OpenMP or threading.
53* OPENMP = a collection of pair, bond, angle, dihedral, improper,
54  kspace, compute, and fix styles with support for OpenMP
55  multi-threading
56* OPT = a handful of pair styles, cache-optimized for faster CPU
57  performance
58* HYBRID = a combination of two packages can be specified (see below)
59
60As an example, all of the packages provide a :doc:`pair_style lj/cut <pair_lj>` variant, with style names lj/cut/opt, lj/cut/omp,
61lj/cut/gpu, lj/cut/intel, or lj/cut/kk.  A variant styles
62can be specified explicitly in your input script, e.g. pair_style
63lj/cut/gpu. If the suffix command is used with the appropriate style,
64you do not need to modify your input script.  The specified suffix
65(opt,omp,gpu,intel,kk) is automatically appended whenever your
66input script command creates a new :doc:`atom <atom_style>`,
67:doc:`pair <pair_style>`, :doc:`bond <bond_style>`,
68:doc:`angle <angle_style>`, :doc:`dihedral <dihedral_style>`,
69:doc:`improper <improper_style>`, :doc:`kspace <kspace_style>`,
70:doc:`fix <fix>`, :doc:`compute <compute>`, or :doc:`run <run_style>` style.
71If the variant version does not exist, the standard version is
72created.
73
74For "hybrid", two packages are specified. The first is used whenever
75available. If a style with the first suffix is not available, the style
76with the suffix for the second package will be used if available. For
77example, "hybrid intel omp" will use styles from the INTEL package
78as a first choice and styles from the OPENMP package as a second choice
79if no INTEL variant is available.
80
81If the specified style is *off*, then any previously specified suffix
82is temporarily disabled, whether it was specified by a command-line
83switch or a previous suffix command.  If the specified style is *on*,
84a disabled suffix is turned back on.  The use of these 2 commands lets
85your input script use a standard LAMMPS style (i.e. a non-accelerated
86variant), which can be useful for testing or benchmarking purposes.
87Of course this is also possible by not using any suffix commands, and
88explicitly appending or not appending the suffix to the relevant
89commands in your input script.
90
91.. note::
92
93   The default :doc:`run_style <run_style>` verlet is invoked prior to
94   reading the input script and is therefore not affected by a suffix command
95   in the input script. The KOKKOS package requires "run_style verlet/kk",
96   so when using the KOKKOS package it is necessary to either use the command
97   line "-sf kk" command or add an explicit "run_style verlet" command to the
98   input script.
99
100Restrictions
101""""""""""""
102 none
103
104Related commands
105""""""""""""""""
106
107:doc:`-suffix command-line switch <Run_options>`
108
109Default
110"""""""
111
112none
113