From 03e38952d72ead60d6757c2b8ac10f378a62b226 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 11 Feb 2026 12:48:38 -0500 Subject: [PATCH 01/10] must include GRAPHICS package in flatpak build --- cmake/packaging/org.lammps.lammps-gui.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/packaging/org.lammps.lammps-gui.yml b/cmake/packaging/org.lammps.lammps-gui.yml index b63b2403873..0502b436b6c 100644 --- a/cmake/packaging/org.lammps.lammps-gui.yml +++ b/cmake/packaging/org.lammps.lammps-gui.yml @@ -61,6 +61,7 @@ modules: - -D PKG_EXTRA-MOLECULE=yes - -D PKG_EXTRA-PAIR=yes - -D PKG_FEP=yes + - -D PKG_GRAPHICS=yes - -D PKG_GRANULAR=yes - -D PKG_GPU=yes - -D GPU_API=opencl From 0f99b93dac517fea2c9a25f8cbbbcb4e58fd5bdc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 11 Feb 2026 12:49:50 -0500 Subject: [PATCH 02/10] flag version as development version again --- src/version.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/version.h b/src/version.h index 73986d5f799..cfc657f67cc 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1,2 @@ #define LAMMPS_VERSION "11 Feb 2026" +#define LAMMPS_UPDATE "Development" From 8b2ea73216d10f6d0482871e7bbb381d07c08699 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 11 Feb 2026 17:19:01 -0500 Subject: [PATCH 03/10] add "tarball" target to simplify creating download tarballs and avoid problems --- cmake/CMakeLists.txt | 8 ++++++++ cmake/packaging/build_tarball.sh | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100755 cmake/packaging/build_tarball.sh diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 1254ee9f126..191d0a5d6e8 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -867,6 +867,14 @@ else() ${CMAKE_COMMAND} -E echo "Must build LAMMPS as a shared library to use the Python module") endif() +############################################################################### +# Create tarball for download with html and PDF version of manual included +############################################################################### +add_custom_target(tarball + COMMAND ${LAMMPS_DIR}/cmake/packaging/build_tarball.sh ${LAMMPS_DIR}/doc ${LAMMPS_RELEASE} +) + + include(Testing) include(CodeCoverage) include(CodingStandard) diff --git a/cmake/packaging/build_tarball.sh b/cmake/packaging/build_tarball.sh new file mode 100755 index 00000000000..40f4ba48a08 --- /dev/null +++ b/cmake/packaging/build_tarball.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +APP_NAME=lammps +DOCDIR="$1" +VERSION="$2" +BRANCH=$(git branch --show-current) +DESTDIR=${PWD} + +echo "Delete tar files, if they exist" +rm -rvf ${PWD}/lammps-src-*.tar.gz +pushd ${DOCDIR}/.. +git archive --output=${DESTDIR}/${BRANCH}.tar --prefix=lammps-${VERSION}/ HEAD + +cd ${DOCDIR} +make clean-all +make html pdf +tar -rf ${DESTDIR}/${BRANCH}.tar --transform "s,^,lammps-${VERSION}/doc/," html Manual.pdf +popd +mv ${BRANCH}.tar lammps-src-${VERSION}.tar +gzip -9v lammps-src-${VERSION}.tar +exit 0 From 681fc86e3ffa712b7cd35d9841fb6ac86befffc2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 11 Feb 2026 17:32:36 -0500 Subject: [PATCH 04/10] update minimum C++ and Kokkos requirements --- doc/src/Intro_features.rst | 2 +- doc/src/Packages_details.rst | 12 ++++++------ doc/src/Speed_kokkos.rst | 25 ++++++++++++++----------- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/doc/src/Intro_features.rst b/doc/src/Intro_features.rst index d7b3af38a57..948a39e7da4 100644 --- a/doc/src/Intro_features.rst +++ b/doc/src/Intro_features.rst @@ -29,7 +29,7 @@ General features * spatial decomposition of simulation domain for MPI parallelism * particle decomposition inside spatial decomposition for OpenMP and GPU parallelism * GPLv2 licensed open-source distribution -* highly portable C++-11 (optional packages may require C++17) +* highly portable C++-17 (optional packages may require C++20) * modular code with most functionality in optional packages * only depends on MPI library for basic parallel functionality, MPI stub for serial compilation * other libraries are optional and only required for specific packages diff --git a/doc/src/Packages_details.rst b/doc/src/Packages_details.rst index 80ddae45d13..de35046d719 100644 --- a/doc/src/Packages_details.rst +++ b/doc/src/Packages_details.rst @@ -1306,12 +1306,12 @@ Also see the :ref:`GPU `, :ref:`OPT `, :ref:`INTEL `, and :ref:`OPENMP ` packages, which have styles optimized for CPUs, KNLs, and GPUs. -You must have a C++17 compatible compiler to use this package. -KOKKOS makes extensive use of advanced C++ features, which can -expose compiler bugs, especially when compiling for maximum -performance at high optimization levels. Please see the file -``lib/kokkos/README`` for a list of compilers and their respective -platforms, that are known to work. +You must have a C++20 compatible compiler to use this package. KOKKOS +makes extensive use of advanced C++ features, which can expose compiler +bugs, especially when compiling for maximum performance at high +optimization levels. Please see the file ``lib/kokkos/README`` for a +list of compilers and their respective platforms, that are known to +work. **Authors:** The KOKKOS package was created primarily by Christian Trott and Stan Moore (Sandia), with contributions from other folks as well. diff --git a/doc/src/Speed_kokkos.rst b/doc/src/Speed_kokkos.rst index 7e5014faba4..f70f99851ab 100644 --- a/doc/src/Speed_kokkos.rst +++ b/doc/src/Speed_kokkos.rst @@ -41,23 +41,24 @@ center GPUs) are under development. You choose the mode at build time to produce an executable compatible with a specific hardware. The following compatibility notes have been last updated for LAMMPS -version 23 November 2023 and Kokkos version 4.2. +version 11 February 2026 and its bundled Kokkos library version 5.0 -.. admonition:: C++17 support +.. admonition:: C++20 support :class: note - Kokkos requires using a compiler that supports the c++17 standard. For - some compilers, it may be necessary to add a flag to enable c++17 support. - For example, the GNU compiler uses the ``-std=c++17`` flag. For a list of - compilers that have been tested with the Kokkos library, see the - `requirements document of the Kokkos Wiki + Kokkos requires using a compiler that supports the C++20 + standard. For some compilers, it may be necessary to add a flag to + enable C++20 support. For example, the GNU compiler uses the + ``-std=c++20`` flag. For a list of compilers that have been tested + with the Kokkos library, see the `requirements document of the Kokkos + Wiki `_. .. admonition:: NVIDIA CUDA support :class: note To build with Kokkos support for NVIDIA GPUs, the NVIDIA CUDA toolkit - software version 11.0 or later must be installed on your system. See + software version 12.2 or later must be installed on your system. See the discussion for the :doc:`GPU package ` for details of how to check and do this. @@ -65,15 +66,17 @@ version 23 November 2023 and Kokkos version 4.2. :class: note To build with Kokkos support for AMD GPUs, the AMD ROCm toolkit - software version 5.2.0 or later must be installed on your system. + software version 6.2.0 or later must be installed on your system. .. admonition:: Intel Data Center GPU support :class: note Support for Kokkos with Intel Data Center GPU accelerators (formerly known under the code name "Ponte Vecchio") in LAMMPS is still a work - in progress. Only a subset of the functionality works correctly. - Please contact the LAMMPS developers if you run into problems. + in progress. Minimum required version is the Intel LLVM (not + classic) compiler version 2024.1. The LAMMPS developers do not + regularly test the status of this, so please contact the LAMMPS + developers if you run into problems. .. admonition:: CUDA and MPI library compatibility :class: note From 3291501750159554647834758573ae5798afab77 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 11 Feb 2026 18:05:35 -0500 Subject: [PATCH 05/10] don't print cutoff warnings when the difference is only the floating point epsilon --- src/comm.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/comm.cpp b/src/comm.cpp index cd6dce4374a..212b64dca63 100644 --- a/src/comm.cpp +++ b/src/comm.cpp @@ -36,6 +36,8 @@ #include "update.h" #include +#include + #ifdef _OPENMP #include #endif @@ -45,6 +47,10 @@ using namespace LAMMPS_NS; enum{ONELEVEL,TWOLEVEL,NUMA,CUSTOM}; enum{CART,CARTREORDER,XYZ}; +namespace { + constexpr double EPSILON = std::numeric_limits::epsilon(); +} + /* ---------------------------------------------------------------------- */ Comm::Comm(LAMMPS *lmp) : Pointers(lmp) @@ -684,7 +690,7 @@ double Comm::get_comm_cutoff() if (!force->pair && (cutghostuser == 0.0)) { maxcommcutoff = MAX(maxcommcutoff,maxbondcutoff); } else { - if ((me == 0) && (maxbondcutoff > maxcommcutoff)) + if ((me == 0) && ((maxbondcutoff - EPSILON) > maxcommcutoff)) error->warning(FLERR,"Communication cutoff {} is shorter than a bond " "length based estimate of {}. This may lead to errors.", maxcommcutoff,maxbondcutoff); @@ -693,7 +699,7 @@ double Comm::get_comm_cutoff() // print warning if neighborlist cutoff overrides user cutoff if ((me == 0) && (update->setupflag == 1)) { - if ((cutghostuser > 0.0) && (maxcommcutoff > cutghostuser)) + if ((cutghostuser > 0.0) && ((maxcommcutoff - EPSILON) > cutghostuser)) error->warning(FLERR,"Communication cutoff adjusted to {}",maxcommcutoff); } From bdcb2aa120858ba536b6e8b30aefd87ba7a7a656 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 11 Feb 2026 21:13:44 -0500 Subject: [PATCH 06/10] update GitHub Copilot instructions for documentation updates --- .github/copilot-instructions.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index f0326c685e9..19d40100ea8 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -245,6 +245,10 @@ lammps/ 5. **Documentation:** All new commands or features must be documented. Put `.. versionadded:: TBD` or `.. versionchanged:: TBD` in front of paragraphs documenting the new or changed functionality. The `TBD` will be manually replaced with the release version string during the release preparation. + This does not apply when the change is only adding an accelerated version of an existing style. + Instead the corresponding code letter should be added to the respective Commands_\*.rst file. + Also the documentation should pass running "make check" in the doc folder without any + output indicating non-ASCII characters, missing entries, or duplicate anchors. ### Testing From 6f9b1990f9cc64a07b19fb69394abaa6b4341fde Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 11 Feb 2026 21:14:14 -0500 Subject: [PATCH 07/10] add 'make check' convenience target to doc folder makefile --- doc/Makefile | 5 ++++- doc/src/Build_manual.rst | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/Makefile b/doc/Makefile index 4aa573b4612..75ce99b1d97 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -52,7 +52,7 @@ SPHINXEXTRA = -j $(shell $(PYTHON) -c 'import multiprocessing;print(multiprocess # we only want to use explicitly listed files. DOXYFILES = $(shell sed -n -e 's/\#.*$$//' -e '/^ *INPUT \+=/,/^[A-Z_]\+ \+=/p' doxygen/Doxyfile.in | sed -e 's/@LAMMPS_SOURCE_DIR@/..\/src/g' -e 's/\\//g' -e 's/ \+/ /' -e 's/[A-Z_]\+ \+= *\(YES\|NO\|\)//') -.PHONY: help clean-all clean clean-spelling epub mobi html pdf spelling anchor_check style_check char_check link_check role_check xmlgen fasthtml fasthtml-init +.PHONY: help clean-all clean clean-spelling epub mobi html pdf spelling anchor_check style_check char_check link_check role_check xmlgen fasthtml fasthtml-init check FASTHTMLFILES = $(patsubst $(RSTDIR)/%.rst,fasthtml/%.html,$(wildcard $(RSTDIR)/*rst)) # ------------------------------------------ @@ -69,6 +69,7 @@ help: @echo " upgrade upgrade sphinx, extensions, and dependencies to latest supported versions" @echo " clean remove all intermediate files" @echo " clean-all reset the entire build environment" + @echo " check run 'anchor_check', 'style_check', 'package_check', 'char_check', and 'role_check'" @echo " anchor_check scan for duplicate anchor labels" @echo " style_check check for complete and consistent style lists" @echo " package_check check for complete and consistent package lists" @@ -236,6 +237,8 @@ pdf: xmlgen globbed-tocs $(VENV) $(SPHINXCONFIG)/conf.py $(ANCHORCHECK) @rm -rf latex/PDF/.[sg]* @echo "Build finished. Manual.pdf is in this directory." +check : anchor_check style_check package_check char_check role_check + anchor_check : $(ANCHORCHECK) @(\ . $(VENV)/bin/activate ; env PYTHONWARNINGS= PYTHONDONTWRITEBYTECODE=1 \ diff --git a/doc/src/Build_manual.rst b/doc/src/Build_manual.rst index fac2c199497..85c2a4df2a6 100644 --- a/doc/src/Build_manual.rst +++ b/doc/src/Build_manual.rst @@ -87,6 +87,7 @@ folder. The following ``make`` commands are available: make clean-all # remove entire build folder and any cached data make upgrade # upgrade the python packages in the virtual environment + make check # run all checks listed in this block make anchor_check # check for duplicate anchor labels make style_check # check for complete and consistent style lists make package_check # check for complete and consistent package lists From ba8f1e8001fbef3b2231af61ad5722b6051654f4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 12 Feb 2026 03:45:48 -0500 Subject: [PATCH 08/10] apply typecast correctly --- src/EXTRA-COMPUTE/compute_hbond_local.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EXTRA-COMPUTE/compute_hbond_local.cpp b/src/EXTRA-COMPUTE/compute_hbond_local.cpp index b43b4151e2c..ef09ffa82d7 100644 --- a/src/EXTRA-COMPUTE/compute_hbond_local.cpp +++ b/src/EXTRA-COMPUTE/compute_hbond_local.cpp @@ -216,8 +216,8 @@ int ComputeHBondLocal::compute_image(int *&objs, double **&parms) numobjs = 0; for (int i = 0; i < ncount; ++i) { int idonor = atom->map((tagint) alocal[i][DONOR]); - int iacceptor = domain->closest_image(idonor, (tagint) atom->map(alocal[i][ACCEPTOR])); - int ihydrogen = domain->closest_image(idonor, (tagint) atom->map(alocal[i][HYDROGEN])); + int iacceptor = domain->closest_image(idonor, atom->map((tagint) alocal[i][ACCEPTOR])); + int ihydrogen = domain->closest_image(idonor, atom->map((tagint) alocal[i][HYDROGEN])); if ((idonor < 0) || (iacceptor < 0) || (ihydrogen < 0)) continue; // paranoia imgobjs[numobjs] = Graphics::ARROW; From 1c9b28b4c56833afcf3403d8b3e3919bb59b947d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 12 Feb 2026 19:13:55 -0500 Subject: [PATCH 09/10] improve tarball creation script --- cmake/CMakeLists.txt | 2 +- cmake/packaging/build_tarball.sh | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 191d0a5d6e8..af12ad24fc0 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -871,7 +871,7 @@ endif() # Create tarball for download with html and PDF version of manual included ############################################################################### add_custom_target(tarball - COMMAND ${LAMMPS_DIR}/cmake/packaging/build_tarball.sh ${LAMMPS_DIR}/doc ${LAMMPS_RELEASE} + COMMAND ${LAMMPS_DIR}/cmake/packaging/build_tarball.sh ${LAMMPS_DIR}/doc ) diff --git a/cmake/packaging/build_tarball.sh b/cmake/packaging/build_tarball.sh index 40f4ba48a08..41799429ceb 100755 --- a/cmake/packaging/build_tarball.sh +++ b/cmake/packaging/build_tarball.sh @@ -1,21 +1,24 @@ #!/bin/bash +set -euo pipefail APP_NAME=lammps DOCDIR="$1" -VERSION="$2" -BRANCH=$(git branch --show-current) -DESTDIR=${PWD} +DESTDIR="${PWD}" echo "Delete tar files, if they exist" -rm -rvf ${PWD}/lammps-src-*.tar.gz -pushd ${DOCDIR}/.. -git archive --output=${DESTDIR}/${BRANCH}.tar --prefix=lammps-${VERSION}/ HEAD +rm -rvf "${PWD}"/lammps-src-*.tar.gz +pushd "${DOCDIR}/.." +VERSION=$(grep LAMMPS_VERSION src/version.h | sed 's/^.*LAMMPS_VERSION //' | tr -d \" | tr -d \ ) +TARNAME=lammps-src-${VERSION}.tar +TARPATH="${DESTDIR}/${TARNAME}" +git archive --output="${TARPATH}" --prefix=lammps-${VERSION}/ HEAD -cd ${DOCDIR} +cd "${DOCDIR}" make clean-all make html pdf -tar -rf ${DESTDIR}/${BRANCH}.tar --transform "s,^,lammps-${VERSION}/doc/," html Manual.pdf +rm html/index.html +cp html/Manual.html html/index.html +tar -rf "${TARPATH}" --owner=root --group=root --transform "s,^,lammps-${VERSION}/doc/," html Manual.pdf popd -mv ${BRANCH}.tar lammps-src-${VERSION}.tar -gzip -9v lammps-src-${VERSION}.tar +gzip -9v "${TARNAME}" exit 0 From 0dfa2d7df9ffafe6730fd15dfcc9d22df88a1a0f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 12 Feb 2026 19:20:37 -0500 Subject: [PATCH 10/10] use full version --- doc/src/Speed_kokkos.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/Speed_kokkos.rst b/doc/src/Speed_kokkos.rst index f70f99851ab..a6dc6f30bff 100644 --- a/doc/src/Speed_kokkos.rst +++ b/doc/src/Speed_kokkos.rst @@ -41,7 +41,7 @@ center GPUs) are under development. You choose the mode at build time to produce an executable compatible with a specific hardware. The following compatibility notes have been last updated for LAMMPS -version 11 February 2026 and its bundled Kokkos library version 5.0 +version 11 February 2026 and its bundled Kokkos library version 5.0.2. .. admonition:: C++20 support :class: note