[yt-dev] [yt_analysis/yt] SlicePlot fails in parallel with multiple fields when one of which is a derived fields (issue #511)

Sam Skillman issues-reply at bitbucket.org
Sat Feb 23 15:01:27 PST 2013


--- you can reply above this line ---

New issue 511: SlicePlot fails in parallel with multiple fields when one of which is a derived fields
https://bitbucket.org/yt_analysis/yt/issue/511/sliceplot-fails-in-parallel-with-multiple

Sam Skillman:

If I only do ['Density'], or ['Pressure'], or even ['Density', 'Temperature'], this is fine.  Something seems messed up with the derived field.  FWIW, ProjectionPlot works fine.

mpirun -np 2 python script.py --parallel

```
#!python
from yt.mods import *

pf = load('IsolatedGalaxy/galaxy0030/galaxy0030') 
field = ['Density','Pressure']

slc = SlicePlot(pf, 'z', field)
slc.save()

```

gives:


```
#!text

P001 yt : [DEBUG    ] 2013-02-23 15:55:18,394 Appending object to galaxy0030 (type: <class 'yt.data_objects.hierarchy.AMRSlice'>)
Traceback (most recent call last):
  File "dummy_script.py", line 6, in <module>
    slc = SlicePlot(pf, 'z', field)
  File "/home/skillman/local/src/yt-hg/yt/visualization/plot_window.py", line 1134, in __init__
Traceback (most recent call last):
  File "dummy_script.py", line 6, in <module>
    slc = SlicePlot(pf, 'z', field)
  File "/home/skillman/local/src/yt-hg/yt/visualization/plot_window.py", line 1134, in __init__
    slc = pf.h.slice(axis, center[axis], center=center, fields=fields, **field_parameters)
  File "/home/skillman/local/src/yt-hg/yt/data_objects/data_containers.py", line 1049, in __init__
    self._refresh_data()
  File "/home/skillman/local/src/yt-hg/yt/data_objects/data_containers.py", line 318, in _refresh_data
    self.get_data()
  File "/home/skillman/local/src/yt-hg/yt/data_objects/data_containers.py", line 845, in get_data
    slc = pf.h.slice(axis, center[axis], center=center, fields=fields, **field_parameters)
  File "/home/skillman/local/src/yt-hg/yt/data_objects/data_containers.py", line 360, in _generate_field
    self._refresh_data()
  File "/home/skillman/local/src/yt-hg/yt/data_objects/data_containers.py", line 318, in _refresh_data
    self[field] = self.pf.field_info[field](self)
  File "/home/skillman/local/src/yt-hg/yt/data_objects/field_info_container.py", line 393, in __call__
    self.get_data()
  File "/home/skillman/local/src/yt-hg/yt/data_objects/universal_fields.py", line 216, in _Pressure
    data["Density"] * data["ThermalEnergy"]
ValueError: operands could not be broadcast together with shapes (19686) (40177)  
```


--

This is an issue notification from bitbucket.org. You are receiving
this either because you are the owner of the issue, or you are
following the issue.



More information about the yt-dev mailing list