Fix logic for Kokkos hybrid atomvec
This commit is contained in:
@ -379,10 +379,14 @@ void AtomKokkos::sync_modify(ExecutionSpace execution_space, unsigned int datama
|
||||
|
||||
AtomVec *AtomKokkos::new_avec(const std::string &style, int trysuffix, int &sflag)
|
||||
{
|
||||
// check if avec already exists, if so this is a hybrid substyle
|
||||
|
||||
int hybrid_substyle_flag = (avec != nullptr);
|
||||
|
||||
AtomVec *avec = Atom::new_avec(style, trysuffix, sflag);
|
||||
if (!avec->kokkosable) error->all(FLERR, "KOKKOS package requires a kokkos enabled atom_style");
|
||||
|
||||
if (!avecKK) // for hybrid
|
||||
if (!hybrid_substyle_flag)
|
||||
avecKK = dynamic_cast<AtomVecKokkos*>(avec);
|
||||
|
||||
return avec;
|
||||
|
||||
Reference in New Issue
Block a user