[Paraview] [vtkusers] Combining vtk and paraview python scripts

Jeff Becker jeffrey.c.becker at nasa.gov
Wed Jul 22 19:15:38 EDT 2015


Now that I can load image (uniform rectilinear grid) data using the 
Python Programmable Source, I'm trying to do this on four gpu nodes 
(using mpirun -np 4 pvserver). Once I load my image, I thought it would 
be automatically distributed (equally) to the four nodes, but coloring 
by process id shows that everything happens on one node. What do I need 
to do (short of writing out four pvti files and reading them back in) to 
automatically distribute my data?

Thanks.

-jeff

On 07/21/2015 09:14 AM, Jeff Becker wrote:
> On 07/20/2015 05:43 PM, Berk Geveci wrote:
>> You probably need to update vtkImageExport and shallow copy its 
>> output to the programmable source's output. You also need to add 
>> something to the RequestInformation setting the whole extent. You 
>> need something like:
>>
>> from paraview import util
>> util.SetOutputWholeExtent(self, [0,nx-1,0,ny-1,0,nz-1])
>>
>> By the way, there are better ways of getting numpy arrays into VTK 
>> than the image import stuff. See some of the earlier blogs here:
>
> Right. I found the RequestInformation info above from searching the 
> web. Then I was able to follow the instructions in the ParaView Guide 
> section 13.2.4 Reading binary 2D image. I basically replaced the image 
> import stuff with code analogous  to the output assignment,
>
> Thanks for your help.
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150722/779c9826/attachment.html>


More information about the ParaView mailing list