Merge pull request #3615 from stanmoore1/kk_small_fixes
Small bugfixes for Kokkos
This commit is contained in:
@ -39,7 +39,7 @@ FixNVTKokkos<DeviceType>::FixNVTKokkos(LAMMPS *lmp, int narg, char **arg) :
|
||||
// id = fix-ID + temp
|
||||
|
||||
this->id_temp = utils::strdup(std::string(this->id)+"_temp");
|
||||
this->modify->add_compute(fmt::format("{} all temp/kk",this->id_temp));
|
||||
this->modify->add_compute(fmt::format("{} {} temp/kk",this->id_temp,this->group->names[this->igroup]));
|
||||
this->tcomputeflag = 1;
|
||||
}
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@ FixNVTSllodKokkos<DeviceType>::FixNVTSllodKokkos(LAMMPS *lmp, int narg, char **a
|
||||
}
|
||||
|
||||
this->id_temp = utils::strdup(std::string(this->id)+"_temp");
|
||||
this->modify->add_compute(fmt::format("{} all temp/deform/kk",this->id_temp));
|
||||
this->modify->add_compute(fmt::format("{} {} temp/deform/kk",this->id_temp,this->group->names[this->igroup]));
|
||||
this->tcomputeflag = 1;
|
||||
this->nondeformbias = 0;
|
||||
}
|
||||
|
||||
@ -77,9 +77,8 @@ void FixSetForceKokkos<DeviceType>::init()
|
||||
template<class DeviceType>
|
||||
void FixSetForceKokkos<DeviceType>::post_force(int /*vflag*/)
|
||||
{
|
||||
atomKK->sync(execution_space, X_MASK | F_MASK | MASK_MASK);
|
||||
atomKK->sync(execution_space, F_MASK | MASK_MASK);
|
||||
|
||||
x = atomKK->k_x.view<DeviceType>();
|
||||
f = atomKK->k_f.view<DeviceType>();
|
||||
mask = atomKK->k_mask.view<DeviceType>();
|
||||
|
||||
@ -88,6 +87,8 @@ void FixSetForceKokkos<DeviceType>::post_force(int /*vflag*/)
|
||||
// update region if necessary
|
||||
|
||||
if (region) {
|
||||
if (!utils::strmatch(region->style, "^block"))
|
||||
error->all(FLERR,"Cannot (yet) use {}-style region with fix setforce/kk",region->style);
|
||||
region->prematch();
|
||||
DAT::tdual_int_1d k_match = DAT::tdual_int_1d("setforce:k_match",nlocal);
|
||||
KokkosBase* regionKKBase = dynamic_cast<KokkosBase*>(region);
|
||||
|
||||
@ -513,6 +513,7 @@ double MinKokkos::energy_force(int resetflag)
|
||||
if (modify->n_min_post_force) {
|
||||
timer->stamp();
|
||||
modify->min_post_force(vflag);
|
||||
atomKK->sync(Device,F_MASK);
|
||||
timer->stamp(Timer::MODIFY);
|
||||
}
|
||||
|
||||
|
||||
@ -48,7 +48,8 @@ void RegBlockKokkos<DeviceType>::match_all_kokkos(int groupbit_in, DAT::tdual_in
|
||||
groupbit = groupbit_in;
|
||||
d_match = k_match_in.template view<DeviceType>();
|
||||
|
||||
atomKK->sync(Device, X_MASK | MASK_MASK);
|
||||
auto execution_space = ExecutionSpaceFromDevice<DeviceType>::space;
|
||||
atomKK->sync(execution_space, X_MASK | MASK_MASK);
|
||||
|
||||
x = atomKK->k_x.view<DeviceType>();
|
||||
mask = atomKK->k_mask.view<DeviceType>();
|
||||
|
||||
Reference in New Issue
Block a user