Issue #909: calculate_isocontour_flux function raises error in parallel analysis interface (yt_analysis/yt)
New issue 909: calculate_isocontour_flux function raises error in parallel analysis interface https://bitbucket.org/yt_analysis/yt/issue/909/calculate_isocontour_flux-fun... Nathan Goldbaum: The following test script: ``` import yt ds = yt.load('IsolatedGalaxy/galaxy0030/galaxy0030') dd = ds.all_data() dd.calculate_isocontour_flux('density', 1e-23, 'x-velocity', 'y-velocity', 'z-velocity', 'density') ``` raises the following error: ``` #!python AttributeError Traceback (most recent call last) /home/goldbaum/Documents/yt-hg/yt/mods.pyc in <module>() ----> 1 dd.calculate_isocontour_flux('density', 1e-23, 'x-velocity', 'y-velocity', 'z-velocity', 'density') /home/goldbaum/Documents/yt-hg/yt/data_objects/data_containers.pyc in calculate_isocontour_flux(self, field, value, field_x, field_y, field_z, fluxing_field) 1106 """ 1107 flux = 0.0 -> 1108 for g in self._get_grid_objs(): 1109 flux += self._calculate_flux_in_grid(g, field, value, 1110 field_x, field_y, field_z, fluxing_field) /home/goldbaum/Documents/yt-hg/yt/utilities/parallel_tools/parallel_analysis_interface.pyc in _get_grid_objs(self) 1065 if self._distributed: 1066 return ParallelObjectIterator(self, True, attr='_grids') -> 1067 return ObjectIterator(self, True, attr='_grids') 1068 1069 def get_dependencies(self, fields): /home/goldbaum/Documents/yt-hg/yt/utilities/parallel_tools/parallel_analysis_interface.pyc in __init__(self, pobj, just_list, attr) 146 gs = getattr(pobj, attr) 147 else: --> 148 gs = getattr(pobj._data_source, attr) 149 if len(gs) == 0: 150 raise YTNoDataInObjectError(pobj) AttributeError: 'YTRegion' object has no attribute '_data_source' ``` I think the parallel analysis interface should be using the chunking system here, but I'm not sure. I also a little mystified why the unit tests for this function didn't pick this up. Responsible: MatthewTurk
participants (1)
-
Nathan Goldbaum