Move instantiation of MemoryKokkos class
This commit is contained in:
@ -34,6 +34,8 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
|
||||
kokkos_exists = 1;
|
||||
lmp->kokkos = this;
|
||||
|
||||
delete memory;
|
||||
memory = new MemoryKokkos(lmp);
|
||||
memoryKK = (MemoryKokkos*) memory;
|
||||
|
||||
auto_sync = 1;
|
||||
|
||||
@ -472,9 +472,6 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator)
|
||||
|
||||
kokkos = NULL;
|
||||
if (kokkosflag == 1) {
|
||||
delete memory;
|
||||
memory = new MemoryKokkos(this);
|
||||
|
||||
kokkos = new KokkosLMP(this,kklast-kkfirst,&arg[kkfirst]);
|
||||
if (!kokkos->kokkos_exists)
|
||||
error->all(FLERR,"Cannot use -kokkos on without KOKKOS installed");
|
||||
|
||||
Reference in New Issue
Block a user