<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>Hi all,<div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div><br></div><div>I am getting this error when running my simulation with Catalyst adaptor:<br></div></div></div><div><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div><br></div><div>ERROR: In /root/ParaView-v5.0.0-source/VTK/Common/ExecutionModel/vtkCompositeDataPipeline.cxx, line 171<br>vtkPVCompositeDataPipeline (0x3df1e30): Can not execute simple alorithm without output ports<br><div><br></div></div><div>You can find below the relevant sections of my code.<br></div><div>The python script (generated by ParaView GUI) that I am using is attached.<br></div><div><br></div><div>-----------------<br></div><div>Adaptor.cpp<br></div><div>-----------------<br></div><div><br></div><div>  1 /*<br>  2  * Based on ParaViewCatalyst Example <br>  3  * https://github.com/Kitware/ParaViewCatalystExampleCode/tree/master/CxxMultiPieceExample<br>  4 */<br><div><br></div></div><div> 31 namespace Adaptor<br> 32 {<br> 33 <br> 34 void BuildVTKGrid(Grid& grid)<br> 35 { <br><div><br></div> 40   VTKGrid->SetNumberOfBlocks(mpiSize);<br> 41   <br> 42   vtkNew<vtkFloatArray> xArray, yArray, zArray;<br> 43   xArray->SetArray(grid.GetXLocalCoord(), static_cast<vtkIdType>(grid.GetExtents()[0]), 1);<br><div><br></div> 46   <br> 47   vtkNew<vtkRectilinearGrid> rectGrid;<br> 48   rectGrid->SetDimensions(grid.GetExtents()[0],grid.GetExtents()[1], grid.GetExtents()[2]);<br> 49   rectGrid->SetXCoordinates(xArray.GetPointer());<br><div><br></div> 53   VTKGrid->SetBlock(mpiRank,rectGrid.GetPointer());<br> 54 <br> 55 }<br> 56 <br> 57 void UpdateVTKAttributes(Grid& grid, Attributes& attributes)<br> 58 { <br><div><br></div> 64   vtkDataSet* dataSet = vtkDataSet::SafeDownCast(VTKGrid->GetBlock(mpiRank));<br> 65   if(dataSet->GetPointData()->GetNumberOfArrays() == 0)<br> 66   { <br> 67     vtkNew<vtkFloatArray> array;<br> 68     array->SetName("dbz");<br> 69     array->SetNumberOfComponents(1);<br> 70     dataSet->GetPointData()->AddArray(array.GetPointer());<br> 71   }<br> 72   <br> 73   vtkFloatArray* dbz = vtkFloatArray::SafeDownCast(dataSet->GetPointData()->GetArray("dbz"));<br> 74   dbz->SetArray(attributes.GetDbzArray(), static_cast<vtkIdType>(grid.GetNumberOfLocalPoints()), 1    );<br><div><br></div> 77 }<br> 78 <br><div><br></div> 80 void BuildVTKDataStructures(Grid& grid, Attributes& attributes)<br> 81 {<br> 82   if (VTKGrid == NULL){<br> 83     VTKGrid = vtkMultiBlockDataSet::New();<br> 84     BuildVTKGrid(grid);<br> 85   }<br> 86   UpdateVTKAttributes(grid, attributes);<br> 87 }<br><div><br></div> 90 int Initialize (const char* scriptPath)<br> 91 {<br> 92   if(Processor == NULL)<br> 93   {<br> 94     Processor = vtkCPProcessor::New();<br> 95     Processor->Initialize();<br> 96   } else<br> 97   {<br> 98     Processor->RemoveAllPipelines();<br> 99   }<br>100 <br>101   vtkNew<vtkCPPythonScriptPipeline> pipeline;<br>102   if (pipeline->Initialize(scriptPath) == 0){<br>103     std::cerr << "Cannot read python script " << scriptPath << std::endl;<br>104     return 1;<br>105   }<br>106 <br>107   Processor->AddPipeline(pipeline.GetPointer());<br>108   return 0;<br>109 }<br><div><br></div>111 int Finalize()<br>112 {<br>113   if(Processor)<br>114   {<br>115     Processor->Delete();<br>116     Processor = NULL;<br>117   }<br>118   if(VTKGrid)<br>119   {<br>120     VTKGrid->Delete();<br>121     VTKGrid = NULL;<br>122   }<br>123 <br>124   return 0;<br>125 }<br>126 <br>127 int CoProcess(Grid& grid, Attributes& attributes, int timestep)<br>128 {<br>129   vtkNew<vtkCPDataDescription> dataDescription;<br>130   dataDescription->AddInput("input");<br>131   dataDescription->SetTimeData(timestep,timestep);<br>132   if(Processor->RequestDataDescription(dataDescription.GetPointer()) != 0)<br>133   {<br>134     BuildVTKDataStructures(grid, attributes);<br>135     dataDescription->GetInputDescriptionByName("input")->SetGrid(VTKGrid);<br>136     Processor->CoProcess(dataDescription.GetPointer());<br>137   }<br>138 <br>139   return 0;<br>140 }<br>141 <br>142 }<br><br></div><div><br></div><div>Thanks for your help,<br></div><div>Lokman<br></div><div><div><span>================================</span><br></div></div></div></div><div><br></div></div></div><div><br></div></div></body></html>