
Helly yt-crowd. I am doing some volume rendering in yt and getting some errors when I try to grow the image size. I am trying to write a png image that is 1024 x 1024. I get the following errors: image_array.py:229: RuntimeWarning: invalid value encountered in multiply np.multiply(self[:, :, :3], 1.0/cmax, out[:, :, :3]) yt_array.py:764: RuntimeWarning: divide by zero encountered in divide return YTArray(super(YTArray, self).__rdiv__(lo)) The largest image I can generate is about 800x 800. It is a nice image too I tell ya. Just wish I could do a bigger one to submit for publication. Attached is the script I am using. Any help would be great. Thanks, Dave Semeraro _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

On Thu, May 28, 2015 at 12:54 PM, Dave Semeraro <semeraro@tacc.utexas.edu> wrote:
Helly yt-crowd.
I am doing some volume rendering in yt and getting some errors when I try to grow the image size. I am trying to write a png image that is 1024 x 1024. I get the following errors:
image_array.py:229: RuntimeWarning: invalid value encountered in multiply
np.multiply(self[:, :, :3], 1.0/cmax, out[:, :, :3])
The warning is being triggered here: https://bitbucket.org/yt_analysis/yt/src/8ad62b62439013a33e3a2b568a5a26b567e... which I think means cmax is 0. I'd need to see the full traceback or step through execution in a debugger to figure out why.
yt_array.py:764: RuntimeWarning: divide by zero encountered in divide
return YTArray(super(YTArray, self).__rdiv__(lo))
The largest image I can generate is about 800x 800. It is a nice image too I tell ya. Just wish I could do a bigger one to submit for publication.
There's no limit on the image size for a volume rendering.
Attached is the script I am using. Any help would be great.
Thanks,
Dave Semeraro
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Did a bit more experimentation. The error only appears when I run in parallel. Serial runs execute fine but take a long time. So there is some monkey business going on with parallel ray tracing that is triggered by the image size I was using. I am also using a rather large enzo dataset. Thanks for considering the problem. Dave From: yt-users [mailto:yt-users-bounces@lists.spacepope.org] On Behalf Of Nathan Goldbaum Sent: Thursday, May 28, 2015 2:58 PM To: Discussion of the yt analysis package Subject: Re: [yt-users] is there a limit on image size? On Thu, May 28, 2015 at 12:54 PM, Dave Semeraro <semeraro@tacc.utexas.edu<mailto:semeraro@tacc.utexas.edu>> wrote: Helly yt-crowd. I am doing some volume rendering in yt and getting some errors when I try to grow the image size. I am trying to write a png image that is 1024 x 1024. I get the following errors: image_array.py:229: RuntimeWarning: invalid value encountered in multiply np.multiply(self[:, :, :3], 1.0/cmax, out[:, :, :3]) The warning is being triggered here: https://bitbucket.org/yt_analysis/yt/src/8ad62b62439013a33e3a2b568a5a26b567e... which I think means cmax is 0. I'd need to see the full traceback or step through execution in a debugger to figure out why. yt_array.py:764: RuntimeWarning: divide by zero encountered in divide return YTArray(super(YTArray, self).__rdiv__(lo)) The largest image I can generate is about 800x 800. It is a nice image too I tell ya. Just wish I could do a bigger one to submit for publication. There's no limit on the image size for a volume rendering. Attached is the script I am using. Any help would be great. Thanks, Dave Semeraro _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org<mailto:yt-users@lists.spacepope.org> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

