Improve MPI support in PyLammps
This commit is contained in:
@ -508,11 +508,6 @@ class PyLammps(object):
|
|||||||
:py:attr:`PyLammps.last_run`.
|
:py:attr:`PyLammps.last_run`.
|
||||||
"""
|
"""
|
||||||
output = self.__getattr__('run')(*args, **kwargs)
|
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)
|
self.runs += get_thermo_data(output)
|
||||||
return output
|
return output
|
||||||
|
|
||||||
@ -784,6 +779,10 @@ class PyLammps(object):
|
|||||||
self.command(cmd)
|
self.command(cmd)
|
||||||
output = capture.output
|
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']:
|
if 'verbose' in kwargs and kwargs['verbose']:
|
||||||
print(output)
|
print(output)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user