debugged kokkos support to dynamical_matrix command
This commit is contained in:
@ -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; i<atom->natoms; 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);
|
||||
if (n_post_force) {
|
||||
modify->post_force(vflag);
|
||||
timer->stamp(Timer::MODIFY);
|
||||
}
|
||||
|
||||
atomKK->sync(Host,F_MASK);
|
||||
lmp->kokkos->auto_sync = 1;
|
||||
|
||||
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user