Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions cmake/Modules/Packages/GPU.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,18 @@ if(GPU_API STREQUAL "CUDA")
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.1")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_86,code=[sm_86,compute_86]")
endif()
# Lovelace (GPU Arch 8.9) is supported by CUDA 11.8 and later
# Ada Lovelace (GPU Arch 8.9) and Hopper (GPU Arch 9.0) are supported by CUDA 11.8 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.8")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
endif()
# newer GPU Arch versions require CUDA 12.0 or later which is handled above
# Backwell (GPU Arch 100) is supported by CUDA 12.4 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "12.4")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_100,code=[sm_100,compute_100]")
endif()
# Rubin (GPU Arch 120) require CUDA 12.8 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "12.8")
string(APPEND GPU_CUDA_GENCODE " -gencode arch=compute_120,code=[sm_120,compute_120]")
endif()
endif()
endif()

Expand Down Expand Up @@ -331,11 +338,18 @@ elseif(GPU_API STREQUAL "HIP")
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.1")
string(APPEND HIP_CUDA_GENCODE " -gencode arch=compute_86,code=[sm_86,compute_86]")
endif()
# Lovelace (GPU Arch 8.9) is supported by CUDA 11.8 and later
# Ada Lovelace (GPU Arch 8.9) and Hopper (GPU Arch 9.0) are supported by CUDA 11.8 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.8")
string(APPEND HIP_CUDA_GENCODE " -gencode arch=compute_90,code=[sm_90,compute_90]")
endif()
# newer GPU Arch versions require CUDA 12.0 or later which is handled above
# Backwell (GPU Arch 100) is supported by CUDA 12.4 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "12.4")
string(APPEND HIP_CUDA_GENCODE " -gencode arch=compute_100,code=[sm_100,compute_100]")
endif()
# Rubin (GPU Arch 120) require CUDA 12.8 and later
if(CUDA_VERSION VERSION_GREATER_EQUAL "12.8")
string(APPEND HIP_CUDA_GENCODE " -gencode arch=compute_120,code=[sm_120,compute_120]")
endif()
endif()
endif()

Expand Down
19 changes: 9 additions & 10 deletions doc/src/Build_basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,15 @@ to: e.g. ``KSPACE``, and ``COLVARS``. See the :doc:`Packages details
<Packages_details>` page for more info on these packages, and the pages
for their respective commands for OpenMP threading info.

For CMake, if you use ``BUILD_OMP=yes``, you can use these packages
and turn on their native OpenMP support and turn on their native OpenMP
support at run time, by setting the ``OMP_NUM_THREADS`` environment
variable before you launch LAMMPS.

For building via conventional make, the ``CCFLAGS`` and ``LINKFLAGS``
variables in Makefile.machine need to include the compiler flag that
enables OpenMP. For the GNU compilers or Clang, it is ``-fopenmp``\ .
For (recent) Intel compilers, it is ``-qopenmp``\ . If you are using a
different compiler, please refer to its documentation.
For CMake, if you use ``BUILD_OMP=yes``, you can use these packages and
turn on their native OpenMP support at run time by setting the
``OMP_NUM_THREADS`` environment variable before you launch LAMMPS.

When building LAMMPS with conventional make, the ``CCFLAGS`` and
``LINKFLAGS`` variables in Makefile.machine need to include the compiler
flag that enables OpenMP. For the GNU compilers or Clang, it is
``-fopenmp``\ . For (recent) Intel compilers, it is ``-qopenmp``\ . If
you are using a different compiler, please refer to its documentation.

.. _default-none-issues:

Expand Down
30 changes: 16 additions & 14 deletions doc/src/Build_cmake.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,14 @@ Configuration and build options

The CMake commands have one mandatory argument: a folder containing a
file called ``CMakeLists.txt`` (for LAMMPS it is located in the
``cmake`` folder, in that case the current working directory becomes
the build folder) or a build folder containing a file called
``cmake`` folder, in that case the current working directory becomes the
build folder) or a build folder containing a file called
``CMakeCache.txt``, which is generated at the end of the CMake
configuration step. The cache file contains all current CMake settings.
This is a "legacy mode" or running CMake and thus often found
when searching the web. We recommend to use the ``-S`` and ``-B``
folders to explicitly set the path to the folder containing the
``CMakeLists.txt`` file and the build folder, respectively.
This is a "legacy mode" of running CMake and thus often found when
searching the web. We recommend to use the ``-S`` and ``-B`` folders to
explicitly set the path to the folder containing the ``CMakeLists.txt``
file and the build folder, respectively.

