diff --git a/HISTORY.rst b/HISTORY.rst index dfa5a1e..6cebed4 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,9 @@ ======= History ======= +2024.8.22 -- Bugfix: error in number of cores. + * Fixed an error if options for number of cores were strings, not numbers. + 2024.7.31 -- Bugfix and improvements for parallel runs * There was an issue saving the pressure and volume as properties due to a mismatch in the names used. This has been corrected. diff --git a/lammps_step/lammps.py b/lammps_step/lammps.py index b240a4a..0c42da9 100644 --- a/lammps_step/lammps.py +++ b/lammps_step/lammps.py @@ -405,9 +405,9 @@ def run(self): if global_options["parallelism"] in ("any", "mpi"): np = n_atoms // o["atoms_per_core"] + 1 if o["ncores"] != "available": - np = min(np, o["ncores"]) + np = min(np, int(o["ncores"])) if global_options["ncores"] != "available": - np = min(np, global_options["ncores"]) + np = min(np, int(global_options["ncores"])) else: np = 1