Open cindytsai opened 4 years ago
Hi, and welcome to yt! Thanks for opening your first issue. We have an issue template that helps us to gather relevant information to help diagnosing and fixing the issue.
Hi @cindytsai , this is indeed a change in behavior.
What used to happen was that we would chunk up the slice object and then replicate that slice object across processors. With the transition to yt-3.0 this changed, and we no longer parallelized the slicing operation.
What might work best for this moving forward may be to have the parallel operation happen inside the generation of the fixed resolution buffer. This would be somewhat straightforward to implement, in that what you could do is have a parallel reduction operation in the coordinate handler following the call to the pixelization operation.
Bug report
Bug summary
yt
failed while runningSlicePlot
in Enzo inline-analysis with embedded python. yt/frontends/enzo/io.py (class IOHandlerInMemory) cannot handle cases when grids needed doesn't exist inself.grids_in_memory
in that specific MPI rank inside the function def _read_fluid_selection. As in contrast, bothfind_max
andProjectionPlot
work well with MPI rank > 1.Code for reproduction
user_script.py
: Here, we do SlicePlot operation.def main(): ds = yt.frontends.enzo.EnzoDatasetInMemory()
File "", line 1, in
File "./user_script.py", line 8, in main
sz = yt.SlicePlot(ds, 'z', 'density')
File "/work1/cindytsai/Software/SysPython27/lib/python2.7/site-packages/yt/visualization/plot_window.py", line 2039, in SlicePlot
return AxisAlignedSlicePlot(ds, normal, fields, *args, **kwargs)
File "/work1/cindytsai/Software/SysPython27/lib/python2.7/site-packages/yt/visualization/plot_window.py", line 1314, in init
slc.get_data(fields)
File "/work1/cindytsai/Software/SysPython27/lib/python2.7/site-packages/yt/data_objects/data_containers.py", line 1621, in get_data
fluids, self, self._current_chunk)
File "/work1/cindytsai/Software/SysPython27/lib/python2.7/site-packages/yt/geometry/geometry_handler.py", line 304, in _read_fluid_fields
chunk_size)
File "/work1/cindytsai/Software/SysPython27/lib/python2.7/site-packages/yt/frontends/enzo/io.py", line 279, in _read_fluid_selection
data_view = self.grids_in_memory[g.id][fname][self.my_slice].swapaxes(0, 2)
P000 yt : [ERROR ] 2020-08-27 20:32:24,411 KeyError: 4
P000 yt : [ERROR ] 2020-08-27 20:32:24,411 Error occured on rank 0.