[yt-users] Particle Callback Error in Parallel Projections

Devin Silvia devin.silvia at gmail.com
Tue Apr 7 09:28:43 PDT 2009


Hi,

I am currently running into an issue when I try to carry out parallel
projections with particle overlay.  Also long as I don't use too many
processors things run just fine but the projections only have some of
the particles.

Here is an example of the commands in my script:

plotx = pc.add_projection("Density", 0, weight_field="Dust")
plotx.add_callback(ParticleCallback(0, 1.0, p_size=1.0, col='k'))
ploty = pc.add_projection("Density", 1, weight_field="Dust")
ploty.add_callback(ParticleCallback(1, 1.0, p_size=1.0, col='k'))
plotz = pc.add_projection("Density", 2, weight_field="Dust")
plotz.add_callback(ParticleCallback(2, 1.0, p_size=1.0, col='k'))

In addition, if I use too many processors and the one of the
processors doesn't have any particles, I get the following error:

Particle bounding box: 0.0 1.0 0.0 1.0 1.5 2.5
Traceback (most recent call last):
Particle px extrema
  File "longbox.py", line 13, in <module>
    pc.save("DD%4.4d/DD%4.4d" % (i,i))
  File "/home/solo/student/brittons/local/x86_64/lib/python2.5/site-packages/yt/raven/PlotCollection.py",
line 80, in save
    override=override))
  File "/home/solo/student/brittons/local/x86_64/lib/python2.5/site-packages/yt/raven/PlotTypes.py",
line 110, in save_image
    self._redraw_image()
  File "/home/solo/student/brittons/local/x86_64/lib/python2.5/site-packages/yt/raven/PlotTypes.py",
line 312, in _redraw_image
    self._run_callbacks()
  File "/home/solo/student/brittons/local/x86_64/lib/python2.5/site-packages/yt/raven/PlotTypes.py",
line 183, in _run_callbacks
    cb(self)
  File "/home/solo/student/brittons/local/x86_64/lib/python2.5/site-packages/yt/raven/Callbacks.py",
line 177, in __call__
    print "Particle px extrema", particles_x.min(), particles_x.max(), \
ValueError: zero-size array to ufunc.reduce without identity

Any help with this would be appreciated.

Thanks,
Devin

-- 
Devin W. Silvia
Graduate Student/Research Assistant
Center for Astrophysics and Space Astronomy
University of Colorado at Boulder
http://mdbworks.net/devin



More information about the yt-users mailing list