Commit 5bc562b0 authored by stamoor's avatar stamoor
Browse files

Fixing Kokkos bugs

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15718 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 2a520347
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include "atom_masks.h"
#include "memory.h"
#include "error.h"
#include "kokkos.h"

using namespace LAMMPS_NS;

@@ -78,6 +79,9 @@ AtomKokkos::~AtomKokkos()

void AtomKokkos::sync(const ExecutionSpace space, unsigned int mask)
{
  if (space == Device && lmp->kokkos->auto_sync)
    ((AtomVecKokkos *) avec)->modified(Host,mask);

  ((AtomVecKokkos *) avec)->sync(space,mask);
}

@@ -86,6 +90,9 @@ void AtomKokkos::sync(const ExecutionSpace space, unsigned int mask)
void AtomKokkos::modified(const ExecutionSpace space, unsigned int mask)
{
  ((AtomVecKokkos *) avec)->modified(space,mask);

  if (space == Device && lmp->kokkos->auto_sync)
    ((AtomVecKokkos *) avec)->sync(Host,mask);
}

void AtomKokkos::sync_overlapping_device(const ExecutionSpace space, unsigned int mask)
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ enum{NO_REMAP,X_REMAP,V_REMAP};

FixDeformKokkos::FixDeformKokkos(LAMMPS *lmp, int narg, char **arg) : FixDeform(lmp, narg, arg)
{
  kokkosable = 1;
  domainKK = (DomainKokkos *) domain;

  datamask_read = EMPTY_MASK;
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ template<class DeviceType>
FixLangevinKokkos<DeviceType>::FixLangevinKokkos(LAMMPS *lmp, int narg, char **arg) :
  FixLangevin(lmp, narg, arg),rand_pool(seed + comm->me)
{
  kokkosable = 1;
  atomKK = (AtomKokkos *) atom;
  int ntypes = atomKK->ntypes;

+1 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ enum{ISO,ANISO,TRICLINIC};
template<class DeviceType>
FixNHKokkos<DeviceType>::FixNHKokkos(LAMMPS *lmp, int narg, char **arg) : FixNH(lmp, narg, arg)
{
  kokkosable = 1;
  domainKK = (DomainKokkos *) domain;
  execution_space = ExecutionSpaceFromDevice<DeviceType>::space;

+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ template<class DeviceType>
FixNPHKokkos<DeviceType>::FixNPHKokkos(LAMMPS *lmp, int narg, char **arg) :
  FixNHKokkos<DeviceType>(lmp, narg, arg)
{
  this->kokkosable = 1;
  if (this->tstat_flag)
    this->error->all(FLERR,"Temperature control can not be used with fix nph");
  if (!this->pstat_flag)
Loading