Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
d8ba392
the TOUCH keyword requires CMake version 3.24 or later
akohlmey Sep 3, 2026
acdeab9
modernize
akohlmey Sep 3, 2026
91bd3fc
apply clang-format and use LAMMPS conventions for initializing pointers
akohlmey Sep 3, 2026
f236373
preferred dispatch not available on ubuntu 22.04LTS with GCC 11.x
akohlmey Sep 3, 2026
6007b42
style registry: detect build-configuration guards wrapping whole styl…
akohlmey Sep 3, 2026
978483b
fix typo and stray comma in the PairPACE constructor initializer list
akohlmey Sep 3, 2026
ca906df
include more plugins. TLS support is crucial
akohlmey Sep 3, 2026
884f5c5
add false positive
akohlmey Sep 3, 2026
2fc8f4d
modernize by replacing typedef with using
akohlmey Sep 3, 2026
ca77504
use explicit scoping to indicate that virtual dispatch is not available
akohlmey Sep 3, 2026
8983f7b
unittest: add KOKKOS variants to the compute/fix output and minimizer…
stanmoore1 Sep 3, 2026
4bd62e4
compute ti: accept pair styles with an accelerator suffix
stanmoore1 Sep 3, 2026
3ecc108
compute gyration/shape: accept accelerated variants of compute gyration
stanmoore1 Sep 3, 2026
38ee04b
unittest: skip the KOKKOS cases of the compute centroid/stress/atom r…
stanmoore1 Sep 3, 2026
a2b904f
sync linux tgz package script with lammps-gui version
akohlmey Sep 3, 2026
c034cd8
update shared linker cache and symlinks on Linux -> fewer crashes
akohlmey Sep 3, 2026
89710e8
compute temp/sphere, temp/asphere, temp/body: detect a temp/region bi…
stanmoore1 Sep 3, 2026
7b1ed2d
unittest: add KOKKOS full neighbor list cases to the force style test…
stanmoore1 Sep 3, 2026
3447077
unittest: allow running the command and format tests with an accelera…
stanmoore1 Sep 3, 2026
a3f5834
unittest: re-apply the full neighbor list newton setting after the pr…
stanmoore1 Sep 4, 2026
6d7ff6d
KOKKOS: reject the superellipsoid option in atom style ellipsoid/kk
stanmoore1 Sep 4, 2026
da67b03
KOKKOS: add the finite size contribution of spheres in compute inerti…
stanmoore1 Sep 4, 2026
04facf7
unittest: skip the KOKKOS full neighbor list tests for styles that ne…
stanmoore1 Sep 4, 2026
de85907
unittest: make the command and format tests pass with the KOKKOS package
stanmoore1 Sep 4, 2026
42defc1
compute fep: do not dereference the kspace style when there is none
stanmoore1 Sep 4, 2026
8b2b84c
comm: keep the reverse communication buffer size of fixes, computes, …
stanmoore1 Sep 4, 2026
797fbf2
unittest: skip the KOKKOS full neighbor list case of five compute ref…
stanmoore1 Sep 4, 2026
246194b
unittest: fix the plain branch of the global scalar comparison
stanmoore1 Sep 4, 2026
a29b970
unittest: add references for fix store/force and fix viscous/sphere
stanmoore1 Sep 4, 2026
a66fe60
KOKKOS: replace non-ASCII characters in comments and the citation text
stanmoore1 Sep 4, 2026
99f9b93
import fixes to the examples tree from the preview branch
akohlmey Sep 4, 2026
add7b93
update logs
akohlmey Sep 4, 2026
d38b382
reduce compiler warnings, improve errors
akohlmey Sep 4, 2026
bd4c2d4
unittest: add a reference for fix freeze
stanmoore1 Sep 4, 2026
1f50a58
KOKKOS: fix the sign of the parallel drag force in pair dpd/ext/tstat/kk
stanmoore1 Sep 4, 2026
0462e2b
KOKKOS: support the shift keyword in the tersoff pair styles
stanmoore1 Sep 4, 2026
78a668a
KOKKOS: add a build option to use the host random number generator
stanmoore1 Sep 4, 2026
b72d521
KOKKOS: fix the grid computes of the ML-SNAP package on host backends
stanmoore1 Sep 4, 2026
1232312
unittest: add references for fix addtorque/atom, settorque/atom and e…
stanmoore1 Sep 4, 2026
9406bd1
fix memory leak
akohlmey Sep 4, 2026
7f964d1
add suppressions false positives on thread storage
akohlmey Sep 4, 2026
c4eb789
unittest: add references for the granular KOKKOS styles without history
stanmoore1 Sep 4, 2026
afe6134
KOKKOS: refresh the partner views after growing them in fix neigh/his…
stanmoore1 Sep 4, 2026
22ebeb4
KOKKOS: fix special_bonds handling and self energy in the coul/dsf pa…
stanmoore1 Sep 4, 2026
641a1d3
test: check single() against compute() with a non-unit special_bonds …
stanmoore1 Sep 4, 2026
28c75ef
test: add fix halt, PHONON command and 2d enforce2d tests
stanmoore1 Sep 4, 2026
feffa98
test: add DPD-REACT force-style references
stanmoore1 Sep 4, 2026
6950630
KOKKOS: fix the density energy tally of pair multi/lucy/rx
stanmoore1 Sep 4, 2026
d5350f4
KOKKOS: let fix wall/flow use the host random number generator
stanmoore1 Sep 4, 2026
9fd7adf
test: add a fix cmap force-style reference
stanmoore1 Sep 4, 2026
aa8d92e
test: check the ReaxFF bonds and species output files
stanmoore1 Sep 4, 2026
37e574b
KOKKOS: initialize neighflag for the host backend of pair pod
stanmoore1 Sep 4, 2026
1a1d5b1
unittest: declare the dipole atom style prerequisite of the in.browni…
stanmoore1 Sep 4, 2026
8c33e4a
unittest: honor the nofdotr skip token in the accelerator test cases
stanmoore1 Sep 4, 2026
6f0687f
KOKKOS: fix the random seed and the per-atom energy of pair brownian
stanmoore1 Sep 4, 2026
e07db66
test: add fix wall/piston references
stanmoore1 Sep 4, 2026
99a1a47
KOKKOS: use the host random numbers in the dpd pair styles when asked…
stanmoore1 Sep 4, 2026
a25b525
KOKKOS: subtract the zeroed force from the tally of fix langevin
stanmoore1 Sep 4, 2026
949d37d
test: cover the thermostat keywords and the temperature bias path
stanmoore1 Sep 4, 2026
26d0f94
test: cover the region keyword and the variable arguments of the forc…
stanmoore1 Sep 4, 2026
6ef464e
test: cover the coulomb table, the tilted box and hybrid sub-style di…
stanmoore1 Sep 4, 2026
c5277f1
KOKKOS: size the per-atom virial of pair mliap by maxvatom
stanmoore1 Sep 4, 2026
eca27e2
unittest: compare the per-atom virial of a style with its global virial
stanmoore1 Sep 4, 2026
5de5157
unittest: let the environment add package kokkos settings to the test…
stanmoore1 Sep 4, 2026
2f7e64a
unittest: run the whole suite through each package kokkos setting once
stanmoore1 Sep 5, 2026
caa6252
KOKKOS: stop copying the velocities for the wall fixes
stanmoore1 Sep 5, 2026
da48eea
Merge branch 'develop' into collected-small-changes
akohlmey Sep 5, 2026
3d9dc21
remove reference to obsolete atc package
akohlmey Sep 5, 2026
7ba5243
KOKKOS: sync the crossterm lists of fix cmap before a restart is written
stanmoore1 Sep 5, 2026
914865e
unittest: complete the prerequisites of the two new langevin references
stanmoore1 Sep 5, 2026
90600a7
KOKKOS: sync the forces back to the device inside the minimizer
stanmoore1 Sep 5, 2026
86571ec
KOKKOS: bring the crossterm lists of fix cmap to the device
stanmoore1 Sep 5, 2026
364a5b0
KOKKOS: tally the Wolf/DSF self energy in a device kernel
stanmoore1 Sep 5, 2026
183e896
export macOS architecture and deployment settings to LAMMPS-GUI exter…
akohlmey Sep 5, 2026
b3df59c
KOKKOS: restore the contact history of fix NEIGH_HISTORY from a restart
stanmoore1 Sep 5, 2026
27e7f3e
unittest: keep the "sort no" kokkos profile on the half neighbor list
stanmoore1 Sep 5, 2026
7039b3d
alternate approach to export multi-arch settings to external project
akohlmey Sep 5, 2026
dc34bac
fix typo
akohlmey Sep 5, 2026
8345f4d
KOKKOS: stop copying arrays the styles never read
stanmoore1 Sep 5, 2026
ad042be
use modern syntax
akohlmey Sep 8, 2026
bc3965e
granular: keep the contact history fix id stable across a restart
stanmoore1 Sep 8, 2026
90e57c9
Fix the force expression in pair style lj/expand/sphere
stanmoore1 Sep 8, 2026
6c73f28
Fix inner-cutoff indexing in compute sna/grid and sna/grid/local
stanmoore1 Sep 8, 2026
01e20d8
Fix wrong mask index in AtomVec::pack_comm_vel and pack_border_vel
stanmoore1 Sep 8, 2026
461f1f9
Widen Pair::special_lj to double
stanmoore1 Sep 8, 2026
d010bd0
Detect a temp/region bias compute with a suffix
stanmoore1 Sep 8, 2026
9ef5ff2
KOKKOS: fix neighbor list build defects
stanmoore1 Sep 8, 2026
4bed7e3
KOKKOS: give dual_hash_type a clear_sync_state and use it in map_clear
stanmoore1 Sep 8, 2026
1c367b0
KOKKOS: fix core infrastructure defects
stanmoore1 Sep 8, 2026
490ba8b
KOKKOS: fix pppm, tip4p and the phonon drivers
stanmoore1 Sep 8, 2026
d02f7de
KOKKOS: fix bonded style defects
stanmoore1 Sep 8, 2026
1b110d2
KOKKOS: fix defects in fix and compute styles
stanmoore1 Sep 8, 2026
a2ee702
KOKKOS: fix wrong forces and energies in several pair styles
stanmoore1 Sep 8, 2026
2cc2275
KOKKOS: sync charges for the DSF and Wolf host self-energy loops
stanmoore1 Sep 8, 2026
4afd7d4
KOKKOS: guard the global energy with eflag_global, not eflag
stanmoore1 Sep 8, 2026
e5122f4
KOKKOS: apply the fix adapt scale factor in meam and eam
stanmoore1 Sep 8, 2026
aca8a8f
KOKKOS: fix the bzero shift and the central-atom lookup in SNAP
stanmoore1 Sep 8, 2026
899cbef
KOKKOS: remaining pair style and accessor fixes
stanmoore1 Sep 8, 2026
7735803
test: read KOKKOS_PREC in python-capabilities instead of assuming double
stanmoore1 Sep 8, 2026
72fdd8a
doc: record the KOKKOS restrictions added by these fixes
stanmoore1 Sep 8, 2026
5565107
KOKKOS: add math_special_kokkos.cpp to the CMake source list
stanmoore1 Sep 8, 2026
8a381fe
Use fix property/atom/kk whenever the KOKKOS package is active
stanmoore1 Sep 8, 2026
f533e41
Merge remote-tracking branch 'origin/claude/kokkos-lammps-test-covera…
stanmoore1 Sep 8, 2026
05f0962
Merge branch 'claude/kokkos-bugfixes' into claude/kokkos-lammps-merge…
stanmoore1 Sep 8, 2026
0f41f08
unittest: skip KOKKOS cases that need unported styles, skip omp in bo…
stanmoore1 Sep 8, 2026
4baea44
doc: use the spelling 'back end' in the KOKKOS_DEBUG_RNG description
stanmoore1 Sep 8, 2026
82ceb24
OPENMP: reduce per-atom energy and virial into the style that owns th…
stanmoore1 Sep 8, 2026
3658bac
KOKKOS: clear the stale team scratch request on the ghost neighbor build
stanmoore1 Sep 8, 2026
453774c
KOKKOS: bound the stencil bin lookup in the ghost neighbor team kernel
stanmoore1 Sep 8, 2026
63660d3
KOKKOS: re-enable the team policy for the ghost neighbor list build
stanmoore1 Sep 8, 2026
6111169
Hand the host writes of atom creation over to KOKKOS
stanmoore1 Sep 8, 2026
bec1dd4
KOKKOS: sync the per-atom dual views before the device exchange unpack
stanmoore1 Sep 8, 2026
a16f0b9
unittest: run the stochastic references single-threaded on the KOKKOS…
stanmoore1 Sep 8, 2026
6b8d840
hack to try and make the lammps-gui binary find the LAMMPS shared lib…
akohlmey Sep 8, 2026
c043a69
Merge branch 'kk-bugfixes' into claude/kokkos-lammps-merge-verify-298nev
stanmoore1 Sep 8, 2026
96c6b11
fix wall/piston: initialize the temperature seed, seed the KOKKOS poo…
stanmoore1 Sep 8, 2026
22d3173
unittest: skip the KOKKOS cases of the tally compute and sph references
stanmoore1 Sep 8, 2026
5927737
Merge pull request #5177 from akohlmey/collected-small-changes
akohlmey Sep 8, 2026
7fb1776
Merge branch 'develop' of github.com:lammps/lammps into bugfixes
stanmoore1 Sep 8, 2026
b7ac38e
fix baoab: form the noise amplitude without cancellation, skip force/…
stanmoore1 Sep 9, 2026
6cd5450
compute pe/atom, stress/atom, centroid/stress/atom: zero ghost entrie…
stanmoore1 Sep 9, 2026
65f29f9
flag slow tests as slow
akohlmey Sep 9, 2026
9df17fb
update unittest YAML file tags
akohlmey Sep 9, 2026
82d8474
remove some dead code
akohlmey Sep 9, 2026
53e25bd
skip failing/crashing tests (for now)
akohlmey Sep 9, 2026
71974e2
test: cover the self energy of the DSF and Wolf styles as hybrid sub-…
stanmoore1 Sep 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 7 additions & 1 deletion cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,13 @@ install(
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/profile.d
)

