Skip to content

Commit

Permalink
update pympipool to 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Jun 11, 2023
1 parent 070db5f commit 809db2c
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .ci_support/environment-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ dependencies:
- dask-jobqueue
- cloudpickle =2.2.1
- mpi4py =3.1.4
- pympipool =0.4.2
- pympipool =0.5.0
- pyzmq =25.1.0
2 changes: 1 addition & 1 deletion .ci_support/environment-openmpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ dependencies:
- dask-jobqueue
- cloudpickle =2.2.1
- mpi4py =3.1.4
- pympipool =0.4.2
- pympipool =0.5.0
- pyzmq =25.1.0
2 changes: 1 addition & 1 deletion binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ dependencies:
- dask-jobqueue
- cloudpickle =2.2.1
- mpi4py =3.1.4
- pympipool =0.4.2
- pympipool =0.5.0
- pyzmq =25.1.0
6 changes: 3 additions & 3 deletions pylammpsmpi/mpi/lmpmpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,17 +479,17 @@ def _run_lammps_mpi(argument_lst):
else:
input_dict = None
input_dict = MPI.COMM_WORLD.bcast(input_dict, root=0)
if input_dict["c"] == "close":
if input_dict["shutdown"]:
if MPI.COMM_WORLD.rank == 0:
socket.close()
context.term()
job.close()
break
output = select_cmd(input_dict["c"])(job=job, funct_args=input_dict["d"])
output = select_cmd(input_dict["command"])(job=job, funct_args=input_dict["args"])
if MPI.COMM_WORLD.rank == 0 and output is not None:
# with open('process.txt', 'a') as file:
# print('Output:', output, file=file)
socket.send(cloudpickle.dumps({"r": output}))
socket.send(cloudpickle.dumps({"result": output}))


if __name__ == "__main__":
Expand Down
4 changes: 2 additions & 2 deletions pylammpsmpi/utils/lammps.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def start_process(self):

def _send_and_receive_dict(self, command, data=None):
return self._interface.send_and_receive_dict(
input_dict={"c": command, "d": data}
input_dict={"command": command, "args": data}
)

def _send(self, command, data=None):
Expand All @@ -70,7 +70,7 @@ def _send(self, command, data=None):
-------
None
"""
self._interface.send_dict({"c": command, "d": data})
self._interface.send_dict({"command": command, "args": data})

def _receive(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
keywords='lammps, mpi4py',
packages=find_packages(exclude=["*tests*"]),
install_requires=[
"cloudpickle==2.2.1", "mpi4py==3.1.4", "pympipool==0.4.2", "pyzmq==25.1.0",
"cloudpickle==2.2.1", "mpi4py==3.1.4", "pympipool==0.5.0", "pyzmq==25.1.0",
],
cmdclass=versioneer.get_cmdclass(),
)

0 comments on commit 809db2c

Please sign in to comment.