[Paraview-developers] Reading multiple files in parallel

Moreland, Kenneth kmorel at sandia.gov
Mon Aug 15 18:58:06 EDT 2016


During the RequestData pass of the pipeline, you should be able to get the keys vtkStreamingDemandDrivenPipeline::UPDATE_PIECE_NUMBER() and vtkStreamingDemandDrivenPipeline::UPDATE_NUMBER_OF_PIECES() from the output information object that comes from downstream. This will tell you how many pieces the pipeline expects and which piece is expected to be read.

Generally the number of pieces requested will not match exactly the number of files that you have. This means you will have to adjust by either reading more than 1 file at a time or sometimes reading nothing and returning an empty object.

-Ken

From: sumeet kumar [mailto:sumeet.kumar507 at gmail.com]
Sent: Monday, August 15, 2016 3:52 PM
To: Moreland, Kenneth <kmorel at sandia.gov>
Cc: ParaView Developers <paraview-developers at paraview.org>
Subject: [EXTERNAL] Re: [Paraview-developers] Reading multiple files in parallel

Thanks Kenneth, for you help.
I get the vtkAlgorithm::CAN_HANDLE_PIECE_REQUEST(), set 1 part.
But, what to do next.

How can i get the piece no, so that i can update the data for it.

vtkmXMLPUnstructuredGridDataReader is not doing me a great help.

Sumeet

On Mon, Aug 15, 2016 at 12:57 PM, Moreland, Kenneth <kmorel at sandia.gov<mailto:kmorel at sandia.gov>> wrote:
I think the key you are looking for is vtkAlgorithm::CAN_HANDLE_PIECE_REQUEST(), which you want to set to 1 to signify that you can provide multiple pieces. You might want to look at vtkmXMLPUnstructuredGridDataReader for an example.

If I remember correctly, this has recently been changed in VTK. It used to be that you would give the number of pieces you supported, but that functionality was not useful in practice and consequently readers reported that they could produce any number of pieces in order to be useful. Thus, the behavior was change to allow readers simply to report whether or not they support multiple pieces. Berk can probably provide more information.

-Ken

From: Paraview-developers [mailto:paraview-developers-bounces at paraview.org<mailto:paraview-developers-bounces at paraview.org>] On Behalf Of sumeet kumar
Sent: Monday, August 15, 2016 12:58 PM
To: ParaView Developers <paraview-developers at paraview.org<mailto:paraview-developers at paraview.org>>
Subject: [EXTERNAL] [Paraview-developers] Reading multiple files in parallel

Hello all,
I have a number of files which contains information about pieces of unstructured mesh. For example :-

t_2.h5.01.feioutput
t_2.h5.03.feioutput
t_2.h5.04.feioutput
t_2.h5.05.feioutput
t_2.h5.06.feioutput
t_2.h5.07.feioutput
t_2.h5.08.feioutput
t_2.h5.09.feioutput
t_2.h5.feioutput
My reader can read each file individually but I want to read them all in parallel so that I can visualize the whole model. I looked at the http://www.paraview.org/Wiki/Writing_ParaView_Readers and followed the steps for unstructured mesh.
When I try to set the number of pieces in Request Information function as this

vtkInformation* Node_Mesh = outVec->GetInformationObject(0);
Node_Mesh->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), 10);

I get the following error

error: ‘MAXIMUM_NUMBER_OF_PIECES’ is not a member of ‘vtkStreamingDemandDrivenPipeline’
  Node_Mesh->Set(vtkStreamingDemandDrivenPipeline::MAXIMUM_NUMBER_OF_PIECES(), 10);

Also, it would be highly appreciated if anyone could show/(send me link) me to a sample example.
Regards

--
Error! Filename not specified.
Sumeet Kumar Sinha
Graduate Student
Phone: (+1) <tel:%28%2B91%29%209910516219> 5306018271<tel:5306018271>
Website : http://www.sumeetksinha.com/



--
[Image removed by sender.]
Sumeet Kumar Sinha
Graduate Student
Phone: (+1) <tel:%28%2B91%29%209910516219> 5306018271
Website : http://www.sumeetksinha.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20160815/c710dc93/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 407 bytes
Desc: image001.jpg
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20160815/c710dc93/attachment-0001.jpg>


More information about the Paraview-developers mailing list