[Paraview] Some D3 and MPI questions

Moreland, Kenneth kmorel at sandia.gov
Mon Nov 20 14:07:15 EST 2006


Hmmm.  That's a good question.  I can't think of a way that is not
completely hack-ish.  Perhaps you could listen to some sort of end event
on the D3 execution to get the last BSP cuts.

Another solution is to use the ability of vtkKdTree to partition several
data sets at the same time.  First, create your own vtkPKdTree object
(separate from that in D3).  Second, read in all of the data for each
time step and add the vtkDataSet from each block to your vtkPKdTree
(that should be easy because you are in the reader, right?).  Third,
copy the structure of your vtkPKdTree to D3's k-d tree
(D3->GetKdTree()->SetCuts(mytree->GetCuts()).  This should happen before
D3's first execution.  Now you should be ready to process any timesteps.

With this mode you will have one global partitioning that is applied to
all of the blocks.  Thus, each block taken independently will have an
uneven partition, but all the blocks together will have an even
partition.

-Ken

> -----Original Message-----
> From: John Biddiscombe [mailto:biddisco at cscs.ch]
> Sent: Monday, November 20, 2006 11:54 AM
> To: Moreland, Kenneth
> Cc: Paraview Mailing List
> Subject: Re: [Paraview] Some D3 and MPI questions
> 
> That's it - because it's multiblock - I'm only getting the Cuts from
the
> last pass of the CompositeDataPipeline loop - so the planar slice is
> correct, but only for the final part.
> 
> Damn. How can I get the BSP cuts for all parts of the multiblock data
> 
> JB
> 
> > Ken,
> >
> >> I'm a little confused.  Once you call SetCuts on a k-d tree, the
> >> distribution should be set and will never be recalculated.  Are you
> >> calling D3->GetKdTree()->SetCuts()?
> >>
> > On the animation I posted, I was not re-using the cuts, I was
allowing
> > the tree to be recomputed on each timestep.
> >
> > When I tried to re-use the cuts, as below - the first time the
reader
> > executes, we have this->FirstTime=true and the Cuts are saved, then
> > reused on subsequent passes - but the first frame looks ok and the
ones
> > after look very dodgy.
> >
> > The data is Multiblock and the D3 filter accepts only Unstructured,
so I
> > pass the data through a multigroupscalar filter and force the pieces
> > manually to trigger the copmposite data pipeline into looping for me
and
> > generating multiblock D3 output (it works very nicely).
> > The first execution gives the "right" looking data, but after that
it
> > changes and looks less well balanced. I concluded that it was
storing
> > not just the cuts, but also some Cell IDs and since these were
invalid
> > onsubsequent time steps, the thing failed to generate the proper
output.
> > It does seem to work consistently after the second execution, ie it
does
> > not change as you correctly state, but it doesn't look so good
either -
> > and why does it change the second time. I'm checking to see if I've
made
> > a boo-boo somewhere, but I welcome help.
> >
> > cheers
> >
> > JB
> >
> >
> > #ifdef USE_D3
> >    if (this->updateNumPieces>1) {
> >      //
> >      // Before doing any D3 filter operation, set a barrier point to
> > synchronize things
> >      //
> >      this->Controller->Barrier();
> >
> >      vtkCompositeDataPipeline *cp = vtkCompositeDataPipeline::New();
> >      this->D3->SetDefaultExecutivePrototype(cp);
> >      this->scalars->SetDefaultExecutivePrototype(cp);
> >      cp->Delete();
> >
> >      vtkStreamingDemandDrivenPipeline* exec =
> > vtkStreamingDemandDrivenPipeline::SafeDownCast(this->D3-
> >GetExecutive());
> >      exec->SetUpdateNumberOfPieces(exec->GetOutputInformation(0),
> > this->updateNumPieces);
> >      exec->SetUpdatePiece(exec->GetOutputInformation(0),
> > this->updatePiece);
> >
> >      if (!this->FirstStep && this->BSPcuts) {
> >        this->D3->GetKdtree()->SetCuts(this->BSPcuts);
> >        CSCSOutputMacro(<<"Using BSPCuts from previously ");
> >      }
> >      this->scalars->SetInput(mb);
> >      this->D3->SetInputConnection(this->scalars->GetOutputPort());
> >      this->D3->SetController(this->Controller);
> >      this->D3->SetBoundaryModeToAssignToAllIntersectingRegions();
> >      this->D3->UseMinimalMemoryOff();
> >      this->D3->SetRetainKdtree(1);
> >      exec->Update();
> >      if (this->FirstStep) {
> >        if (this->BSPcuts) this->BSPcuts->Delete();
> >        this->BSPcuts = this->D3->GetKdtree()->GetCuts();
> >        this->BSPcuts->Register(this);
> >        this->BSPcuts->PrintSelf(std::cout, 0 );
> >        this->FirstStep = 0;
> >      }
> >      //
> >      //
> >      //
> >      dob = exec->GetOutputData(0);
> >    }
> > #endif
> >
> >
> > _______________________________________________
> > ParaView mailing list
> > ParaView at paraview.org
> > http://www.paraview.org/mailman/listinfo/paraview
> 
> 
> --
> John Biddiscombe,                            email:biddisco @ cscs.ch
> http://www.cscs.ch/about/BJohn.php
> CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07
> Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82
> 




More information about the ParaView mailing list