<div dir="ltr">Use <b> outInfo->Set(CAN_PRODUCE_SUB_EXTENT(), 1) </b> instead of <b>outInfo->Set(CAN_HANDLE_PIECE_REQUEST(),1)</b>. Alternatively, you can create a <b>vtkExtentTranslator</b> instance yourself in RequestData to convert <i>UPDATE_PIECE_NUMBER(), UPDATE_NUMBER_OF_PIECES() </i><b style="font-style:italic"> </b>to sub-extents in <b>RequestData</b>. <div><br></div><div>The latter may be better since it looks like your reader is producing a vtkMultiBlockDataSet. If I remember correctly, the extent-based request only works for structured datasets eg. vtkStructuredGrid, vtkImageData etc.</div><div><br></div><div>Utkarsh</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 30, 2017 at 10:08 AM, Mizael Moser, Markus Klaus <span dir="ltr"><<a href="mailto:markus.moser@rwth-aachen.de" target="_blank">markus.moser@rwth-aachen.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Dear ParaView developers,<br>
<br>
I'm having trouble to parallelize my ParaView reader plugin. I want to read HDF5 files and the grid is a structured grid. The plugin works perfectly fine if run in serial, and if i run it in parallel the solution is also correct but instead of dividing the
dataset in x subsets, it reads the whole dataset x times(for each processor 1 time).</p>
<p><br>
</p>
<p>I found the wiki for a structured grid parallel reader (<a href="http://www.paraview.org/Wiki/Writing_ParaView_Readers" target="_blank">http://www.paraview.org/Wiki/<wbr>Writing_ParaView_Readers</a>) and used it as orientation.<br>
</p>
<p><br>
</p>
<p>My RequestInformation looks like this:</p>
<p><br>
</p>
<p>//Reading basic information</p>
<p>//Reading in the extent from the file<br>
</p>
<p>int extent[6];</p>
<p>//storing the extent in the array </p>
<p>vtkInformation* outInfo=outputVector-><wbr>GetInformationObject(0);</p>
<p>outInfo->Set(CAN_HANDLE_PIECE_<wbr>REQUEST(),1);</p>
<p>outInfo ->Set(<wbr>vtkStreamingDemandDrivenPipeli<wbr>ne::WHOLE_EXTENT(),extent,6);<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>RequestData looks like this:</p>
<p><br>
</p>
<p>vtkProcessModule *ParInfo;<br>
vtkInformation *outInfo = outputVector-><wbr>GetInformationObject(0);<br>
vtkMultiBlockDataSet* multiBlock = vtkMultiBlockDataSet::<wbr>SafeDownCast(outInfo->Get(<wbr>vtkDataObject::DATA_OBJECT()))<wbr>;</p>
<p>int subext[6];<br>
outInfo->Get(<wbr>vtkStreamingDemandDrivenPipeli<wbr>ne::UPDATE_EXTENT(),subext);</p>
<p>cout<<"Num of Processors = "<<ParInfo-><wbr>GetNumberOfLocalPartitions()<<<wbr>endl;<br>
</p>
<p>cout<< "subext from rank"<< ParInfo->GetPartitionId() << " " <<subext[0]<<.......<<.....<< ex[5] <<endl;</p>
<p>//Reading the grid and the data-set<br>
<br>
</p>
<p>Lets say the extent is 50x120x150 and i start the server with<br>
mpirun -np 2 pvs and connecting the client i get the following "output":</p>
<p>Num of Processors = 2<br>
Num of Processors = 2<br>
subext from rank0 0 50 0 120 0 150<br>
subext from rank1 0 50 0 120 0 150<br>
But at the end the Dataset is still visualized correctly.<br>
</p>
<p><br>
</p>
<p>Normally "outInfo->Get(<wbr>vtkStreamingDemandDrivenPipeli<wbr>ne::UPDATE_EXTENT(),subext);" should produce the sub-extent for the rank or am i wrong?<br>
</p>
<p>What am I doing wrong, or what do I have to do to get the sub-extent?<br>
</p>
<p><br>
</p>
<p>Thank you very much in advance,<br>
Markus Moser</p>
<p><br>
</p>
<p>Markus Moser<br>
Student assistant<br>
</p>
<p>Chair of Fluid Mechanics and Institute of Aerodynamics</p>
<p>Wüllnerstraße 5a<br>
RWTH Aachen University<br>
</p>
<p>52062 Aachen<br>
Germany<br>
<br>
</p>
<p><br>
<br>
<br>
<br>
</p>
</div>
<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=Paraview-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>Paraview-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/paraview-<wbr>developers</a><br>
<br></blockquote></div><br></div>