Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .ci_support/environment-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ dependencies:
- coverage
- codacy-coverage
- lammps >=2022.06.23
- mpi4py =3.1.4
- mpich
- numpy
- distributed
- dask-jobqueue
- cloudpickle =2.2.1
- mpi4py =3.1.4
- pympipool =0.4.2
- pyzmq =25.1.0
4 changes: 3 additions & 1 deletion .ci_support/environment-openmpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ dependencies:
- coverage
- codacy-coverage
- lammps >=2022.06.23
- mpi4py =3.1.4
- openmpi
- numpy
- distributed
- dask-jobqueue
- cloudpickle =2.2.1
- mpi4py =3.1.4
- pympipool =0.4.2
- pyzmq =25.1.0
4 changes: 4 additions & 0 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ dependencies:
- pytest
- distributed
- dask-jobqueue
- cloudpickle =2.2.1
- mpi4py =3.1.4
- pympipool =0.4.2
- pyzmq =25.1.0
7 changes: 4 additions & 3 deletions pylammpsmpi/mpi/lmpmpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from ctypes import c_double, c_int
from mpi4py import MPI
import numpy as np
import pickle
import cloudpickle
import sys
import zmq
from lammps import lammps
Expand Down Expand Up @@ -311,6 +311,7 @@ def installed_packages(funct_args):

def set_fix_external_callback(funct_args):
job.set_fix_external_callback(*funct_args)
return 1


def get_neighlist(funct_args):
Expand Down Expand Up @@ -472,7 +473,7 @@ def _gather_data_from_all_processors(data):
socket.connect("tcp://localhost:" + port_selected)
while True:
if MPI.COMM_WORLD.rank == 0:
input_dict = pickle.loads(socket.recv())
input_dict = cloudpickle.loads(socket.recv())
# with open('process.txt', 'a') as file:
# print('Input:', input_dict, file=file)
else:
Expand All @@ -488,4 +489,4 @@ def _gather_data_from_all_processors(data):
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(pickle.dumps(output))
socket.send(cloudpickle.dumps({"r": output}))
Loading