diff --git a/src/lammps.cpp b/src/lammps.cpp index c3151cf8f3..6af3d9a8b4 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -77,8 +77,8 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) int logflag = 0; int partscreenflag = 0; int partlogflag = 0; - int cudaflag = -1; - int kokkosflag = -1; + int cudaflag = 0; + int kokkosflag = 0; int restartflag = 0; int citeflag = 1; int helpflag = 0; @@ -428,18 +428,11 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) // create Cuda class if USER-CUDA installed, unless explicitly switched off // instantiation creates dummy Cuda class if USER-CUDA is not installed - if (cudaflag == 0) { - cuda = NULL; - } else if (cudaflag == 1) { + cuda = NULL; + if (cudaflag == 1) { cuda = new Cuda(this); if (!cuda->cuda_exists) error->all(FLERR,"Cannot use -cuda on without USER-CUDA installed"); - } else { - cuda = new Cuda(this); - if (!cuda->cuda_exists) { - delete cuda; - cuda = NULL; - } } int me; @@ -450,18 +443,11 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) // instantiation creates dummy Kokkos class if KOKKOS is not installed // add args between kkfirst and kklast to Kokkos instantiation - if (kokkosflag == 0) { - kokkos = NULL; - } else if (kokkosflag == 1) { + kokkos = NULL; + if (kokkosflag == 1) { kokkos = new KokkosLMP(this,kklast-kkfirst,&arg[kkfirst]); if (!kokkos->kokkos_exists) error->all(FLERR,"Cannot use -kokkos on without KOKKOS installed"); - } else { - kokkos = new KokkosLMP(this,kklast-kkfirst,&arg[kkfirst]); - if (!kokkos->kokkos_exists) { - delete kokkos; - kokkos = NULL; - } } MPI_Comm_rank(world,&me); diff --git a/src/output.cpp b/src/output.cpp index 6d6be87a91..0383dfe84d 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -515,7 +515,7 @@ void Output::reset_timestep(bigint ntimestep) next_thermo = static_cast (input->variable->compute_equal(ivar_thermo)); if (next_thermo < ntimestep) - error->all(FLERR,"Thermo every variable returned a bad timestep"); + error->all(FLERR,"Thermo_modify every variable returned a bad timestep"); update->ntimestep++; next_thermo = MIN(next_thermo,update->laststep); modify->addstep_compute(next_thermo); diff --git a/src/rerun.cpp b/src/rerun.cpp index 55af34da72..0520ab3ddf 100644 --- a/src/rerun.cpp +++ b/src/rerun.cpp @@ -127,7 +127,7 @@ void Rerun::command(int narg, char **arg) // perform the psuedo run // invoke lmp->init() only once // read all relevant snapshots - // uset setup_minimal() since atoms are already owned by correct procs + // use setup_minimal() since atoms are already owned by correct procs // addstep_compute_all() insures energy/virial computed on every snapshot update->whichflag = 1;