-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Right now parallel analyses do their own sort of pickling/unpickling. While this gives the analysis more control and possibly skips unneeded pickle/unpickle cruft, it has a number of drawbacks:
- Subclasses must be explicitly written to make an analysis parallel. This makes automated parallelization of existing analyses hard;
- Each parallel analysis must implement its own pickling/unpickling strategy, leading to code duplication among analyses and compared to the existing pickling/unpickling strategy;
- Complexities of unpickling already solved with the MDA machinery have to be dealt with again (allow using updating atomgroups #13, parallel analysis should check that atomgroups in initialize belong to the same universe #18) .
I vote we rely on the Universe's and AtomGroup's pickling/unpickling behavior. If we could do that then making a parallel analysis would become an automated wrapper and the user need not subclass ParallelAnalysisBase themselves.
I understand that as it is right now it can't work as I want, because we must explicitly tell the analysis that it should pickle along the Universe (otherwise AtomGroup unpickling will fail). We never got around to implementing auto-loading of a Universe when unpickling an AtomGroup (MDAnalysis/mdanalysis#878). At the time it seemed selfishly premature of me, since that would only address my own parallelization needs. Now that this becomes more widespread it might be good to revisit the idea, what do you think?