[Paraview] SC10 CoProcessing example

Andy Bauer andy.bauer at kitware.com
Thu Nov 4 14:58:47 EDT 2010


Hi Chris,

I just fixed the formatting for the python code snippets.  As you noticed
there were problems of tabs and spaces intermixed but it's not been
converted to all spaces now.  There were also some problems with changes to
the library names (import libvtkvtkCoProcessorPython now needs to be import
vtkCoProcessorPython).

The mpi part of the sample script is for when ParaView is built in parallel
since it will call MPI functions.  If ParaView is built in serial, then that
part can be ignored and certainly coprocessing shouldn't be used for a
parallel run.

As far as simpler coprocesing scripts, if you don't generate any images the
script will be much simpler.  Unfortunately, the vtk python interface is
quite different from the pv python interface such that it would take a
decent amount of hand editing in order to convert them, at least for most
non-trivial scripts.  I think the best way to get things going with the pv
python interface is by using the python trace tools to mimic your gui
actions in a python script.  There is also tab completion in the paraview
python shell so that would be another way to figure things out.

Andy

On Thu, Nov 4, 2010 at 11:56 AM, Chris Kees <cekees at gmail.com> wrote:

> Hi,
>
> I've got a few questions about the python example, CoProcessingExample.py.
> First, FYI, when downloaded to my mac the script contains indentation errors
> so python can't parse it. Don't know what is going on (maybe our firewall is
> trying to prevent us from using python by messing up the indentation!).
> Second, my interepreter couldn't find the mpi module even though my
> PYTHONPATH etc were set up as on the wiki. I use mpi4py to manipulate mpi
> anyway, so I just modified the script to use it instead. Will that be OK in
> general or do I need to track down the mpi module in order for the
> coprocessing library to work correctly?
>
> In terms of using the example, I constructed an image source in paraview
> and colored it with the pointData, then saved the state script. I had to get
> some of the name strings straightened out but the example appeared to run
> and generated a sequence of png files. Does anybody have a simpler
> state/coprocessing script for that example that I can use for learning
> purposes?  The next thing to do is expose my solver's vtk data structures to
> the co-processor and generate a coprocessing script for it. I'm afraid given
> my weak understanding of what is going on, generating the state script from
> one of my xdmf data sets and trying to get it to work inside the
> coprocessing is going to be difficult (our i/o and existing vtk
> visualization are completely independent). It might be easier if I new how
> to wrote the state script by hand to execute something very simple. I've got
> lots of vtk pipelines set up for the data under our current approach to
> runtime vtk viz so I was hoping I could just paste in something similar into
> the state script.
>
> Thanks,
> Chris
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20101104/52fa2178/attachment-0001.htm>


More information about the ParaView mailing list