Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
57f2c1f
KOKKOS: type-check the boundary tally computes before casting
claude Aug 21, 2026
f07af57
KOKKOS: apply the constant external field in axisymmetric runs
claude Aug 21, 2026
e42a260
KOKKOS: stop the TCE reaction search at the first reaction that passes
claude Aug 21, 2026
776784b
KOKKOS: keep the QK rejection samplers off the reaction probability
claude Aug 21, 2026
b70336f
KOKKOS: forward the caller's particle index to fix surf_react()
claude Aug 21, 2026
5f043ce
KOKKOS: give the owned surf lists their own sync mask
claude Aug 21, 2026
5b3fcfe
KOKKOS: register the host write in Particle::zero_custom()
claude Aug 21, 2026
1655524
KOKKOS: reject "outside yes" in fix grid/check/kk instead of ignoring it
claude Aug 21, 2026
eea03dd
KOKKOS: drop three dead reaction-style guards in collide vss/kk
claude Aug 21, 2026
07cc1e9
KOKKOS: correct the collective_flag comment in compute fft/grid/kk
claude Aug 21, 2026
c8ee9fc
KOKKOS: account for device allocations in memory_usage()
claude Aug 21, 2026
24664c7
KOKKOS: add fix field/grid/kk and fix field/particle/kk
claude Aug 21, 2026
9110656
KOKKOS: dispatch surf tally computes by type in fix emit/surf/kk
claude Aug 21, 2026
25c6d26
Skip the return particle copy for host fixes that write no particles
claude Aug 21, 2026
1b22680
doc: correct the KOKKOS accelerated-style listings and restrictions
claude Aug 21, 2026
432a02a
KOKKOS: add region union/kk and intersect/kk via flattened descriptors
claude Aug 21, 2026
c8fec2d
KOKKOS: lift both surf_react adsorb restrictions
claude Aug 21, 2026
56baacb
KOKKOS: keep post_weight on the device, and parallelize it off EXACT
claude Aug 21, 2026
027246b
KOKKOS: restore the region guard in the emit kernels
claude Aug 21, 2026
e815ca5
KOKKOS: add the four per-event tally computes
claude Aug 21, 2026
3eb2d1e
KOKKOS: use the reaction value enum in compute gas/reaction/tally/kk
claude Aug 21, 2026
846cbf1
KOKKOS: lift the surf_collide instance caps, and fix the tally overfl…
claude Aug 21, 2026
56ec41b
KOKKOS: record why comm_serial is the CPU default
claude Aug 21, 2026
a658fcd
KOKKOS: support reactions and near-neighbor in group collisions
claude Aug 21, 2026
aae2cf3
KOKKOS: fix the ambipolar group list indexing regression
claude Aug 21, 2026
7732451
KOKKOS: cleanup, and mark host-parity restrictions as such
claude Aug 21, 2026
e4801b1
doc: bring the KOKKOS listings up to date with what is now supported
claude Aug 21, 2026
42b71e7
KOKKOS: lift the compute-instance caps in update
claude Aug 21, 2026
3baa1bf
KOKKOS: lift the gas tally caps, behind a compile-time switch
claude Aug 21, 2026
c251244
Add twopass keyword to fix emit/face/file and fix emit/surf docs
claude Aug 21, 2026
e7b6637
Open up FixEmitFaceFile for a Kokkos subclass
claude Aug 22, 2026
b99da78
KOKKOS: let fix ave/grid/kk consume fixes, and fix a tally sync bug
claude Aug 22, 2026
5452459
KOKKOS: support nested region union and intersect
claude Aug 22, 2026
59384a6
KOKKOS: lift the MAXGROUP collision-group cap
claude Aug 22, 2026
1a0344e
KOKKOS: lift SRA_KK_MAXPERSPECIES, behind the fixed-lists switch
claude Aug 22, 2026
d075321
KOKKOS: lift the surf_react instance caps, behind the fixed-lists switch
claude Aug 22, 2026
974b334
KOKKOS: add fix emit/face/file/kk
claude Aug 22, 2026
d8afdeb
KOKKOS: guard the device surf react dispatch on isr >= 0
claude Aug 22, 2026
b0407d9
KOKKOS: add compute reduce/kk and compute react/boundary/kk
claude Aug 22, 2026
db282d4
KOKKOS: lift the surf-tally compute cap on fix emit/surf
claude Aug 22, 2026
7741cfd
KOKKOS: support reacting multigroup ambipolar collisions
claude Aug 22, 2026
6fc9485
KOKKOS: publish the field fix results without an element-wise copy
claude Aug 22, 2026
f4b4f55
KOKKOS: fix a startup segfault off EXACT, plus four review findings
claude Aug 22, 2026
09fc689
Fix restart filename truncation, and bound every fixed-buffer sprintf
claude Aug 22, 2026
e83a483
tests: close the highest-value CI coverage gaps
claude Aug 22, 2026
7866805
Initialize the Compute output pointers, fixing a heap corruption
claude Aug 22, 2026
9bf5ab5
Fix four defects found reviewing the branch against master
claude Aug 22, 2026
7a6b64c
KOKKOS: fix the min/max statistic and the scalar weight in fix ave/histo
claude Aug 22, 2026
43f7584
examples: cover regions, QK chemistry and piston/vanish
claude Aug 22, 2026
4294957
KOKKOS: fix four host/device coherence faults found by the sync debugger
claude Aug 22, 2026
7614fde
KOKKOS: claim the surf custom arrays that SurfReactAdsorb writes on t…
claude Aug 22, 2026
3b90fd5
KOKKOS: publish a fix's per-grid output to the device before reading it
claude Aug 23, 2026
9a43c9a
KOKKOS: fix host/device coherence bugs found by a split-memory detect…
claude Aug 22, 2026
7269e9a
KOKKOS: don't claim the host in grow_percell, the device owns vremax …
claude Aug 23, 2026
14486bc
KOKKOS: fold the histogram reducer instead of binding it to the windo…
claude Aug 24, 2026
00a0244
KOKKOS: scan the post-weight counts in 64-bit via offset_scan()
claude Aug 24, 2026
942f490
KOKKOS: claim the surf custom arrays only on a sync step
claude Aug 24, 2026
2cb8d92
KOKKOS: stop re-deriving and re-uploading per-step data that cannot c…
claude Aug 24, 2026
fc9cc48
KOKKOS: declare post_weight's count view as a plain Kokkos::View
claude Aug 24, 2026
7bb5662
Merge origin/small_bugfixes into the KOKKOS feature branch
claude Aug 24, 2026
2fefb6e
tests: drop the relax_const/relax_variable gold logs
claude Aug 24, 2026
d090319
tests: add relax_const/relax_variable gold logs blessed on the CI runner
claude Aug 24, 2026
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
9 changes: 9 additions & 0 deletions cmake/common/process/sparta_build_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,15 @@ endif()
set(SPARTA_DEFAULT_CXX_COMPILE_FLAGS -DSPARTA_KOKKOS_EXACT
${SPARTA_DEFAULT_CXX_COMPILE_FLAGS})
endif()
# SPARTA_KOKKOS_FIXED_LISTS restores the fixed-size KKCopy arrays for the
# per-type tally compute lists instead of runtime-sized device buffers. The
# buffers lift the instance caps; the arrays keep every compute inside the
# kernel functor. Which performs better is hardware-dependent -- functor
# size trades against occupancy and data locality -- so both are buildable.
if(SPARTA_KOKKOS_FIXED_LISTS)
set(SPARTA_DEFAULT_CXX_COMPILE_FLAGS -DSPARTA_KOKKOS_FIXED_LISTS
${SPARTA_DEFAULT_CXX_COMPILE_FLAGS})
endif()
# PKG_KOKKOS depends on BUILD_KOKKOS
set(BUILD_KOKKOS ON)
endif()
Expand Down
7 changes: 4 additions & 3 deletions cmake/common/set/sparta_cmake_defaults.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ if(SPARTA_ENABLE_TESTING)
"surf_react_heatflux"
"chem_rates"
"custom"
"tally_computes"
"ambi_3body"
"regions"
"qk"
"explicit2implicit"
"mfp_mct"
"optmove"
Expand Down Expand Up @@ -89,9 +93,6 @@ if(SPARTA_ENABLE_TESTING)
# the non-KOKKOS configurations.
if(SPARTA_KOKKOS_EXACT)
list(APPEND SPARTA_DISABLED_TESTS
# external field fix not KOKKOS-enabled
"in.bfield"
"in.bfield.grid"
# VTK dump styles have no KOKKOS variant
"in.vtk"
"in.vtk.3d"
Expand Down
29 changes: 29 additions & 0 deletions doc/Section_accelerate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,35 @@ non-Kokkos fix or compute, or performing I/O for "stat"_stats.html or
"dump"_dump.html output will cause data to be copied back to the CPU
incurring a performance penalty.

NOTE: Most non-Kokkos styles degrade this way, costing performance but
still producing correct results. A few, however, are rejected outright
and will stop the run, rather than falling back to the host. Those
restrictions are documented on the page for the style that imposes them.

NOTE: A run may define any number of instances of the styles that the
device kernels capture -- "surf_collide"_surf_collide.html,
"surf_react"_surf_react.html, and the per-event tally computes such as
"compute boundary"_compute_boundary.html, "compute
surf"_compute_surf.html, "compute isurf/grid"_compute_isurf_grid.html,
"compute react/boundary"_compute_react_boundary.html, "compute
react/surf"_compute_react_surf.html and "compute
react/isurf/grid"_compute_react_isurf_grid.html. Each is held in a
runtime-sized device buffer, so there is no compile-time cap. The one
remaining exception is that at most two "compute
surf"_compute_surf.html instances may tally for a single "fix
emit/surf"_fix_emit_surf.html; exceeding that stops the run with an
explanatory message.

NOTE: Building with -DSPARTA_KOKKOS_FIXED_LISTS instead holds those
styles in fixed-size arrays inside the kernel functor, which restores
the former caps: at most two instances of each
"surf_react"_surf_react.html style, at most four surf react models in
total, at most two active instances of each per-event tally compute
listed above, and at most four gas-phase tally computes. The two
layouts produce identical results; which is faster is a
hardware-dependent question, so both are kept so they can be compared
by rebuilding.

[Run with the KOKKOS package by editing an input script:]

Alternatively the effect of the "-sf" or "-pk" switches can be
Expand Down
26 changes: 13 additions & 13 deletions doc/Section_commands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ section"_#cmd_4 lists many of the same commands, grouped by category.
"create_box"_create_box.html,
"create_grid"_create_grid.html,
"create_isurf"_create_isurf.html,
"create_particles"_create_particles.html,
"create_particles (k)"_create_particles.html,
"custom"_custom.html,
"dimension"_dimension.html,
"dump"_dump.html,
Expand Down Expand Up @@ -357,9 +357,9 @@ section"_#cmd_4 lists many of the same commands, grouped by category.
"read_isurf"_read_isurf.html,
"read_particles"_read_particles.html,
"read_restart"_read_restart.html,
"read_surf"_read_surf.html,
"read_surf (k)"_read_surf.html,
"region"_region.html,
"remove_surf"_remove_surf.html,
"remove_surf (k)"_remove_surf.html,
"reset_timestep"_reset_timestep.html,
"restart"_restart.html,
"run"_run.html,
Expand Down Expand Up @@ -410,14 +410,14 @@ This is indicated by additional letters in parenthesis: k = KOKKOS.
"dt/reset (k)"_fix_dt_reset.html,
"emit/face (k)"_fix_emit_face.html,
"emit/face/file"_fix_emit_face_file.html,
"emit/surf"_fix_emit_surf.html,
"field/grid"_fix_field_grid.html,
"field/particle"_fix_field_particle.html,
"emit/surf (k)"_fix_emit_surf.html,
"field/grid (k)"_fix_field_grid.html,
"field/particle (k)"_fix_field_particle.html,
"grid/check (k)"_fix_grid_check.html,
"halt"_fix_halt.html,
"move/surf (k)"_fix_move_surf.html,
"print"_fix_print.html,
"surf/temp"_fix_surf_temp.html,
"surf/temp (k)"_fix_surf_temp.html,
"temp/global/rescale (k)"_fix_temp_global_rescale.html,
"temp/rescale (k)"_fix_temp_rescale.html,
"vibmode (k)"_fix_vibmode.html :tb(c=6,ea=c)
Expand All @@ -440,24 +440,24 @@ letters in parenthesis: k = KOKKOS.
"eflux/grid (k)"_compute_eflux_grid.html,
"fft/grid (k)"_compute_fft_grid.html,
"gas/collision/grid (k)"_compute_gas_collision_grid.html,
"gas/collision/tally"_compute_gas_collision_tally.html,
"gas/collision/tally (k)"_compute_gas_collision_tally.html,
"gas/reaction/grid (k)"_compute_gas_reaction_grid.html,
"gas/reaction/tally"_compute_gas_reaction_tally.html,
"gas/reaction/tally (k)"_compute_gas_reaction_tally.html,
"grid (k)"_compute_grid.html,
"isurf/grid (k)"_compute_isurf_grid.html,
"ke/particle (k)"_compute_ke_particle.html,
"lambda/grid (k)"_compute_lambda_grid.html,
"pflux/grid (k)"_compute_pflux_grid.html,
"property/grid (k)"_compute_property_grid.html,
"property/surf (k)"_compute_property_surf.html,
"react/boundary"_compute_react_boundary.html,
"react/boundary (k)"_compute_react_boundary.html,
"react/surf (k)"_compute_react_surf.html,
"react/isurf/grid (k)"_compute_react_isurf_grid.html,
"reduce"_compute_reduce.html,
"reduce (k)"_compute_reduce.html,
"sonine/grid (k)"_compute_sonine_grid.html,
"surf (k)"_compute_surf.html,
"surf/collision/tally"_compute_surf_collision_tally.html,
"surf/reaction/tally"_compute_surf_reaction_tally.html,
"surf/collision/tally (k)"_compute_surf_collision_tally.html,
"surf/reaction/tally (k)"_compute_surf_reaction_tally.html,
"temp (k)"_compute_temp.html,
"thermal/grid (k)"_compute_thermal_grid.html,
"tvib/grid (k)"_compute_tvib_grid.html :tb(c=6,ea=c)
Expand Down
23 changes: 23 additions & 0 deletions doc/compute_gas_collision_grid.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,29 @@ for an overview of SPARTA output options.

:line

:line

Styles with a {kk} suffix are functionally the same as the
corresponding style without the suffix. They have been optimized to
run faster, depending on your available hardware, as discussed in the
"Accelerating SPARTA"_Section_accelerate.html section of the manual.
The accelerated styles take the same arguments and should produce the
same results, except for different random number, round-off and
precision issues.

These accelerated styles are part of the KOKKOS package. They are only
enabled if SPARTA was built with that package. See the "Making
SPARTA"_Section_start.html#start_3 section for more info.

You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the "-suffix command-line
switch"_Section_start.html#start_7 when you invoke SPARTA, or you can
use the "suffix"_suffix.html command in your input script.

See the "Accelerating SPARTA"_Section_accelerate.html section of the
manual for more instructions on how to use the accelerated styles
effectively.

[Restrictions:] none

[Related commands:]
Expand Down
23 changes: 23 additions & 0 deletions doc/compute_gas_collision_tally.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,29 @@ velocity keywords are in velocity units.

:line

:line

Styles with a {kk} suffix are functionally the same as the
corresponding style without the suffix. They have been optimized to
run faster, depending on your available hardware, as discussed in the
"Accelerating SPARTA"_Section_accelerate.html section of the manual.
The accelerated styles take the same arguments and should produce the
same results, except for different random number, round-off and
precision issues.

These accelerated styles are part of the KOKKOS package. They are only
enabled if SPARTA was built with that package. See the "Making
SPARTA"_Section_start.html#start_3 section for more info.

You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the "-suffix command-line
switch"_Section_start.html#start_7 when you invoke SPARTA, or you can
use the "suffix"_suffix.html command in your input script.

See the "Accelerating SPARTA"_Section_accelerate.html section of the
manual for more instructions on how to use the accelerated styles
effectively.

[Restrictions:] none

[Related commands:]
Expand Down
23 changes: 23 additions & 0 deletions doc/compute_gas_reaction_grid.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,29 @@ options.

:line

:line

Styles with a {kk} suffix are functionally the same as the
corresponding style without the suffix. They have been optimized to
run faster, depending on your available hardware, as discussed in the
"Accelerating SPARTA"_Section_accelerate.html section of the manual.
The accelerated styles take the same arguments and should produce the
same results, except for different random number, round-off and
precision issues.

These accelerated styles are part of the KOKKOS package. They are only
enabled if SPARTA was built with that package. See the "Making
SPARTA"_Section_start.html#start_3 section for more info.

You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the "-suffix command-line
switch"_Section_start.html#start_7 when you invoke SPARTA, or you can
use the "suffix"_suffix.html command in your input script.

See the "Accelerating SPARTA"_Section_accelerate.html section of the
manual for more instructions on how to use the accelerated styles
effectively.

[Restrictions:] none

[Related commands:]
Expand Down
23 changes: 23 additions & 0 deletions doc/compute_gas_reaction_tally.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,29 @@ velocity components are in velocity units.

:line

:line

Styles with a {kk} suffix are functionally the same as the
corresponding style without the suffix. They have been optimized to
run faster, depending on your available hardware, as discussed in the
"Accelerating SPARTA"_Section_accelerate.html section of the manual.
The accelerated styles take the same arguments and should produce the
same results, except for different random number, round-off and
precision issues.

These accelerated styles are part of the KOKKOS package. They are only
enabled if SPARTA was built with that package. See the "Making
SPARTA"_Section_start.html#start_3 section for more info.

You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the "-suffix command-line
switch"_Section_start.html#start_7 when you invoke SPARTA, or you can
use the "suffix"_suffix.html command in your input script.

See the "Accelerating SPARTA"_Section_accelerate.html section of the
manual for more instructions on how to use the accelerated styles
effectively.

[Restrictions:] none

[Related commands:]
Expand Down
24 changes: 24 additions & 0 deletions doc/compute_react_boundary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:line

compute react/boundary command :h3
compute react/boundary/kk command :h3

[Syntax:]

Expand Down Expand Up @@ -88,6 +89,29 @@ on each face.

:line

:line

Styles with a {kk} suffix are functionally the same as the
corresponding style without the suffix. They have been optimized to
run faster, depending on your available hardware, as discussed in the
"Accelerating SPARTA"_Section_accelerate.html section of the manual.
The accelerated styles take the same arguments and should produce the
same results, except for different random number, round-off and
precision issues.

These accelerated styles are part of the KOKKOS package. They are only
enabled if SPARTA was built with that package. See the "Making
SPARTA"_Section_start.html#start_3 section for more info.

You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the "-suffix command-line
switch"_Section_start.html#start_7 when you invoke SPARTA, or you can
use the "suffix"_suffix.html command in your input script.

See the "Accelerating SPARTA"_Section_accelerate.html section of the
manual for more instructions on how to use the accelerated styles
effectively.

[Restrictions:] none

[Related commands:]
Expand Down
33 changes: 33 additions & 0 deletions doc/compute_reduce.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:line

compute reduce command :h3
compute reduce/kk command :h3

[Syntax:]

Expand Down Expand Up @@ -263,6 +264,38 @@ overview of SPARTA output options.
The scalar or vector values will be in whatever "units"_units.html the
quantities being reduced are in.

:line

Styles with a {kk} suffix are functionally the same as the
corresponding style without the suffix. They have been optimized to
run faster, depending on your available hardware, as discussed in the
"Accelerating SPARTA"_Section_accelerate.html section of the manual.
The accelerated styles take the same arguments and should produce the
same results, except for different random number, round-off and
precision issues.

These accelerated styles are part of the KOKKOS package. They are only
enabled if SPARTA was built with that package. See the "Making
SPARTA"_Section_start.html#start_3 section for more info.

For the {kk} style, an input is reduced on the device when its source is
device-resident: the explicit per-particle attributes ({x}, {vx}, {ke},
{erot}, {evib}, etc), per-particle and per-grid custom attributes, and
the per-particle or per-grid output of a compute or fix that itself has
a {kk} variant. Every other input -- per-surf inputs, {v_name}
variables, and the output of a non-Kokkos compute or fix -- is reduced
on the host, after the data it reads is copied back. This is a
performance distinction only; the result is the same either way.

You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the "-suffix command-line
switch"_Section_start.html#start_7 when you invoke SPARTA, or you can
use the "suffix"_suffix.html command in your input script.

See the "Accelerating SPARTA"_Section_accelerate.html section of the
manual for more instructions on how to use the accelerated styles
effectively.

[Restrictions:] none

[Related commands:]
Expand Down
23 changes: 23 additions & 0 deletions doc/compute_surf_collision_tally.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,29 @@ are {vx/post}, {vy/post}, {vz/post}.

:line

:line

Styles with a {kk} suffix are functionally the same as the
corresponding style without the suffix. They have been optimized to
run faster, depending on your available hardware, as discussed in the
"Accelerating SPARTA"_Section_accelerate.html section of the manual.
The accelerated styles take the same arguments and should produce the
same results, except for different random number, round-off and
precision issues.

These accelerated styles are part of the KOKKOS package. They are only
enabled if SPARTA was built with that package. See the "Making
SPARTA"_Section_start.html#start_3 section for more info.

You can specify the accelerated styles explicitly in your input script
by including their suffix, or you can use the "-suffix command-line
switch"_Section_start.html#start_7 when you invoke SPARTA, or you can
use the "suffix"_suffix.html command in your input script.

See the "Accelerating SPARTA"_Section_accelerate.html section of the
manual for more instructions on how to use the accelerated styles
effectively.

[Restrictions:] none

[Related commands:]
Expand Down
Loading
Loading