View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014712ParaView(No Category)public2014-05-02 11:482016-08-12 09:59
ReporterDan Lipsa 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Versiongit-master 
Target VersionFixed in Version 
Summary0014712: Catalyst script with a writer fails when one of the pipeline source is downloaded in ParaView
DescriptionRun
bin/pvpython ~/test/waveletdriver.py coprocessing-wavelet-views2 1000

Tools/Connect to Catalyst
Click on the Extract icon for the Slice pipeline object.

The Catalyst script fails with
Warning: In /home/danlipsa/src/ParaView-live-breakpoint/ParaViewCore/VTKExtensions/Core/vtkPVTrivialProducer.cxx, line 123
vtkPVTrivialProducer (0x346c2d0): Requesting time 0.016 but only 0.017 is available

ERROR: In /home/danlipsa/src/ParaView-live-breakpoint/VTK/Common/ExecutionModel/vtkDemandDrivenPipeline.cxx, line 715
vtkPVCompositeDataPipeline (0x34b8f80): Input port 0 of algorithm vtkXMLPPolyDataWriter(0x34b6890) has 0 connections but is not optional.


The two scripts are:
waveletdriver.py

import sys
if len(sys.argv) != 3:
    print "command is 'python <python driver code> <script name> <number of time steps>'"
    sys.exit(1)
import paraview
import paraview.vtk as vtk
import paraview.simple as pvsimple
import math

# initialize and read input parameters
paraview.options.batch = True
paraview.options.symmetric = True

def _refHolderMaker(obj):
    def _refHolder(obj2, string):
        tmp = obj
    return _refHolder

def coProcess(grid, time, step, scriptname, wholeExtent):
    import vtkPVCatalystPython
    import os
    scriptpath, scriptname = os.path.split(scriptname)
    sys.path.append(scriptpath)
    if scriptname.endswith(".py"):
        print 'script name is ', scriptname
        scriptname = scriptname[0:len(scriptname)-3]
    try:
        cpscript = __import__(scriptname)
    except:
        print sys.exc_info()
        print 'Cannot find ', scriptname, ' -- no coprocessing will be performed.'
        sys.exit(1)
        return

    datadescription = vtkPVCatalystPython.vtkCPDataDescription()
    datadescription.SetTimeData(time, step)
    datadescription.AddInput("input")
    cpscript.RequestDataDescription(datadescription)
    inputdescription = datadescription.GetInputDescriptionByName("input")
    if inputdescription.GetIfGridIsNecessary() == False:
        return

    inputdescription.SetGrid(grid)
    if grid.IsA("vtkImageData") == True or grid.IsA("vtkRectilinearGrid") == True \
            or grid.IsA("vtkStructuredGrid") == True:
        inputdescription.SetWholeExtent(wholeExtent)

    cpscript.DoCoProcessing(datadescription)



try:
    numsteps = int(sys.argv[2])
except ValueError:
    print 'the last argument should be a number'
    numsteps = 10


#imageData2 = vtk.vtkImageData()

for step in range(numsteps):
    print "Timestep ", step
    # assume simulation time starts at 0
    time = step/float(numsteps)

    # create the input to the coprocessing library. normally
    # this will come from the adaptor
    wavelet = pvsimple.Wavelet()
    wholeExtent = wavelet.WholeExtent
    # put in some variation in the point data that changes with time
    wavelet.Maximum = 255+200*math.sin(step)
    wavelet.UpdatePipeline()
    imageData = pvsimple.servermanager.Fetch(wavelet)

    # note that we delete wavelet now since. if not, it will
    # get deleted automatically in the coprocessing script
    pvsimple.Delete(wavelet)
    wavelet = None

    # "perform" coprocessing. results are outputted only if
    # the passed in script says we should at time/step
    coProcess(imageData, time, step, sys.argv[1], wholeExtent)
    imageData = None
    import time
    time.sleep(1)
TagsNo tags attached.
ProjectTBD
Topic Name
Typeincorrect functionality
Attached Files? file icon coprocessing-wavelet-views2.py [^] (5,377 bytes) 2014-05-02 11:48

 Relationships

  Notes
(0038567)
Kitware Robot (administrator)
2016-08-12 09:59

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current ParaView Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2014-05-02 11:48 Dan Lipsa New Issue
2014-05-02 11:48 Dan Lipsa File Added: coprocessing-wavelet-views2.py
2016-08-12 09:59 Kitware Robot Note Added: 0038567
2016-08-12 09:59 Kitware Robot Status backlog => closed
2016-08-12 09:59 Kitware Robot Resolution open => moved
2016-08-12 09:59 Kitware Robot Assigned To => Kitware Robot


Copyright © 2000 - 2018 MantisBT Team