[Yt-dev] new comm problem
Matthew Turk
matthewturk at gmail.com
Fri Oct 21 04:49:44 PDT 2011
Hi Stephen,
On Thu, Oct 20, 2011 at 11:06 PM, Stephen Skory <s at skory.us> wrote:
> Hi all,
>
> I'm finding a problem with the new communicator stuff in
> ParallelAnalysisInterface in r322fe24bb0cb. Specifically, .comm is
> being initialized to None. With a short script like this:
>
> ~~~~~~~~~~~~
>
> from yt.mods import *
> from yt.utilities.parallel_tools.parallel_analysis_interface import \
> ParallelAnalysisInterface
>
> class humbug(ParallelAnalysisInterface):
> def __init__(self):
> pass
>
> bah = humbug()
>
> print bah.comm
That is correct; PAI's initializer must now be called. Is there a
subclass that's missing that? The PAI initializer grabs the
communicator on the top of the stack. Have you seen issues with
_grids or _distributed, that aren't being hit by the test suite? The
small data is now passing, and it should have coverage of DQ's,
profiles (1 and 2D), PHOP and so on.
-Matt
>
> ~~~~~~~~~~~~
>
> I get "None", which is not correct, I think. I've found that if I
> modify things to look like this below in
> parallel_analysis_interface.py, it works. But I don't think that's how
> things are supposed to work. Could someone who understands what's
> supposed to happen take a look at this? I suppose _grids and
> _distributed would also suffer from the same problem. Thanks!
>
> ~~~~~~~~~~~~
>
> class ParallelAnalysisInterface(object):
> comm = communication_system.communicators[-1]
> _grids = None
> _distributed = None
>
> def __init__(self):
> self.comm = communication_system.communicators[-1]
> self._grids = self.comm._grids
> self._distributed = self.comm._distributed
>
> ~~~~~~~~~~~~~~
>
> --
> Stephen Skory
> s at skory.us
> http://stephenskory.com/
> 510.621.3687 (google voice)
> _______________________________________________
> Yt-dev mailing list
> Yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
More information about the yt-dev
mailing list