diff --git a/src/KOKKOS/dynamical_matrix_kokkos.cpp b/src/KOKKOS/dynamical_matrix_kokkos.cpp index f9f871d01a..7100830c89 100644 --- a/src/KOKKOS/dynamical_matrix_kokkos.cpp +++ b/src/KOKKOS/dynamical_matrix_kokkos.cpp @@ -135,6 +135,13 @@ void DynamicalMatrixKokkos::setup() update->setupflag = 0; lmp->kokkos->auto_sync = 0; + + //if all then skip communication groupmap population + if (gcount == atom->natoms) + for (bigint i=0; inatoms; i++) + groupmap[i] = i; + else + create_groupmap(); } /* ---------------------------------------------------------------------- @@ -155,6 +162,7 @@ void DynamicalMatrixKokkos::update_force() f_merge_copy = DAT::t_f_array("DynamicalMatrixKokkos::f_merge_copy",atomKK->k_f.extent(0)); + atomKK->modified(Host,X_MASK); atomKK->sync(Device,X_MASK); force_clear(); @@ -305,8 +313,10 @@ void DynamicalMatrixKokkos::update_force() } // force modifications - if (n_post_force) modify->post_force(vflag); - timer->stamp(Timer::MODIFY); + if (n_post_force) { + modify->post_force(vflag); + timer->stamp(Timer::MODIFY); + } atomKK->sync(Host,F_MASK); lmp->kokkos->auto_sync = 1; diff --git a/src/input.cpp b/src/input.cpp index 08f62bdb42..89fddc7f21 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -783,6 +783,19 @@ int Input::execute_command() // invoke commands added via style_command.h + if (lmp && lmp->suffix_enable && utils::strmatch(command,"^dynamical_matrix")) { + if (utils::strmatch(lmp->suffix, "^kk")) { + std::string cstyle = command + std::string("/") + lmp->suffix; + if (command_map->find(command) != command_map->end()) { + CommandCreator &command_creator = (*command_map)[cstyle]; + Command *cmd = command_creator(lmp); + cmd->command(narg, arg); + delete cmd; + return 0; + } + } + } + if (command_map->find(command) != command_map->end()) { CommandCreator &command_creator = (*command_map)[command]; Command *cmd = command_creator(lmp);