-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pmap parallel error #1651
Comments
it seems related to cython with python version.
|
Dear @hainm, thanks so much for your answer ! I would can try it. |
@hainm I want to asked you, too. Is autoimage enable to use him with pmap?. Now when I use pmap, Have always I that contrast against serial calculation ? |
I'm sorry I have a mistake , I want to say use with pmap, |
@groponp I don't think so. |
Hi,
I'm trying to use the pmap method :
In [7]: pt.version
Out[7]: '2.0.5'
traj = pt.iterload("04_MD/MD_r1.dcd", "files/MD_QwikMD.psf")
pt.pmap(pt.radgyr, traj, n_cores=4)
error:
TypeError Traceback (most recent call last)
in
----> 1 pt.pmap(pt.radgyr, traj, n_cores=4)
~/miniconda3/envs/cpptraj/lib/python3.7/site-packages/pytraj/parallel/multiprocess.py in pmap(func, traj, *args, **kwargs)
228 def pmap(func=None, traj=None, *args, **kwargs):
229 if func != NH_order_parameters:
--> 230 return _pmap(func, traj, *args, **kwargs)
231 else:
232 if 'n_cores' in kwargs.keys():
~/miniconda3/envs/cpptraj/lib/python3.7/site-packages/pytraj/parallel/multiprocess.py in _pmap(func, traj, *args, **kwargs)
218 progress_params=progress_params)
219
--> 220 data = p.map(pfuncs, [rank for rank in range(n_cores)])
221 p.close()
222
~/miniconda3/envs/cpptraj/lib/python3.7/multiprocessing/pool.py in map(self, func, iterable, chunksize)
266 in a list that is returned.
267 '''
--> 268 return self._map_async(func, iterable, mapstar, chunksize).get()
269
270 def starmap(self, func, iterable, chunksize=None):
~/miniconda3/envs/cpptraj/lib/python3.7/multiprocessing/pool.py in get(self, timeout)
655 return self._value
656 else:
--> 657 raise self._value
658
659 def _set(self, i, obj):
~/miniconda3/envs/cpptraj/lib/python3.7/multiprocessing/pool.py in _handle_tasks(taskqueue, put, outqueue, pool, cache)
429 break
430 try:
--> 431 put(task)
432 except Exception as e:
433 job, idx = task[:2]
~/miniconda3/envs/cpptraj/lib/python3.7/multiprocessing/connection.py in send(self, obj)
204 self._check_closed()
205 self._check_writable()
--> 206 self._send_bytes(_ForkingPickler.dumps(obj))
207
208 def recv_bytes(self, maxlength=None):
~/miniconda3/envs/cpptraj/lib/python3.7/multiprocessing/reduction.py in dumps(cls, obj, protocol)
49 def dumps(cls, obj, protocol=None):
50 buf = io.BytesIO()
---> 51 cls(buf, protocol).dump(obj)
52 return buf.getbuffer()
53
~/miniconda3/envs/cpptraj/lib/python3.7/site-packages/pytraj/trajectory/c_traj/c_trajectory.cpython-37m-x86_64-linux-gnu.so in pytraj.trajectory.c_traj.c_trajectory.TrajectoryCpptraj.reduce_cython()
TypeError: no default reduce due to non-trivial cinit
The text was updated successfully, but these errors were encountered: