Kokkos pair_style hybrid MEAM error

Hello LAMMPS users,

I am encountering an error when attempting to use the MEAM potential with other potential functions using the Kokkos package for GPU acceleration.

I am using the pair_style hybrid command to use MEAM with other potentials, specifically Tersoff and Lennard-Jones (L-J).

System Information

  • LAMMPS Version: lammps-22Jul2025-update-2
  • Kokkos Version: 4.6.2
  • Operating System: WSL-Ubuntu 24.04.1
  • GPU: NVIDIA GeForce RTX 5070
  • CPU: AMD Ryzen Threadripper PRO 7995WX

The Problem

The main issue appears to be that the “error :cuda illegal memory access” or “blows up” specifically when using the MEAM potential with other potentials accelerated with Kokkos-GPU. However MEAM potential alone runs perfectly fine and also runs successfully when using the CPU (without Kokkos).

I have performed several tests to isolate the problem.

The followings are the cases I have tried

Case 1
Potential function : pair_style hybrid meam meam lj/cut lj/cut
Acceleration : Kokkos - GPU
Result : Failed (Throws an cuda illegal memory access error immediately after as the input script is read)

Case 2
Potential function : pair_style hybrid meam meam lj/cut lj/cut
Acceleration : CPU (no Kokkos)
Result : Success

Case 3
Potential function : pair_style hybrid meam tersoff lj/cut lj/cut
Acceleration : Kokkos - GPU
Result : Failed (System blows up when two different object, one using a meam and the other tersoff potential, gets close)

Case 4
Potential function : pair_style hybrid meam tersoff lj/cut lj/cut
Acceleration : CPU (no Kokkos)
Result : Success

Case 5
Potential function : pair_style hybrid tersoff tersoff lj/cut lj/cut
Acceleration : Kokkos - GPU
Result : Success

Case 6
Potential function : pair_style hybrid tersoff tersoff lj/cut lj/cut
Acceleration : CPU (no Kokkos)
Result : Success

Case 7
Potential function :pair_style meam
Acceleration : Kokkos - GPU
Result : Success

Commands Used

Kokkos - GPU Run Command:

mpirun -np 1 lmp -k on g 1 -sf kk -pk kokkos neigh half newton on -in test.lmp

CPU Run Command (for comparison):

lmp -pk omp 190 -sf omp -in test.lmp

I have uploaded the relevant input scripts, log files, dump files, and potential files for each case.

Any advice or insights into why the MEAM potential fails specifically with Kokkos-GPU acceleration would be greatly appreciated.

Thank you for your time and help.

@FTLMD I can reproduce the issue. I think this should work so it appears to be a bug. I tried running on an H100 GPU with UVM but the crash persisted so it isn’t a simple case of missing data transfer. I need to debug more.

1 Like

Should be fixed by Fix indexing bug with skip lists in Kokkos MEAM · lammps/lammps@92275e6 · GitHub.

1 Like