cuda bugfix

This commit is contained in:
alphataubio
2024-10-22 12:42:49 -04:00
parent 5c07882a18
commit 5bdd616bcd

View File

@ -88,17 +88,16 @@ void GroupKokkos<DeviceType>::xcm(int igroup, double masstotal, double *cm)
auto d_mask = atomKK->k_mask.template view<DeviceType>();
auto d_type = atomKK->k_type.template view<DeviceType>();
auto d_image = atomKK->k_image.template view<DeviceType>();
auto d_mass = atomKK->k_mass.template view<DeviceType>();
auto d_rmass = atomKK->k_rmass.template view<DeviceType>();
auto l_prd = domain->prd;
auto l_h = domain->h;
auto l_prd = Few<double, 3>(domain->prd);
auto l_h = Few<double, 6>(domain->h);
auto l_triclinic = domain->triclinic;
double cmone[3];
if (atomKK->rmass) {
auto d_rmass = atomKK->k_rmass.template view<DeviceType>();
Kokkos::parallel_reduce(atom->nlocal, KOKKOS_LAMBDA(const int i, double &l_cmx, double &l_cmy, double &l_cmz) {
if (d_mask(i) & groupbit) {
double massone = d_rmass(i);
@ -115,6 +114,8 @@ void GroupKokkos<DeviceType>::xcm(int igroup, double masstotal, double *cm)
} else {
auto d_mass = atomKK->k_mass.template view<DeviceType>();
Kokkos::parallel_reduce(atom->nlocal, KOKKOS_LAMBDA(const int i, double &l_cmx, double &l_cmy, double &l_cmz) {
if (d_mask(i) & groupbit) {
double massone = d_mass(d_type(i));