If "1/cmax" is failing for a rendered image, that could mean it's all black (max pixel=0) ... or maybe that there had been a NaN in it somewhere which could likewise break the automatic rescaling. Are you using the rendering interface where you call something like cam.snapshot( "image.png" ) to make it save an image? If so you might try rawim = cam.snapshot() and look at the distribution of raw rendered pixel values in rawim, which should be a 3-dimensional array (image size x 4 or something). Maybe the fraction of positive values: numpy.sum( rawim > 0 ) / float(rawim.size) Also, Dave, are you rendering using multiple threads? On 5/28/15 3:52 PM, Dave Semeraro wrote:
Did a bit more experimentation. The error only appears when I run in parallel. Serial runs execute fine but take a long time. So there is some monkey business going on with parallel ray tracing that is triggered by the image size I was using. I am also using a rather large enzo dataset. Thanks for considering the problem.
Dave
*From:*yt-users [mailto:yt-users-bounces@lists.spacepope.org] *On Behalf Of *Nathan Goldbaum *Sent:* Thursday, May 28, 2015 2:58 PM *To:* Discussion of the yt analysis package *Subject:* Re: [yt-users] is there a limit on image size?
On Thu, May 28, 2015 at 12:54 PM, Dave Semeraro <semeraro@tacc.utexas.edu <mailto:semeraro@tacc.utexas.edu>> wrote:
Helly yt-crowd.
I am doing some volume rendering in yt and getting some errors when I try to grow the image size. I am trying to write a png image that is 1024 x 1024. I get the following errors:
image_array.py:229: RuntimeWarning: invalid value encountered in multiply
np.multiply(self[:, :, :3], 1.0/cmax, out[:, :, :3])
The warning is being triggered here:
https://bitbucket.org/yt_analysis/yt/src/8ad62b62439013a33e3a2b568a5a26b567e... <https://urldefense.proofpoint.com/v2/url?u=https-3A__bitbucket.org_yt-5Fanalysis_yt_src_8ad62b62439013a33e3a2b568a5a26b567e93f54_yt_data-5Fobjects_image-5Farray.py-3Fat-3Dyt-23cl-2D229&d=AwMGaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=hgcBC3x6dKFoTrmFmMYYbKNfiHZlGLKliIidd1LwmHI&m=hO5pXcuw5fvvxeGv-5LRShhzRc-WbkaimZIYkj52SZM&s=OH-bab2JlwA0taRkzQRsirFtSlIP1tPzZHqBB6bQN-g&e=>
which I think means cmax is 0. I'd need to see the full traceback or step through execution in a debugger to figure out why.
yt_array.py:764: RuntimeWarning: divide by zero encountered in divide
return YTArray(super(YTArray, self).__rdiv__(lo))
The largest image I can generate is about 800x 800. It is a nice image too I tell ya. Just wish I could do a bigger one to submit for publication.
There's no limit on the image size for a volume rendering.
Attached is the script I am using. Any help would be great.
Thanks,
Dave Semeraro
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org <mailto:yt-users@lists.spacepope.org> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org <https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.spacepope.org_listinfo.cgi_yt-2Dusers-2Dspacepope.org&d=AwMGaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=hgcBC3x6dKFoTrmFmMYYbKNfiHZlGLKliIidd1LwmHI&m=hO5pXcuw5fvvxeGv-5LRShhzRc-WbkaimZIYkj52SZM&s=gZXnqjs29WnzpjUG7Zw8owSAiGShMXdyBxhGrjLnHlY&e=>
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Hi Stuart, Thanks for the tip. I will have a look. I actually tried generating an image with rawin = cam.snapshot. I still have to poke around in the image file though. I am thinking I will have to debug he parallel mpi4py implementation as the problem does not exist unless I use mpi. I just have to take a deep breath and dive in. I hate debugging parallel code. I was thinking of trying multithreading but have not figured out how it works yet. Is there a flag in the camera to set the number of threads? From: Stuart Levy [mailto:salevy@illinois.edu] Sent: Thursday, May 28, 2015 5:58 PM To: Discussion of the yt analysis package Cc: Stuart Levy; Dave Semeraro Subject: Re: [yt-users] is there a limit on image size? If "1/cmax" is failing for a rendered image, that could mean it's all black (max pixel=0) ... or maybe that there had been a NaN in it somewhere which could likewise break the automatic rescaling. Are you using the rendering interface where you call something like cam.snapshot( "image.png" ) to make it save an image? If so you might try rawim = cam.snapshot() and look at the distribution of raw rendered pixel values in rawim, which should be a 3-dimensional array (image size x 4 or something). Maybe the fraction of positive values: numpy.sum( rawim > 0 ) / float(rawim.size) Also, Dave, are you rendering using multiple threads? On 5/28/15 3:52 PM, Dave Semeraro wrote: Did a bit more experimentation. The error only appears when I run in parallel. Serial runs execute fine but take a long time. So there is some monkey business going on with parallel ray tracing that is triggered by the image size I was using. I am also using a rather large enzo dataset. Thanks for considering the problem. Dave From: yt-users [mailto:yt-users-bounces@lists.spacepope.org] On Behalf Of Nathan Goldbaum Sent: Thursday, May 28, 2015 2:58 PM To: Discussion of the yt analysis package Subject: Re: [yt-users] is there a limit on image size? On Thu, May 28, 2015 at 12:54 PM, Dave Semeraro <semeraro@tacc.utexas.edu<mailto:semeraro@tacc.utexas.edu>> wrote: Helly yt-crowd. I am doing some volume rendering in yt and getting some errors when I try to grow the image size. I am trying to write a png image that is 1024 x 1024. I get the following errors: image_array.py:229: RuntimeWarning: invalid value encountered in multiply np.multiply(self[:, :, :3], 1.0/cmax, out[:, :, :3]) The warning is being triggered here: https://bitbucket.org/yt_analysis/yt/src/8ad62b62439013a33e3a2b568a5a26b567e93f54/yt/data_objects/image_array.py?at=yt#cl-229<https://urldefense.proofpoint.com/v2/url?u=https-3A__bitbucket.org_yt-5Fanalysis_yt_src_8ad62b62439013a33e3a2b568a5a26b567e93f54_yt_data-5Fobjects_image-5Farray.py-3Fat-3Dyt-23cl-2D229&d=AwMGaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=hgcBC3x6dKFoTrmFmMYYbKNfiHZlGLKliIidd1LwmHI&m=hO5pXcuw5fvvxeGv-5LRShhzRc-WbkaimZIYkj52SZM&s=OH-bab2JlwA0taRkzQRsirFtSlIP1tPzZHqBB6bQN-g&e=> which I think means cmax is 0. I'd need to see the full traceback or step through execution in a debugger to figure out why. yt_array.py:764: RuntimeWarning: divide by zero encountered in divide return YTArray(super(YTArray, self).__rdiv__(lo)) The largest image I can generate is about 800x 800. It is a nice image too I tell ya. Just wish I could do a bigger one to submit for publication. There's no limit on the image size for a volume rendering. Attached is the script I am using. Any help would be great. Thanks, Dave Semeraro _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org<mailto:yt-users@lists.spacepope.org> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.spacepope.org_listinfo.cgi_yt-2Dusers-2Dspacepope.org&d=AwMGaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=hgcBC3x6dKFoTrmFmMYYbKNfiHZlGLKliIidd1LwmHI&m=hO5pXcuw5fvvxeGv-5LRShhzRc-WbkaimZIYkj52SZM&s=gZXnqjs29WnzpjUG7Zw8owSAiGShMXdyBxhGrjLnHlY&e=> _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org<mailto:yt-users@lists.spacepope.org> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (3)
-
Dave Semeraro
-
Nathan Goldbaum
-
Stuart Levy