[Paraview] Does servermanager.sources.TextSource Work?

Kent Eschenberg eschenbe at psc.edu
Mon Mar 31 10:40:53 EDT 2008


After applying Utkarsh's patch the text displays as expected when using pvpython, and when using pvbatch in serial mode. However, when pvbatch is run in parallel mode, the program crashes. The error seems to come from vtkOrderedCompositeDistributor which is of course only used in parallel mode.

The system is CentOS 5 and I was running 3.2.1 with the patch plus a few local additions. 

A fix or workaround would be very much appreciated.

Kent
Pittsburgh Supercomputing Center

=======================================
$ mpiexec -np 2 pvbatch cut.py
vtkPVDReader : [ ...........]
===> more stuff
vtkCutter : [ ...........]
vtkCutter : [ ...........]
vtkPVGeometryFilter : [ ...........]
vtkPVGeometryFilter : [ ...........]
vtkMPIMoveData : [ ...........]
vtkPVUpdateSuppressor : [ ...........]
vtkOrderedCompositeDistributor : [ ...........]
Process id: 1 >> ERROR: In /usr/local/packages/paraview/3.2.1/src/VTK/Filtering/
vtkDemandDrivenPipeline.cxx, line 811
vtkCompositeDataPipeline (0x16dc8b0): Input for connection index 0 on input port
 index 0 for algorithm vtkTransmitPolyDataPiece(0x16b76f0) is of type vtkTable, 
but a vtkPolyData is required.
===> more of the same
=======================================

Utkarsh Ayachit wrote:
> Kent,
> 
> I've just commited a fix to the CVS (patch for the same is also attached).
> 
> With this fix, you can optionally  specify which representation proxy to 
> create for the source.
> 
> Hence for text source the script will become:
> ...
>  > text = servermanager.sources.TextSource()
>  > text.Text = "Hello World"
>  > textRep = servermanager.CreateRepresentation( text, view, \
>        proxyName="TextSourceRepresentation")
>  > view.StillRender()
> ...
> 
> 
> PATCH <<<===========================================================
> 
> 
> Index: Utilities/VTKPythonWrapping/paraview/servermanager.py
> ===================================================================
> RCS file: 
> /cvsroot/ParaView3/ParaView3/Utilities/VTKPythonWrapping/paraview/servermanager.py,v 
> 
> retrieving revision 1.26
> diff -u -3 -p -r1.26 servermanager.py
> --- Utilities/VTKPythonWrapping/paraview/servermanager.py       29 Feb 
> 2008 20:55:32 -00001.26
> +++ Utilities/VTKPythonWrapping/paraview/servermanager.py       24 Mar 
> 2008 19:32:08 -0000
> @@ -1250,18 +1250,27 @@ def CreateRepresentation(aProxy, view, *
>      keyword arguments where the key is the name of the property.In 
> addition
>      registrationGroup and registrationName (optional) can be specified (as
>      keyword arguments) to automatically register the proxy with the proxy
> -    manager."""
> +    manager.
> +
> +    This method tries to create the best possible representation for 
> the given
> +    proxy in the given view. Additionally, the user can specify proxyName
> +    (optional) to create a representation of a particular type."""
> 
>      global rendering
>      if not aProxy:
>          raise exceptions.RuntimeError, "proxy argument cannot be None."
>      if not view:
>          raise exceptions.RuntimeError, "render module argument cannot 
> be None."
> -    display = view.SMProxy.CreateDefaultRepresentation(aProxy.SMProxy, 0)
> +    if "proxyName" in extraArgs:
> +      display = CreateProxy("representations", extraArgs['proxyName'], 
> None)
> +      del extraArgs['proxyName']
> +    else:
> +      display = 
> view.SMProxy.CreateDefaultRepresentation(aProxy.SMProxy, 0)
> +      if display:
> +        display.UnRegister(None)
>      if not display:
>          return None
>      display.SetConnectionID(aProxy.GetConnectionID())
> -    display.UnRegister(None)
>      extraArgs['proxy'] = display
>      proxy = rendering.__dict__[display.GetXMLName()](**extraArgs)
>      proxy.Input = aProxy
> 
> 
> ============================================================>>>>


More information about the ParaView mailing list