<P>To see what accelerate styles are currently available, see
<AHREF ="Section_commands.html#cmd_5">Section_commands 5</A> of the manual. The
doc pages for individual commands (e.g. <AHREF ="pair_lj.html">pair lj/cut</A> or
<AHREF ="fix_nve.html">fix nve</A>) also list any accelerated variants available
for that style.
</P>
<P>To use an accelerator package in LAMMPS, and one or more of the styles
it provides, follow these general steps. Details vary from package to
package and are explained in the individual accelerator doc pages,
listed above:
</P>
<DIVALIGN=center><TABLEBORDER=1>
<TR><TD>build the accelerator library </TD><TD> only for USER-CUDA and GPU packages </TD></TR>
<TR><TD>install the accelerator package </TD><TD> make yes-opt, make yes-user-intel, etc </TD></TR>
<TR><TD>add compile/link flags to Makefile.machine </TD><TD> in src/MAKE, <br> only for USER-INTEL, KOKKOS, USER-OMP packages </TD></TR>
<TR><TD>re-build LAMMPS </TD><TD> make machine </TD></TR>
<TR><TD>run a LAMMPS simulation </TD><TD> lmp_machine < in.script</TD></TR>
<TR><TD>enable the accelerator package </TD><TD> via "-c on" and "-k on" <AHREF ="Section_start.html#start_7">command-line switches</A>, <br> only for USER-CUDA and KOKKOS packages </TD></TR>
<TR><TD>set any needed options for the package </TD><TD> via "-pk" <AHREF ="Section_start.html#start_7">command-line switch</A> or <AHREF ="package.html">package</A> command, <br> only if defaults need to be changed </TD></TR>
<TR><TD>use accelerated styles in your input script </TD><TD> via "-sf" <AHREF ="Section_start.html#start_7">command-line switch</A> or <AHREF ="suffix.html">suffix</A> command
</TD></TR></TABLE></DIV>
<P>The first 4 steps can be done as a single command, using the
src/Make.py tool. The Make.py tool is discussed in <AHREF ="Section_start.html#start_4">Section
2.4</A> of the manual, and its use is
illustrated in the individual accelerator sections. Typically these
steps only need to be done once, to create an executable that uses one
or more accelerator packages.
</P>
<P>The last 4 steps can all be done from the command-line when LAMMPS is
launched, without changing your input script, as illustrated in the
individual accelerator sections. Or you can add
<AHREF ="package.html">package</A> and <AHREF ="suffix.html">suffix</A> commands to your input
script.
</P>
<P>IMPORTANT NOTE: With a few exceptions, you can build a single LAMMPS
executable with all its accelerator packages installed. Note that the
USER-INTEL and KOKKOS packages require you to choose one of their
options when building. I.e. CPU or Phi for USER-INTEL. OpenMP, Cuda,
or Phi for KOKKOS. Here are the exceptions; you cannot build a single
executable with:
</P>
<UL><LI>both the USER-INTEL Phi and KOKKOS Phi options
<LI>the USER-INTEL Phi or Kokkos Phi option, and either the USER-CUDA or GPU packages
</UL>
<P>See the examples/accelerate/README and make.list files for sample
Make.py commands that build LAMMPS with any or all of the accelerator
packages. As an example, here is a command that builds with all the
GPU related packages installed (USER-CUDA, GPU, KOKKOS with Cuda),
including settings to build the needed auxiliary USER-CUDA and GPU