diff --git a/python/lammps/pylammps.py b/python/lammps/pylammps.py index b0eeb6c401..a6e3578aef 100644 --- a/python/lammps/pylammps.py +++ b/python/lammps/pylammps.py @@ -508,11 +508,6 @@ class PyLammps(object): :py:attr:`PyLammps.last_run`. """ output = self.__getattr__('run')(*args, **kwargs) - - comm = self.lmp.get_mpi_comm() - if comm: - output = self.lmp.comm.bcast(output, root=0) - self.runs += get_thermo_data(output) return output @@ -784,6 +779,10 @@ class PyLammps(object): self.command(cmd) output = capture.output + comm = self.lmp.get_mpi_comm() + if comm: + output = self.lmp.comm.bcast(output, root=0) + if 'verbose' in kwargs and kwargs['verbose']: print(output)