From 4a95e69111749138216a803e970893dfb920f9c9 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 5 Sep 2014 15:27:05 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12410 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/atom.h | 2 +- src/fix_addforce.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/atom.h b/src/atom.h index f8f45457ef..1ba60b6ca5 100644 --- a/src/atom.h +++ b/src/atom.h @@ -223,7 +223,7 @@ class Atom : protected Pointers { int add_custom(char *, int); void remove_custom(int, int); - virtual void sync_modify(unsigned int, unsigned int) {} + virtual void sync_modify(ExecutionSpace, unsigned int, unsigned int) {} void *extract(char *); diff --git a/src/fix_addforce.cpp b/src/fix_addforce.cpp index c14f6f7761..baa09bb794 100644 --- a/src/fix_addforce.cpp +++ b/src/fix_addforce.cpp @@ -16,6 +16,7 @@ #include "fix_addforce.h" #include "atom.h" #include "atom_masks.h" +#include "accelerator_kokkos.h" #include "update.h" #include "modify.h" #include "domain.h" @@ -236,8 +237,9 @@ void FixAddForce::post_force(int vflag) if (update->ntimestep % nevery) return; - atom->sync_modify((unsigned int) (F_MASK | MASK_MASK), - (unsigned int) F_MASK); + if (lmp->kokkos->kokkos_exists) + atom->sync_modify(Host, (unsigned int) (F_MASK | MASK_MASK), + (unsigned int) F_MASK); // update region if necessary