###############################################################################
# On Linux systems (any others, too?) we may need to update the shared linker cache
###############################################################################
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
install(CODE "execute_process(COMMAND ldconfig || exit 0)")
endif()

###############################################################################
# Install LAMMPS lib and python module into site-packages folder with
# "install-python" target. Behaves exactly like "make install-python" for
Expand Down Expand Up @@ -939,7 +946,6 @@ add_custom_target(tarball
COMMAND ${LAMMPS_DIR}/cmake/packaging/build_tarball.sh ${LAMMPS_DIR}/doc
)


include(Testing)
include(CodeCoverage)
include(CodingStandard)
Expand Down
9 changes: 7 additions & 2 deletions cmake/Modules/ExternalCMakeProject.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,13 @@ function(ExternalCMakeProject target url hash basedir cmakedir cmakefile)
# to a new archive version, compiled objects in an existing build directory appear
# newer than the updated headers and are not recompiled, which leads to failed
# links or subtly inconsistent binaries.
file(ARCHIVE_EXTRACT INPUT ${CMAKE_BINARY_DIR}/_deps/${archive}
DESTINATION ${CMAKE_BINARY_DIR}/_deps/src TOUCH)
if(CMAKE_VERSION VERSION_LESS 3.24)
file(ARCHIVE_EXTRACT INPUT ${CMAKE_BINARY_DIR}/_deps/${archive}
DESTINATION ${CMAKE_BINARY_DIR}/_deps/src)
else()
file(ARCHIVE_EXTRACT INPUT ${CMAKE_BINARY_DIR}/_deps/${archive}
DESTINATION ${CMAKE_BINARY_DIR}/_deps/src TOUCH)
endif()
file(GLOB TARGET_SOURCE "${CMAKE_BINARY_DIR}/_deps/src/${basedir}*")
list(LENGTH TARGET_SOURCE _num)
if(_num GREATER 1)
Expand Down
16 changes: 16 additions & 0 deletions cmake/Modules/Packages/KOKKOS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,23 @@ string(TOUPPER ${KOKKOS_LAYOUT} KOKKOS_LAYOUT)

