From 583f7b70b44c7c716caac4e415206e226933abd3 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Thu, 13 Feb 2025 12:41:16 -0700 Subject: [PATCH] Fix rare bug in KOKKOS, manifest when load balancing on GPUs and exchange comm is on host --- src/KOKKOS/comm_kokkos.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/KOKKOS/comm_kokkos.cpp b/src/KOKKOS/comm_kokkos.cpp index 5bf7464ac0..22800a1376 100644 --- a/src/KOKKOS/comm_kokkos.cpp +++ b/src/KOKKOS/comm_kokkos.cpp @@ -793,7 +793,10 @@ void CommKokkos::exchange() } atomKK->sync(Host,ALL_MASK); + int prev_auto_sync = lmp->kokkos->auto_sync; + lmp->kokkos->auto_sync = 1; CommBrick::exchange(); + lmp->kokkos->auto_sync = prev_auto_sync; atomKK->modified(Host,ALL_MASK); }