[vtkusers] MPI Volume Rendering

John Biddiscombe biddisco at cscs.ch
Fri May 5 09:11:11 EDT 2006


> They all get the same file just copied to each node.
> 
>> on each processor, load a piece, render it, the composite on the client 
>> or master node. If volume pieces are contiguous blocks then transparency 
>> will be handled by sorting the composition order...
>>
> 
> Hmmm... it is a single piece file, I could split it up into streamed
> pieces. I don't know if that helps though.

OK. you can have the whole file copied to each node if you want, you 
don't need to split the file into pieces, but what you do need to do, is 
tell the reader on each process to only read a "piece"

There are several ways to accomplish this. If you are using a composite 
render manager, you can just tell it to InitializePieces, this will 
cause the mappers in each process to have a piece number set, this gets 
propagated upstream back to the readers and they obey (in an ideal 
world). This probably only works for polydata (i seem to remember seeing 
a comment about this in the docs).

for other data types you need to explicitly set an extent.
One way is to first get the executive

vtkStreamingDemandDrivenPipeline* sddp = 
vtkStreamingDemandDrivenPipeline::SafeDownCast(this->particleInterpolator->GetExecutive());

on a filter at the end of the pipeline (a mapper might do - see that), 
and use something like a vtkExtentTranslator to generate a structured 
extent from a piece number

     vtkExtentTranslator *extTran = vtkExtentTranslator::New();
     extTran->SetSplitModeToBlock();
     int WholeExtent[6] = {
           0, vshape.NcDimension[0]->size()-1,
           0, vshape.NcDimension[1] ? vshape.NcDimension[1]->size()-1 : 0,
           0, vshape.NcDimension[2] ? vshape.NcDimension[2]->size()-1 : 0};
     extTran->SetNumberOfPieces(updateNumPieces);
     extTran->SetWholeExtent(WholeExtent);
     extTran->SetNumberOfPieces(updateNumPieces);
     extTran->SetPiece(updatePiece);


ignore the variables in there, use your own. This works well for an 
image data or other structured type.  (use numProcs and ProcNum if you 
like instead of piecenum etc)

now you've got an update extent, you can set it on the executive and the 
extent is propagated back up the pipeline to the reader. the reader must 
be able to handle the REQUEST_UPDATE_EXTENT or whatever.

for unstructured grid, I can't remember what type of extent you need. 
polydata is pieces, imagedata is extents in block form, but for 
unstructured grid you may need to play around (probably cellId 0...N-1 
in chunks will do).

sorry. I'm doing this mostly from memory and am in a hurry to finish off 
other things, poke around with this stuff and you'll soon get it working.

JB





More information about the vtkusers mailing list