From 4c45dacca9f328c26ced14a3518443d2fe07fee1 Mon Sep 17 00:00:00 2001 From: Lenz Fiedler Date: Thu, 25 Apr 2024 13:26:42 +0200 Subject: [PATCH 1/2] Hotfix of parallel GPU inference Missed an indent when merging --- mala/descriptors/descriptor.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/mala/descriptors/descriptor.py b/mala/descriptors/descriptor.py index 0c055a4e0..3600d7e43 100644 --- a/mala/descriptors/descriptor.py +++ b/mala/descriptors/descriptor.py @@ -757,18 +757,18 @@ def _setup_lammps( lammps_dict["ngridy"] = ny lammps_dict["ngridz"] = nz lammps_dict["switch"] = self.parameters.bispectrum_switchflag - if self.parameters._configuration["gpu"]: - # 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"]: + # 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 lmp_cmdargs = set_cmdlinevars(lmp_cmdargs, lammps_dict) From 5cfd0c85851ce96db7a5f63242f95fcf19beffa2 Mon Sep 17 00:00:00 2001 From: Lenz Fiedler Date: Thu, 25 Apr 2024 13:49:58 +0200 Subject: [PATCH 2/2] Hotfixing the hotfix --- mala/descriptors/descriptor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mala/descriptors/descriptor.py b/mala/descriptors/descriptor.py index 3600d7e43..131037ba8 100644 --- a/mala/descriptors/descriptor.py +++ b/mala/descriptors/descriptor.py @@ -753,6 +753,7 @@ def _setup_lammps( ) else: + size = 1 lammps_dict["ngridx"] = nx lammps_dict["ngridy"] = ny lammps_dict["ngridz"] = nz @@ -762,7 +763,7 @@ def _setup_lammps( lmp_cmdargs.append("-k") lmp_cmdargs.append("on") lmp_cmdargs.append("g") - lmp_cmdargs.append("1") + lmp_cmdargs.append(str(size)) # Tell LAMMPS to use Kokkos versions of those commands for # which a Kokkos version exists.