[Paraview-developers] Parallel structured grid reader doesn"t produce subextent

Mizael Moser, Markus Klaus markus.moser at rwth-aachen.de
Wed Jun 7 18:24:59 EDT 2017


Thank you, it works now. The extent is now perfectly divided.

Markus Moser
Student assistant
Chair of Fluid Mechanics and Institute of Aerodynamics
Wüllnerstraße 5a
RWTH Aachen University
52062 Aachen
Germany
________________________________________
Von: Utkarsh Ayachit [utkarsh.ayachit at kitware.com]
Gesendet: Dienstag, 30. Mai 2017 16:30
An: Mizael Moser, Markus Klaus
Cc: paraview-developers at paraview.org
Betreff: Re: [Paraview-developers] Parallel structured grid reader doesn"t produce subextent

Use  outInfo->Set(CAN_PRODUCE_SUB_EXTENT(), 1)  instead of outInfo->Set(CAN_HANDLE_PIECE_REQUEST(),1). Alternatively, you can create a vtkExtentTranslator instance yourself in RequestData to convert UPDATE_PIECE_NUMBER(), UPDATE_NUMBER_OF_PIECES()  to sub-extents in RequestData.

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.

Utkarsh

On Tue, May 30, 2017 at 10:08 AM, Mizael Moser, Markus Klaus <markus.moser at rwth-aachen.de<mailto:markus.moser at rwth-aachen.de>> wrote:

Dear ParaView developers,

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).


I found the wiki for a structured grid parallel reader (http://www.paraview.org/Wiki/Writing_ParaView_Readers) and used it as orientation.


My RequestInformation looks like this:


//Reading basic information

//Reading in the extent from the file

int extent[6];

//storing the extent in the array

vtkInformation* outInfo=outputVector->GetInformationObject(0);

outInfo->Set(CAN_HANDLE_PIECE_REQUEST(),1);

outInfo ->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),extent,6);



RequestData looks like this:


vtkProcessModule *ParInfo;
vtkInformation *outInfo = outputVector->GetInformationObject(0);
vtkMultiBlockDataSet* multiBlock = vtkMultiBlockDataSet::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));

int subext[6];
outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(),subext);

cout<<"Num of Processors = "<<ParInfo->GetNumberOfLocalPartitions()<<endl;

cout<< "subext from rank"<< ParInfo->GetPartitionId() << " " <<subext[0]<<.......<<.....<< ex[5] <<endl;

//Reading the grid and the data-set


Lets say the extent is 50x120x150 and i start the server with
mpirun -np 2 pvs and connecting the client i get the following "output":

Num of Processors = 2
Num of Processors = 2
subext from rank0 0 50 0 120 0 150
subext from rank1 0 50 0 120 0 150
But at the end the Dataset is still visualized correctly.


Normally "outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(),subext);" should produce the sub-extent for the rank or am i wrong?

What am I doing wrong, or what do I have to do to get the sub-extent?


Thank you very much in advance,
Markus Moser


Markus Moser
Student assistant

Chair of Fluid Mechanics and Institute of Aerodynamics

Wüllnerstraße 5a
RWTH Aachen University

52062 Aachen
Germany






_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=Paraview-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview-developers




More information about the Paraview-developers mailing list