[Paraview-developers] Fwd: vtkPVCompositeDataPipeline : Can not execute simple alorithm without output ports

Lokman Rahmani lokman.rahmani at irisa.fr
Thu May 26 11:34:17 EDT 2016


Hi all, 

I am getting this error when running my simulation with Catalyst adaptor: 

ERROR: In /root/ParaView-v5.0.0-source/VTK/Common/ExecutionModel/vtkCompositeDataPipeline.cxx, line 171 
vtkPVCompositeDataPipeline (0x3df1e30): Can not execute simple alorithm without output ports 

You can find below the relevant sections of my code. 
The python script (generated by ParaView GUI) that I am using is attached. 

----------------- 
Adaptor.cpp 
----------------- 

1 /* 
2 * Based on ParaViewCatalyst Example 
3 * https://github.com/Kitware/ParaViewCatalystExampleCode/tree/master/CxxMultiPieceExample 
4 */ 

31 namespace Adaptor 
32 { 
33 
34 void BuildVTKGrid(Grid& grid) 
35 { 

40 VTKGrid->SetNumberOfBlocks(mpiSize); 
41 
42 vtkNew<vtkFloatArray> xArray, yArray, zArray; 
43 xArray->SetArray(grid.GetXLocalCoord(), static_cast<vtkIdType>(grid.GetExtents()[0]), 1); 

46 
47 vtkNew<vtkRectilinearGrid> rectGrid; 
48 rectGrid->SetDimensions(grid.GetExtents()[0],grid.GetExtents()[1], grid.GetExtents()[2]); 
49 rectGrid->SetXCoordinates(xArray.GetPointer()); 

53 VTKGrid->SetBlock(mpiRank,rectGrid.GetPointer()); 
54 
55 } 
56 
57 void UpdateVTKAttributes(Grid& grid, Attributes& attributes) 
58 { 

64 vtkDataSet* dataSet = vtkDataSet::SafeDownCast(VTKGrid->GetBlock(mpiRank)); 
65 if(dataSet->GetPointData()->GetNumberOfArrays() == 0) 
66 { 
67 vtkNew<vtkFloatArray> array; 
68 array->SetName("dbz"); 
69 array->SetNumberOfComponents(1); 
70 dataSet->GetPointData()->AddArray(array.GetPointer()); 
71 } 
72 
73 vtkFloatArray* dbz = vtkFloatArray::SafeDownCast(dataSet->GetPointData()->GetArray("dbz")); 
74 dbz->SetArray(attributes.GetDbzArray(), static_cast<vtkIdType>(grid.GetNumberOfLocalPoints()), 1 ); 

77 } 
78 

80 void BuildVTKDataStructures(Grid& grid, Attributes& attributes) 
81 { 
82 if (VTKGrid == NULL){ 
83 VTKGrid = vtkMultiBlockDataSet::New(); 
84 BuildVTKGrid(grid); 
85 } 
86 UpdateVTKAttributes(grid, attributes); 
87 } 

90 int Initialize (const char* scriptPath) 
91 { 
92 if(Processor == NULL) 
93 { 
94 Processor = vtkCPProcessor::New(); 
95 Processor->Initialize(); 
96 } else 
97 { 
98 Processor->RemoveAllPipelines(); 
99 } 
100 
101 vtkNew<vtkCPPythonScriptPipeline> pipeline; 
102 if (pipeline->Initialize(scriptPath) == 0){ 
103 std::cerr << "Cannot read python script " << scriptPath << std::endl; 
104 return 1; 
105 } 
106 
107 Processor->AddPipeline(pipeline.GetPointer()); 
108 return 0; 
109 } 

111 int Finalize() 
112 { 
113 if(Processor) 
114 { 
115 Processor->Delete(); 
116 Processor = NULL; 
117 } 
118 if(VTKGrid) 
119 { 
120 VTKGrid->Delete(); 
121 VTKGrid = NULL; 
122 } 
123 
124 return 0; 
125 } 
126 
127 int CoProcess(Grid& grid, Attributes& attributes, int timestep) 
128 { 
129 vtkNew<vtkCPDataDescription> dataDescription; 
130 dataDescription->AddInput("input"); 
131 dataDescription->SetTimeData(timestep,timestep); 
132 if(Processor->RequestDataDescription(dataDescription.GetPointer()) != 0) 
133 { 
134 BuildVTKDataStructures(grid, attributes); 
135 dataDescription->GetInputDescriptionByName("input")->SetGrid(VTKGrid); 
136 Processor->CoProcess(dataDescription.GetPointer()); 
137 } 
138 
139 return 0; 
140 } 
141 
142 } 

Thanks for your help, 
Lokman 
================================ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20160526/dc340484/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wk100_dbz_06720_000144_no-iso.py
Type: text/x-python
Size: 3648 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20160526/dc340484/attachment-0001.py>


More information about the Paraview-developers mailing list