To modify settings, enable or disable features, you need to set
*variables* with either the ``-D`` command-line flag (``-D
Expand Down Expand Up @@ -252,19 +252,21 @@ of them you can use the command:

cmake --build build --target lmp

Especially, when programming LAMMPS and you are making just local
changes, or only want to make certain that the code still compiles
and links, you may want to skip may of the extra steps that are
run by default and then append "/fast" to the target. Example:
Especially, when programming LAMMPS and you are making only local
changes, or only want to make certain that the code still compiles and
links, you may want to skip many of the extra steps that are run by
default and then append "/fast" to the target. Example:

.. code-block:: bash

cmake --build build --target lammps/fast

Note that this speeds up the build by skipping a lot of checks for
dependencies, and avoiding to re-run CMake, so you may occasionally need
to compile without the "/fast" suffix or use the "all" (= default)
target to update everything.
Note that this speeds up the build by avoiding to re-run CMake and
skipping a lot of checks for possible dependencies, so you may
occasionally need to compile without the "/fast" suffix or use the "all"
(= default) target to update everything. This would be *required* when
adding new files, additional dependencies, or making changes to the
CMake scripts.

Some custom targets, e.g. "install-python" are explicitly excluded
from the "all" target and must be built individually.
Expand Down
4 changes: 2 additions & 2 deletions doc/src/Build_development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ during CMake configuration.
-D ENABLE_IWYU=value # value = no (default) or yes

This will check if the required binary (include-what-you-use or iwyu)
and python script script (iwyu-tool or iwyu_tool or iwyu_tool.py) can
be found in the path. The analysis can then be started with:
and python script (iwyu-tool or iwyu_tool or iwyu_tool.py) can be found
in the path. The analysis can then be started with:

.. code-block:: bash

Expand Down
4 changes: 2 additions & 2 deletions doc/src/Build_extras.rst
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ This list was last updated for version 4.7.1 of the Kokkos library.

.. versionchanged:: 11Feb2026

The KOKKOS package no longer supports the the traditional make build.
The KOKKOS package no longer supports the traditional make build.
You need to build LAMMPS with CMake.

Advanced KOKKOS compilation settings
Expand Down Expand Up @@ -1945,5 +1945,5 @@ your system.

.. versionchanged:: 10Sep2025

The VTK package no longer supports the the traditional make build.
The VTK package no longer supports the traditional make build.
You need to build LAMMPS with CMake.
4 changes: 2 additions & 2 deletions doc/src/Build_link.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ POEMS package installed becomes:

.. code-block:: bash

gcc -c -O -I${HOME}/lammps/src -caller.c
gcc -c -O -I${HOME}/lammps/src caller.c
g++ -o caller caller.o -L${HOME}/lammps/src -llammps_serial

Locating liblammps.so at runtime
Expand Down Expand Up @@ -156,7 +156,7 @@ would add something like this to your ``${HOME}/.profile`` file:

.. code-block:: bash

LD_LIBRARY_PATH ${LD_LIBRARY_PATH-/usr/lib64}:${HOME}/lammps/src
LD_LIBRARY_PATH=${LD_LIBRARY_PATH-/usr/lib64}:${HOME}/lammps/src
export LD_LIBRARY_PATH

For the csh or tcsh shells, you would equivalently add something like this
Expand Down
2 changes: 1 addition & 1 deletion doc/src/Build_manual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ the rest the build process will attempt to download and install them into
a python virtual environment and local folders.

A current version of the manual (latest feature release, that is the state
of the *release* branch) is is available online at:
of the *release* branch) is available online at:
`https://docs.lammps.org/ <https://docs.lammps.org/>`_.
A version of the manual corresponding to the ongoing development (that is
the state of the *develop* branch) is available online at:
Expand Down
10 changes: 5 additions & 5 deletions doc/src/Build_prerequisites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Compiler and OS compatibility

The LAMMPS developers aim to keep LAMMPS very portable and usable -
at least in parts - on most operating systems commonly used for
running MD simulations. Please see the :doc:`section on portablility
running MD simulations. Please see the :doc:`section on portability
<Intro_portability>` for more details.

.. admonition:: Warning: LLVM based Intel Compilers
Expand All @@ -52,10 +52,10 @@ running MD simulations. Please see the :doc:`section on portablility

