WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit d4a2afe

Browse files
authored
Merge branch 'main' into function_access
2 parents 65def9a + c78d6d0 commit d4a2afe

File tree

6 files changed

+75
-105
lines changed

6 files changed

+75
-105
lines changed

.ci_support/environment-mpich.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ dependencies:
55
- coverage
66
- codacy-coverage
77
- lammps >=2022.06.23
8-
- mpi4py =3.1.4
98
- mpich
109
- numpy
1110
- distributed
1211
- dask-jobqueue
12+
- cloudpickle =2.2.1
13+
- mpi4py =3.1.4
14+
- pympipool =0.4.2
1315
- pyzmq =25.1.0

.ci_support/environment-openmpi.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ dependencies:
55
- coverage
66
- codacy-coverage
77
- lammps >=2022.06.23
8-
- mpi4py =3.1.4
98
- openmpi
109
- numpy
1110
- distributed
1211
- dask-jobqueue
12+
- cloudpickle =2.2.1
13+
- mpi4py =3.1.4
14+
- pympipool =0.4.2
1315
- pyzmq =25.1.0

binder/environment.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ dependencies:
88
- pytest
99
- distributed
1010
- dask-jobqueue
11+
- cloudpickle =2.2.1
12+
- mpi4py =3.1.4
13+
- pympipool =0.4.2
14+
- pyzmq =25.1.0

pylammpsmpi/mpi/lmpmpi.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from ctypes import c_double, c_int
66
from mpi4py import MPI
77
import numpy as np
8-
import pickle
8+
import cloudpickle
99
import sys
1010
import zmq
1111
from lammps import lammps
@@ -305,6 +305,7 @@ def installed_packages(job, funct_args):
305305

306306
def set_fix_external_callback(job, funct_args):
307307
job.set_fix_external_callback(*funct_args)
308+
return 1
308309

309310

310311
def get_neighlist(job, funct_args):
@@ -472,7 +473,7 @@ def _run_lammps_mpi(argument_lst):
472473
job = lammps(cmdargs=args)
473474
while True:
474475
if MPI.COMM_WORLD.rank == 0:
475-
input_dict = pickle.loads(socket.recv())
476+
input_dict = cloudpickle.loads(socket.recv())
476477
# with open('process.txt', 'a') as file:
477478
# print('Input:', input_dict, file=file)
478479
else:
@@ -488,7 +489,7 @@ def _run_lammps_mpi(argument_lst):
488489
if MPI.COMM_WORLD.rank == 0 and output is not None:
489490
# with open('process.txt', 'a') as file:
490491
# print('Output:', output, file=file)
491-
socket.send(pickle.dumps(output))
492+
socket.send(cloudpickle.dumps({"r": output}))
492493

493494

494495
if __name__ == "__main__":

0 commit comments

Comments
 (0)