[Yt-dev] new comm problem
Stephen Skory
s at skory.us
Thu Oct 20 20:06:45 PDT 2011
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
~~~~~~~~~~~~
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)
More information about the yt-dev
mailing list