docs: update run section

This commit is contained in:
Richard Berger
2024-08-14 15:29:21 -06:00
parent 817f92d1fe
commit efc53d6439
2 changed files with 19 additions and 19 deletions

View File

@ -2,8 +2,8 @@ Basics of running LAMMPS
======================== ========================
LAMMPS is run from the command line, reading commands from a file via LAMMPS is run from the command line, reading commands from a file via
the -in command line flag, or from standard input. Using the "-in the ``-in`` command line flag, or from standard input. Using the ``-in
in.file" variant is recommended (see note below). The name of the in.file`` variant is recommended (see note below). The name of the
LAMMPS executable is either ``lmp`` or ``lmp_<machine>`` with LAMMPS executable is either ``lmp`` or ``lmp_<machine>`` with
`<machine>` being the machine string used when compiling LAMMPS. This `<machine>` being the machine string used when compiling LAMMPS. This
is required when compiling LAMMPS with the traditional build system is required when compiling LAMMPS with the traditional build system
@ -35,7 +35,7 @@ executable itself can be placed elsewhere.
form is required. form is required.
As LAMMPS runs it prints info to the screen and a logfile named As LAMMPS runs it prints info to the screen and a logfile named
*log.lammps*\ . More info about output is given on the :doc:`screen and ``log.lammps``. More info about output is given on the :doc:`screen and
logfile output <Run_output>` page. logfile output <Run_output>` page.
If LAMMPS encounters errors in the input script or while running a If LAMMPS encounters errors in the input script or while running a
@ -69,12 +69,12 @@ defaults are often adequate.
For example, it is often important to bind MPI tasks (processes) to For example, it is often important to bind MPI tasks (processes) to
physical cores (processor affinity), so that the operating system does physical cores (processor affinity), so that the operating system does
not migrate them during a simulation. If this is not the default not migrate them during a simulation. If this is not the default
behavior on your machine, the mpirun option "--bind-to core" (OpenMPI) behavior on your machine, the mpirun option ``--bind-to core`` (OpenMPI)
or "-bind-to core" (MPICH) can be used. or ``-bind-to core`` (MPICH) can be used.
If the LAMMPS command(s) you are using support multi-threading, you If the LAMMPS command(s) you are using support multi-threading, you
can set the number of threads per MPI task via the environment can set the number of threads per MPI task via the environment
variable OMP_NUM_THREADS, before you launch LAMMPS: variable ``OMP_NUM_THREADS``, before you launch LAMMPS:
.. code-block:: bash .. code-block:: bash
@ -91,7 +91,7 @@ packages and which commands support multi-threading.
You can experiment with running LAMMPS using any of the input scripts You can experiment with running LAMMPS using any of the input scripts
provided in the examples or bench directory. Input scripts are named provided in the examples or bench directory. Input scripts are named
in.\* and sample outputs are named log.\*.P where P is the number of ``in.*`` and sample outputs are named ``log.*.P`` where P is the number of
processors it was run on. processors it was run on.
Some of the examples or benchmarks require LAMMPS to be built with Some of the examples or benchmarks require LAMMPS to be built with

View File

