Move instantiation of MemoryKokkos class

This commit is contained in:
Stan Moore
2017-12-05 08:34:24 -07:00
parent 2813923f15
commit f64544a5fe
2 changed files with 2 additions and 3 deletions

View File

@ -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;

View File

@ -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");