Unfortunately there is no simple way to detect whether a binary is
working correctly outside of running the unit and regression tests,
but those do not cover all of LAMMPS and and would be reliable only
for no or moderate optimization anyway. For most of LAMMPS there is
not much of a benefit (if any) to use the Intel compilers over the
GCC or Clang compilers, except for the INTEL package (which *can* be
but those do not cover all of LAMMPS and would be reliable only for
no or moderate optimization anyway. For most of LAMMPS there is not
much of a benefit (if any) to use the Intel compilers over the GCC or
Clang compilers, except for the INTEL package (which *can* be
compiled with other compilers, but most vectorization directives are
inactive for those) or KOKKOS with SYCL.

Expand Down
4 changes: 2 additions & 2 deletions doc/src/Build_settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ use and parallel communication costs for transposing 3d FFT data.
When using ``-DFFT_SINGLE`` with FFTW3, you may need to ensure that
the FFTW3 installation includes support for single-precision.

When compiler FFTW3 from source, you can do the following, which should
produce the additional libraries ``libfftw3f.a`` and/or ``libfftw3f.so``\ .
When compiling FFTW3 from source, you can do the following, which should
produce the additional libraries ``libfftw3f.a`` and ``libfftw3f.so``\ .

.. code-block:: bash

Expand Down
2 changes: 1 addition & 1 deletion doc/src/Commands_all.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ An alphabetic list of general LAMMPS commands.

Additional general LAMMPS commands provided by packages. A few
commands have accelerated versions. This is indicated by an
additional letter in parenthesis: k = KOKKOS.
additional letter in parentheses: k = KOKKOS.

.. table_from_list::
:columns: 6
Expand Down
8 changes: 4 additions & 4 deletions doc/src/Commands_parse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ LAMMPS:

.. note::

If the argument is itself a command that requires a quoted
argument (e.g. using a :doc:`print <print>` command as part of an
:doc:`if <if>` or :doc:`run every <run>` command), then single, double, or
If the argument is itself a command that requires a quoted argument
(e.g. using a :doc:`print <print>` command as part of an :doc:`if
<if>` or :doc:`run every <run>` command), then single, double, or
triple quotes can be nested in the usual manner. See the doc pages
for those commands for examples. Only one of level of nesting is
for those commands for examples. Only one level of nesting is
allowed, but that should be sufficient for most use cases.

.. admonition:: ASCII versus UTF-8
Expand Down
9 changes: 4 additions & 5 deletions doc/src/Commands_removed.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@ ATC, AWPMD, and POEMS packages

.. deprecated:: 10Sep2025

The ATC, AWPMD, and POEMS packages are removed.because there were
The ATC, AWPMD, and POEMS packages are removed because they were
unmaintained for a long time and their legacy C++ programming style
started to create problems with modern C++ compilers. LAMMPS version
22 July 2025 is the last version that contains them. You have to
download and compile this version, if you want to use any of these
packages.
started to create problems with modern C++ compilers. LAMMPS version 22
July 2025 is the last version that contains them. You have to download
and compile this version, if you want to use any of these packages.

.. toctree::
:maxdepth: 0
Expand Down
6 changes: 6 additions & 0 deletions doc/src/Developer_platform.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ to the path as a C++ string class instance.
.. doxygenfunction:: file_is_readable
:project: progguide

.. doxygenfunction:: file_is_writable
:project: progguide

.. doxygenfunction:: file_redirect
:project: progguide

.. doxygenfunction:: is_console
:project: progguide

Expand Down
2 changes: 1 addition & 1 deletion doc/src/Errors_common.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ sometimes be confusing or need additional explanations.
do, but very strictly applies the syntax as described in the
documentation. If you run into errors that LAMMPS does not catch that
you think it should flag, please send an email to the `developers
<https://www.lammps.org/authors.html>`_ or create an new topic on the
<https://www.lammps.org/authors.html>`_ or create a new topic on the
dedicated `MatSci forum section <https://matsci.org/lammps/>`_.

- If you get an error message about an invalid command in your input
Expand Down
2 changes: 1 addition & 1 deletion doc/src/Errors_debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ can have multiple reasons:
system size, e.g. :doc:`kspace styles like ewald or pppm
<kspace_style>`. There is very little that can be done in this case.
- The output interval is not set or set to a large value with the
:doc:`thermo <thermo>` command. I the first case, there will be output
:doc:`thermo <thermo>` command. In the first case, there will be output
only at the first and last step.
- The output is block-buffered and instead of line-buffered. The output
will only be written to the screen after 4096 or 8192 characters of
Expand Down
33 changes: 17 additions & 16 deletions doc/src/Errors_details.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ Create a small test system
Debugging problems often requires running a simulation many times with
small modifications, thus it can be a huge time saver to first assemble
a small test system input that has the same issue, but will take much
time until it triggers the error condition. Also, it will be easier to
see what happens.
less time until it triggers the error condition. Also, it will be
easier to see what happens when visualizing the system or looking at
output files.

.. _hint02:

Expand Down Expand Up @@ -81,15 +82,15 @@ While a segmentation fault is likely an indication of a bug in LAMMPS,
it need not always be; it can also be the consequence of too aggressive
simulation settings. For time critical code paths, LAMMPS will assume
the user has chosen the settings carefully and will not make any checks
to avoid to avoid performance penalties.
to avoid performance penalties.

A crucial step in resolving a segmentation fault is to identify the
exact location in the code where it happens. Please see `Errors_debug`
for a couple of examples showing how to do this on a Linux machine.
With this information -- a simple way to reproduce the segmentation
fault and the exact :doc:`LAMMPS version <Manual_version>` and platform
you are running on -- you can contact the LAMMPS developers or post in
the LAMMPS forum to get assistance.
exact location in the code where it happens. Please see
:doc:`Errors_debug` for a couple of examples showing how to do this on a
Linux machine. With this information -- a simple way to reproduce the
segmentation fault and the exact :doc:`LAMMPS version <Manual_version>`
and platform you are running on -- you can contact the LAMMPS developers
or post in the LAMMPS forum to get assistance.

.. _hint05:

Expand All @@ -100,7 +101,7 @@ Fast moving atoms may be "lost" or "missing" when their velocity becomes
so large that they can cross a sub-domain within one timestep. This
often happens when atoms are too close, but atoms may also "move" too
fast from sub-domain to sub-domain if the box changes rapidly.
E.g. when setting a large an initial box with :doc:`shrink-wrap boundary
E.g. when setting a large initial box with :doc:`shrink-wrap boundary
conditions <boundary>` that collapses on the first step (in this case
the solution is often using 'm' instead of 's' as a boundary condition).

Expand Down Expand Up @@ -266,7 +267,7 @@ before the box (e.g. a compute or fix reference or a thermo keyword).
Illegal ... command
^^^^^^^^^^^^^^^^^^^

These are a catchall error messages that used to be used a lot in LAMMPS
These are catchall error messages that used to be used a *lot* in LAMMPS
(also programmers are sometimes lazy). They usually include the name of
the source file and the line where the error happened. This can be used
to track down what caused the error (most often some form of syntax error)
Expand Down Expand Up @@ -433,7 +434,7 @@ Nose-Hoover (or other) barostat, and thus it may be advisable to run
with only a thermostat for a bit until the potential energy has
stabilized.

.. _err007:
.. _err0007:

Fix used in ... not computed at compatible time
-----------------------------------------------
Expand Down Expand Up @@ -521,7 +522,7 @@ executable. In rare cases, there may be licensing or portability issues
that prevent including a package in publicly accessible binaries or in a
specific environment.

.. _err011:
.. _err0011:

Energy or stress was not tallied by pair style
----------------------------------------------
Expand Down Expand Up @@ -570,7 +571,7 @@ For example:
variable cutoff index 10.0
pair_style lj/cut ${cutoff} # this is correct
pair_style lj/cut $cutoff # this is incorrect, LAMMPS looks for 'c' instead of 'cutoff'
variable c index 5.0 # if $c is defined, LAMMPS subsitutes only '$c' and reads: 5utoff
variable c index 5.0 # if $c is defined, LAMMPS substitutes only '$c' and reads: 5utoff

Another potential source of this error may be invalid command line
variables (-var or -v argument) used when launching LAMMPS from an
Expand Down Expand Up @@ -908,7 +909,7 @@ the lack of a time-integrating fix is intentional or not.
System is not charge neutral, net charge = ...
----------------------------------------------

the sum of charges in the system is not zero. When a system is not
The sum of charges in the system is not zero. When a system is not
charge-neutral, methods that evolve/manipulate per-atom charges,
evaluate Coulomb interactions, evaluate Coulomb forces, or
evaluate/manipulate other properties relying on per-atom charges may
Expand Down Expand Up @@ -1021,7 +1022,7 @@ Error messages ending in 'Please contact the LAMMPS developers'
Such error messages indicate that something unexpected has happened and
that it will require a good understanding of the details of the design
of LAMMPS to resolve this. This can be due to some bug in contributed
code, and oversight when updating functionality, a feature that is
code, an oversight when updating functionality, a feature that is
scheduled to be removed or reaching a combination of flags and settings
that should not be possible or similar.

Expand Down
Loading