diff --git a/mala/descriptors/descriptor.py b/mala/descriptors/descriptor.py index b292c0ab7..a9e11252a 100644 --- a/mala/descriptors/descriptor.py +++ b/mala/descriptors/descriptor.py @@ -753,22 +753,23 @@ def _setup_lammps( ) else: + size = 1 lammps_dict["ngridx"] = nx lammps_dict["ngridy"] = ny lammps_dict["ngridz"] = nz lammps_dict["switch"] = self.parameters.bispectrum_switchflag - if self.parameters._configuration["gpu"] > 0: - # Tell Kokkos to use one GPU. - lmp_cmdargs.append("-k") - lmp_cmdargs.append("on") - lmp_cmdargs.append("g") - lmp_cmdargs.append("1") - - # Tell LAMMPS to use Kokkos versions of those commands for - # which a Kokkos version exists. - lmp_cmdargs.append("-sf") - lmp_cmdargs.append("kk") - pass + if self.parameters._configuration["gpu"] > 0: + # Tell Kokkos to use one GPU. + lmp_cmdargs.append("-k") + lmp_cmdargs.append("on") + lmp_cmdargs.append("g") + lmp_cmdargs.append(str(size)) + + # Tell LAMMPS to use Kokkos versions of those commands for + # which a Kokkos version exists. + lmp_cmdargs.append("-sf") + lmp_cmdargs.append("kk") + pass lmp_cmdargs = set_cmdlinevars(lmp_cmdargs, lammps_dict)