Skip to content

Commit

Permalink
try anchor thingy
Browse files Browse the repository at this point in the history
  • Loading branch information
kain88-de committed Sep 20, 2018
1 parent 14265b4 commit df3a7f4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pmda/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ def __init__(self, universe, atomgroups):
self._trajectory = universe.trajectory
self._top = universe.filename
self._traj = universe.trajectory.filename
self._anchor = universe.anchor_name
self._pickles = [pickle.dumps(ag) for ag in atomgroups]

@contextmanager
Expand Down Expand Up @@ -333,7 +334,8 @@ def run(self,
step,
self._pickles,
self._top,
self._traj, )
self._traj,
self._anchor)
blocks.append(task)
blocks = delayed(blocks)
res = blocks.compute(**scheduler_kwargs)
Expand All @@ -347,10 +349,11 @@ def run(self,
np.array([el.timing_universe for el in res]), time_prepare, conclude.elapsed)
return self

def _dask_helper(self, start, stop, step, pickles, top, traj):
def _dask_helper(self, start, stop, step, pickles, top, traj, anchor):
"""helper function to actually setup dask graph"""
with timeit() as b_universe:
u = mda.Universe(top, traj)
u.anchor_name = anchor
agroups = [pickle.loads(idx) for idx in pickles]

res = []
Expand Down

0 comments on commit df3a7f4

Please sign in to comment.