target_compile_definitions(lammps PRIVATE -DLMP_KOKKOS_LAYOUT_${KOKKOS_LAYOUT})

# Use the host random number generator in KOKKOS styles. This makes runs with
# the KOKKOS package reproduce the results of the corresponding plain styles,
# which is required for validating them, but it is slow and not thread safe.
option(KOKKOS_DEBUG_RNG "Use the host random number generator in KOKKOS styles (for testing only)" OFF)
mark_as_advanced(KOKKOS_DEBUG_RNG)

if(KOKKOS_DEBUG_RNG)
target_compile_definitions(lammps PRIVATE -DLMP_KOKKOS_DEBUG_RNG)
endif()

message(STATUS "Using " ${KOKKOS_PREC_LOWER} " precision for KOKKOS package")
message(STATUS "Using " ${KOKKOS_LAYOUT_LOWER} " view layout for KOKKOS package")
if(KOKKOS_DEBUG_RNG)
message(STATUS "Using host random numbers for KOKKOS package")
else()
message(STATUS "Using device random numbers for KOKKOS package")
endif()

########################################################################
# consistency checks and Kokkos options/settings required by LAMMPS
Expand Down Expand Up @@ -192,6 +207,7 @@ set(KOKKOS_PKG_SOURCES ${KOKKOS_PKG_SOURCES_DIR}/kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/npair_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/npair_halffull_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/domain_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/math_special_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/modify_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/rand_pool_wrap_kokkos.cpp
${KOKKOS_PKG_SOURCES_DIR}/tune_kokkos.cpp
Expand Down
76 changes: 40 additions & 36 deletions cmake/Modules/StyleHeaderUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,22 @@ endfunction(GenerateStyleHeaders)
# one_arg = TRUE selects the creator signature (LAMMPS*); FALSE selects
# (LAMMPS*,int,char**). Generated files are accumulated in the global property
# LAMMPS_STYLE_SOURCES for adding to the lammps target.
#
# Each header is walked with a small state machine: 0 = before the
# "#ifdef XXX_CLASS" marker block, 1 = inside it, 2 = after it.
#
# Some style headers wrap the *whole* file, marker block included, in one or
# more build-configuration guards (a compiler feature test or a library feature
# macro such as LAMMPS_ZSTD or LMP_HAS_NETCDF), so the class is only defined
# when that feature is available. Every conditional directive seen in state 0
# is collected as such an outer guard and re-emitted around both the #include
# and the registration calls of that header, so a style whose class definition
# is compiled out is not registered either. (By LAMMPS convention the only
# conditionals allowed before the marker block are such guards; the include
# guard of the header lives inside the #else branch.) Inside the marker block
# (state 1) each XxxStyle(key,Class) marker becomes an explicit add_builtin()
# call and nested preprocessor directives are copied verbatim so
# build-config-dependent markers stay guarded.
function(CreateStyleSource path property style macro base accessor regfunc one_arg includes)
get_property(files GLOBAL PROPERTY ${property})

Expand All @@ -169,68 +185,53 @@ function(CreateStyleSource path property style macro base accessor regfunc one_a
endforeach()
list(SORT pairs)

# Some style headers wrap their class definition in a build-configuration
# guard (compiler or library feature macro) placed *outside* the
# "#ifdef XXX_CLASS" marker block, so the marker parser below cannot see it.
# Skip those headers during normal parsing and emit their #include and
# registration call by hand, wrapped in the same guard expression.
set(special_hdr "pair_snap_intel.h" "dump_netcdf.h" "dump_netcdf_mpiio.h")
set(special_guard "defined(__AVX512F__) && (defined(__INTEL_COMPILER) || defined(__INTEL_LLVM_COMPILER))" "defined(LMP_HAS_NETCDF)" "defined(LMP_HAS_PNETCDF)")
set(special_key "snap/intel" "netcdf" "netcdf/mpiio")
set(special_cls "PairSNAPIntel" "DumpNetCDF" "DumpNetCDFMPIIO")

set(include_block "")
set(entry_block "")
set(present_specials "")
foreach(entry ${pairs})
string(REGEX REPLACE "^[^|]*\\|" "" fname "${entry}")
get_filename_component(bname ${fname} NAME)
list(FIND special_hdr "${bname}" spidx)
if(NOT spidx EQUAL -1)
list(APPEND present_specials ${spidx})
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${fname}")
continue()
endif()
set(include_block "${include_block}#include \"${bname}\"\n")
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${fname}")

# walk the marker block (between "#ifdef XXX_CLASS" and the matching
# "#else"/"#endif"). Convert each XxxStyle(key,Class) marker into an
# explicit add_builtin() and copy any nested preprocessor directives
# verbatim so build-config-dependent markers stay guarded.
file(STRINGS ${fname} all_lines)
set(state 0)
set(depth 0)
set(outer_guards "")
set(file_entries "")
foreach(line IN LISTS all_lines)
if(state EQUAL 0)
if("${line}" MATCHES "^#ifdef[ \t]+[A-Z_]+_CLASS")
set(state 1)
set(depth 1)
elseif("${line}" MATCHES "^[ \t]*#[ \t]*if")
string(STRIP "${line}" dline)
list(APPEND outer_guards "${dline}")
elseif("${line}" MATCHES "^[ \t]*#[ \t]*endif")
list(POP_BACK outer_guards)
endif()
elseif(state EQUAL 1)
if("${line}" MATCHES "^[ \t]*#[ \t]*if")
math(EXPR depth "${depth} + 1")
string(STRIP "${line}" dline)
set(entry_block "${entry_block}${dline}\n")
set(file_entries "${file_entries}${dline}\n")
elseif("${line}" MATCHES "^[ \t]*#[ \t]*elif")
if(depth GREATER 1)
string(STRIP "${line}" dline)
set(entry_block "${entry_block}${dline}\n")
set(file_entries "${file_entries}${dline}\n")
endif()
elseif("${line}" MATCHES "^[ \t]*#[ \t]*else")
if(depth EQUAL 1)
set(state 2)
else()
string(STRIP "${line}" dline)
set(entry_block "${entry_block}${dline}\n")
set(file_entries "${file_entries}${dline}\n")
endif()
elseif("${line}" MATCHES "^[ \t]*#[ \t]*endif")
math(EXPR depth "${depth} - 1")
if(depth EQUAL 0)
set(state 2)
else()
string(STRIP "${line}" dline)
set(entry_block "${entry_block}${dline}\n")
set(file_entries "${file_entries}${dline}\n")
endif()
elseif("${line}" MATCHES "${macro}\\(([^)]*)\\)")
# the style keyword never contains a comma, so split on the
Expand All @@ -244,21 +245,24 @@ function(CreateStyleSource path property style macro base accessor regfunc one_a
string(SUBSTRING "${inner}" ${after} -1 cls)
string(STRIP "${key}" key)
string(STRIP "${cls}" cls)
set(entry_block "${entry_block} ${accessor}().add_builtin(\"${key}\", &creator<${cls}>);\n")
set(file_entries "${file_entries} ${accessor}().add_builtin(\"${key}\", &creator<${cls}>);\n")
endif()
endif()
endif()
endforeach()
endforeach()

# emit guarded #include + registration for the skipped special-case headers
foreach(spidx ${present_specials})
list(GET special_hdr ${spidx} shdr)
list(GET special_guard ${spidx} sguard)
list(GET special_key ${spidx} skey)
list(GET special_cls ${spidx} scls)
set(include_block "${include_block}#if ${sguard}\n#include \"${shdr}\"\n#endif\n")
set(entry_block "${entry_block}#if ${sguard}\n ${accessor}().add_builtin(\"${skey}\", &creator<${scls}>);\n#endif\n")
# wrap the #include and the registration calls of this header in its
# outer build-configuration guards (usually none)
set(guard_open "")
set(guard_close "")
foreach(guard IN LISTS outer_guards)
set(guard_open "${guard_open}${guard}\n")
set(guard_close "${guard_close}#endif\n")
endforeach()
set(include_block "${include_block}${guard_open}#include \"${bname}\"\n${guard_close}")
if(NOT "${file_entries}" STREQUAL "")
set(entry_block "${entry_block}${guard_open}${file_entries}${guard_close}")
endif()
endforeach()

set(preamble "#include \"lammps.h\"\n#include \"creator_registry.h\"\n")
Expand Down
19 changes: 19 additions & 0 deletions cmake/Modules/Tools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,28 @@ if(BUILD_LAMMPS_GUI)
if(NOT BUILD_SHARED_LIBS)
message(FATAL_ERROR "Building LAMMPS-GUI currently requires setting -D BUILD_SHARED_LIBS=ON")
endif()
# hack to support multi-arch builds for external project
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
list(JOIN CMAKE_OSX_ARCHITECTURES , MACOSX_ARCHS)
endif()
# hack to encode the LAMMPS build folder into the binary's rpath
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(LAMMPS_GUI_RPATH "@loader_path")
elseif(NOT WIN32)
set(LAMMPS_GUI_RPATH "\$ORIGIN")
endif()
if(LAMMPS_INSTALL_RPATH)
list(APPEND LAMMPS_GUI_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
endif()
list(JOIN LAMMPS_GUI_RPATH , LAMMPS_GUI_RPATH)

# When building LAMMPS-GUI with LAMMPS we don't support plugin mode and don't include docs.
ExternalProject_Add(lammps-gui_build
GIT_REPOSITORY https://github.com/akohlmey/lammps-gui.git
GIT_TAG main
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
LIST_SEPARATOR ,
CMAKE_ARGS -D BUILD_DOC=OFF
-D LAMMPS_GUI_USE_PLUGIN=OFF
-D LAMMPS_SOURCE_DIR=${LAMMPS_SOURCE_DIR}
Expand All @@ -67,6 +83,9 @@ if(BUILD_LAMMPS_GUI)
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-D CMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
-D CMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-D CMAKE_OSX_ARCHITECTURES=${MACOSX_ARCHS}
-D CMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
-D CMAKE_INSTALL_RPATH=${LAMMPS_GUI_RPATH}
DEPENDS lammps
BUILD_BYPRODUCTS <INSTALL_DIR>/bin/lammps-gui
)
Expand Down
4 changes: 2 additions & 2 deletions cmake/packaging/build_linux_tgz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ rm -rf ${DESTDIR}/lib64
rm -f ${DESTDIR}/lib/ld*.so ${DESTDIR}/lib/ld*.so.[0-9]
rm -f ${DESTDIR}/lib/lib{c,dl,rt,m,pthread}.so.?
rm -f ${DESTDIR}/lib/lib{c,dl,rt,m,pthread}-[0-9].[0-9]*.so
rm -f ${DESTDIR}/lib/libX* ${DESTDIR}/lib/libxcb*
rm -f ${DESTDIR}/lib/libX* ${DESTDIR}/lib/libxcb* ${DESTDIR}/lib/libxkb*
rm -f ${DESTDIR}/lib/libgcc_s*
rm -f ${DESTDIR}/lib/libstdc++*
echo "Remove oversize potential files"
Expand Down Expand Up @@ -70,7 +70,7 @@ do \
done

echo "Add additional plugins for Qt"
for dir in styles imageformats
for dir in styles imageformats tls iconengines
do \
cp -r ${QTDIR}/plugins/${dir} ${DESTDIR}/qtplugins/
chmod +x ${DESTDIR}/qtplugins/*/*.so
Expand Down
14 changes: 14 additions & 0 deletions doc/src/Build_extras.rst
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,20 @@ speedup on GPUs for some models, but a slowdown for others. LayoutRight
is always used for positions on GPUs since it has been found to be
faster, and when compiling exclusively for CPUs.

.. versionadded:: TBD

The CMake option ``-D KOKKOS_DEBUG_RNG=on`` makes those KOKKOS styles
that need random numbers (for example :doc:`fix langevin <fix_langevin>`
or :doc:`fix brownian <fix_brownian>`) use the same random number
generator as the corresponding plain styles instead of the parallel
generator of the Kokkos library. A run on a single MPI process with the
Serial back end then follows the same trajectory as a run without the
KOKKOS package, which makes it possible to compare the two directly and
thus to validate the KOKKOS versions of those styles. This is a
validation and debugging aid only: the substitute generator is slower
and produces the same numbers only when there is no parallelism, so this
option must not be used for production simulations.

----------

.. _lepton:
Expand Down
4 changes: 2 additions & 2 deletions doc/src/Packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ consistent with the rest of LAMMPS.

The "Examples" column is a subdirectory in the examples directory of the
distribution which has one or more input scripts that use the package.
E.g. ``peptide`` refers to the ``examples/peptide`` directory; ``PACKAGES/atc`` refers
to the ``examples/PACKAGES/atc`` directory. The "Lib" column indicates``
E.g. ``peptide`` refers to the ``examples/peptide`` directory; ``PACKAGES/fep`` refers
to the ``examples/PACKAGES/fep`` directory. The "Lib" column indicates``
whether an extra library is needed to build and use the package:

* no = no library
Expand Down
4 changes: 3 additions & 1 deletion doc/src/atom_style.rst
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ By adding the flag *superellipsoid* to the *ellipsoid* atom_style
command, the particles can be superellipsoids, which are a
generalization of ellipsoids with two additional blockiness parameters
that control the shape. Superellipsoids also store the principal
moments of inertia of the particle.
moments of inertia of the particle. The *superellipsoid* option is not
supported by the KOKKOS package version of the *ellipsoid* atom style,
which will stop with an error message when the option is used.

For the *line* style, particles can be are idealized line segments
which store a per-particle mass and length and orientation (i.e. the
Expand Down
6 changes: 6 additions & 0 deletions doc/src/fix_nve_sphere.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ be point particles.
Use of the *disc* keyword is only allowed for 2d simulations, as
defined by the :doc:`dimension <dimension>` keyword.

.. versionchanged:: TBD

The KOKKOS version of this fix does not support the *dipole/dlm* option of
the *update* keyword and will stop with an error if it is requested. Use the
non-accelerated version of the fix for the DLM integrator.

Related commands
""""""""""""""""

Expand Down
4 changes: 3 additions & 1 deletion doc/src/kspace_modify.rst
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,9 @@ parameter-selection guidance in the more general dielectric-confined
setting, see :ref:`(Gao2025) <Gao2025>`. The *auto* setting is
currently supported by :doc:`kspace_style <kspace_style>` *ewald*, *pppm*,
*pppm/cg*, *pppm/tip4p*, *pppm/stagger*, and the corresponding
OpenMP/GPU/Intel variants that reuse the same slab-correction setup.
OpenMP/GPU/Intel variants that reuse the same slab-correction setup. The
KOKKOS variants do not support it and will stop with an error if it is
requested; use an explicit volfactor with those.

An alternative slab option can be invoked with the *nozforce* keyword
in lieu of the volfactor. This turns off all kspace forces in the z
Expand Down
9 changes: 9 additions & 0 deletions doc/src/pair_brownian.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@ brownian.
Only spherical particles are allowed for pair_style brownian/poly. The
volume fraction correction is not supported by pair_style brownian/poly.

.. versionchanged:: TBD

The KOKKOS versions of these styles require a half neighbor list and will
stop with an error if a full neighbor list is requested, as it is by default
on a GPU. A full list would visit each pair twice and draw independent
random numbers each time, so the stochastic part of the pair force would no
longer be equal and opposite. Use *package kokkos neigh half* with these
styles.

These pair styles are only compatible with the following wall fixes:
:doc:`fix wall/lj93, fix wall/lj126, fix wall/lj1043, fix wall/colloid,
fix wall/harmonic, fix wall/lepton, fix wall/morse, fix wall/table
Expand Down
7 changes: 5 additions & 2 deletions doc/src/pair_tersoff.rst
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,11 @@ This pair style requires the :doc:`newton <newton>` setting to be "on"
for pair interactions.

The *shift* keyword is not supported by the *tersoff/gpu*,
*tersoff/intel*, *tersoff/kk*, *tersoff/table* or *tersoff/table/omp*
variants.
*tersoff/intel*, *tersoff/table* or *tersoff/table/omp* variants.

.. versionchanged:: TBD

The *shift* keyword is now also supported by the *tersoff/kk* variant.

The *tersoff/intel* pair style is only available when compiling LAMMPS
with the Intel compilers.
Expand Down
8 changes: 6 additions & 2 deletions doc/src/pair_tersoff_mod.rst
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,12 @@ This pair style requires the :doc:`newton <newton>` setting to be "on"
for pair interactions.

The *shift* keyword is not supported by the *tersoff/gpu*,
*tersoff/intel*, *tersoff/kk*, *tersoff/table* or *tersoff/table/omp*
variants.
*tersoff/intel*, *tersoff/table* or *tersoff/table/omp* variants.

.. versionchanged:: TBD

The *shift* keyword is now also supported by the *tersoff/mod/kk* and
*tersoff/mod/c/kk* variants.

The *tersoff/mod* potential files provided with LAMMPS (see the potentials
directory) are parameterized for metal :doc:`units <units>`. You can
Expand Down
9 changes: 7 additions & 2 deletions doc/src/pair_tersoff_zbl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,13 @@ LAMMPS was built with that package. See the :doc:`Build package
This pair style requires the :doc:`newton <newton>` setting to be "on"
for pair interactions.

The *shift* keyword is currently not supported for the *tersoff/gpu* and
*tersoff/kk* variants of this pair style.
The *shift* keyword is currently not supported for the *tersoff/gpu*
variant of this pair style.

.. versionchanged:: TBD

The *shift* keyword is now also supported by the *tersoff/zbl/kk*
variant.

The tersoff/zbl potential files provided with LAMMPS (see the potentials
directory) are parameterized for :doc:`"metal" units <units>`. Also the
Expand Down
Loading