@ -275,13 +275,13 @@ impact can be significant, especially for large parallel runs.
Invoke the :doc:`package <package>` command with style and args. The Invoke the :doc:`package <package>` command with style and args. The
syntax is the same as if the command appeared at the top of the input syntax is the same as if the command appeared at the top of the input
script. For example "-package gpu 2" or "-pk gpu 2" is the same as script. For example ``-package gpu 2`` or ``-pk gpu 2`` is the same as
:doc:`package gpu 2 <package>` in the input script. The possible styles :doc:`package gpu 2 <package>` in the input script. The possible styles
and args are documented on the :doc:`package <package>` doc page. This and args are documented on the :doc:`package <package>` doc page. This
switch can be used multiple times, e.g. to set options for the switch can be used multiple times, e.g. to set options for the
INTEL and OPENMP packages which can be used together. INTEL and OPENMP packages which can be used together.
Along with the "-suffix" command-line switch, this is a convenient Along with the ``-suffix`` command-line switch, this is a convenient
mechanism for invoking accelerator packages and their options without mechanism for invoking accelerator packages and their options without
having to edit an input script. having to edit an input script.
@ -300,7 +300,7 @@ specify the number of processors in each partition. Arguments of the
form MxN mean M partitions, each with N processors. Arguments of the form MxN mean M partitions, each with N processors. Arguments of the
form N mean a single partition with N processors. The sum of form N mean a single partition with N processors. The sum of
processors in all partitions must equal P. Thus the command processors in all partitions must equal P. Thus the command
"-partition 8x2 4 5" has 10 partitions and runs on a total of 25 ``-partition 8x2 4 5`` has 10 partitions and runs on a total of 25
processors. processors.
Running with multiple partitions can be useful for running Running with multiple partitions can be useful for running
@ -378,8 +378,8 @@ processors will be in the first partition, the second set in the second
partition. The -reorder command-line switch can alter this so that partition. The -reorder command-line switch can alter this so that
the first N procs in the first partition and one proc in the second partition the first N procs in the first partition and one proc in the second partition
will be ordered consecutively, e.g. as the cores on one physical node. will be ordered consecutively, e.g. as the cores on one physical node.
This can boost performance. For example, if you use "-reorder nth 4" This can boost performance. For example, if you use ``-reorder nth 4``
and "-partition 9 3" and you are running on 12 processors, the and ``-partition 9 3`` and you are running on 12 processors, the
processors will be reordered from processors will be reordered from
.. parsed-literal:: .. parsed-literal::
@ -584,11 +584,11 @@ style that accepts arguments. It allows for two packages to be
specified. The first package specified is the default and will be used specified. The first package specified is the default and will be used
if it is available. If no style is available for the first package, if it is available. If no style is available for the first package,
the style for the second package will be used if available. For the style for the second package will be used if available. For
example, "-suffix hybrid intel omp" will use styles from the example, ``-suffix hybrid intel omp`` will use styles from the
INTEL package if they are installed and available, but styles for INTEL package if they are installed and available, but styles for
the OPENMP package otherwise. the OPENMP package otherwise.
Along with the "-package" command-line switch, this is a convenient Along with the ``-package`` command-line switch, this is a convenient
mechanism for invoking accelerator packages and their options without mechanism for invoking accelerator packages and their options without
having to edit an input script. having to edit an input script.
@ -605,30 +605,30 @@ variant version does not exist, the standard version is created.
For the GPU package, using this command-line switch also invokes the For the GPU package, using this command-line switch also invokes the
default GPU settings, as if the command "package gpu 1" were used at default GPU settings, as if the command "package gpu 1" were used at
the top of your input script. These settings can be changed by using the top of your input script. These settings can be changed by using
the "-package gpu" command-line switch or the :doc:`package gpu <package>` command in your script. the ``-package gpu`` command-line switch or the :doc:`package gpu <package>` command in your script.
For the INTEL package, using this command-line switch also For the INTEL package, using this command-line switch also
invokes the default INTEL settings, as if the command "package invokes the default INTEL settings, as if the command "package
intel 1" were used at the top of your input script. These settings intel 1" were used at the top of your input script. These settings
can be changed by using the "-package intel" command-line switch or can be changed by using the ``-package intel`` command-line switch or
the :doc:`package intel <package>` command in your script. If the the :doc:`package intel <package>` command in your script. If the
OPENMP package is also installed, the hybrid style with "intel omp" OPENMP package is also installed, the hybrid style with "intel omp"
arguments can be used to make the omp suffix a second choice, if a arguments can be used to make the omp suffix a second choice, if a
requested style is not available in the INTEL package. It will requested style is not available in the INTEL package. It will
also invoke the default OPENMP settings, as if the command "package also invoke the default OPENMP settings, as if the command "package
omp 0" were used at the top of your input script. These settings can omp 0" were used at the top of your input script. These settings can
be changed by using the "-package omp" command-line switch or the be changed by using the ``-package omp`` command-line switch or the
:doc:`package omp <package>` command in your script. :doc:`package omp <package>` command in your script.
For the KOKKOS package, using this command-line switch also invokes For the KOKKOS package, using this command-line switch also invokes
the default KOKKOS settings, as if the command "package kokkos" were the default KOKKOS settings, as if the command "package kokkos" were
used at the top of your input script. These settings can be changed used at the top of your input script. These settings can be changed
by using the "-package kokkos" command-line switch or the :doc:`package kokkos <package>` command in your script. by using the ``-package kokkos`` command-line switch or the :doc:`package kokkos <package>` command in your script.
For the OMP package, using this command-line switch also invokes the For the OMP package, using this command-line switch also invokes the
default OMP settings, as if the command "package omp 0" were used at default OMP settings, as if the command "package omp 0" were used at
the top of your input script. These settings can be changed by using the top of your input script. These settings can be changed by using
the "-package omp" command-line switch or the :doc:`package omp <package>` command in your script. the ``-package omp`` command-line switch or the :doc:`package omp <package>` command in your script.
The :doc:`suffix <suffix>` command can also be used within an input The :doc:`suffix <suffix>` command can also be used within an input
script to set a suffix, or to turn off or back on any suffix setting script to set a suffix, or to turn off or back on any suffix setting