[Paraview-developers] Parallel Reader Plugin, Grid false

Mizael Moser, Markus Klaus markus.moser at rwth-aachen.de
Wed Jun 21 09:32:45 EDT 2017


Dear ParaView developers,


I wrote a plugin to read in structured grid HDF5 fiels but I am having problems with running the plugin in parallel. The grid isn't loaded/visualized correctly when running the plugin in parallel. The grid is open at the end of the axis, where the extent is divided. It appears that ParaView doesn't know,when running in parallel, that the grid is finished there.
The data is loaded correctly into the "false" grid. I get no error and it looks fine except for the grid part that is missing.

If i run the plugin in serial everything is fine.


The plugin inherits from vtkMultiBlockDataSet and looks like this:

Request information:
//Basic stuff

//extent[6]

//read the extent from the grid and store it in extent

this->internalBlocks->Blocks[0]->SetExtent(0,extent[1], 0, extent[3],0, extent[5]);

//outinfo GetInformationObject and CAN_PRODUCE_SUB_EXTENT

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


RequestData:

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

vtkStructuredGrid* nthGrid = this->internalBlocks->Blocks[0];
int  subext[6];

outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(),subext;)
int size[3]={0,0,0};
size[0]=subext[5]-subext[4]+1;
size[1]=subext[3]-subext[2]+1;
size[2]=subext[1]-subext[0]+1;

//stuff

//reading the points in x,y,z for each process with the offset etc.

 vtkPoints *points = vtkPoints::New();

      for(int k=0; k<size[0]; k++ ){
           for(int j=0; j<size[1]; j++ ){
                for(int ii=0;ii<size[2];ii++){
                     int pointId=ii+(j+k*size[1])*size[2];
                     points->InsertNextPoint(x[pointId],y[pointId],z[pointId]);

}

}

}

nthGrid->SetPoints(points);

//Loading the Data


For example the dimension is 151x122x50, and i run it with 2 MPI processes then i get the following outputs for the grid:

The extent from CPU0 is: 0-75, 0-122, 0-50 and the corresponding size is 76, 123, 51
The extent from CPU1 is 75-150, 0-122,0-50 and the corresponding size is 76, 123, 51
The data is divided correctly and the output looks fine, doesn't it?


What am i doing wrong?
Thanks in advance,

Markus Moser
Student Assistant

Chair of Fluid Mechanics and Institute of Aerodynamics Aachen
RWTH Aachen


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20170621/b42278f0/attachment.html>


More information about the Paraview-developers mailing list