[vtkusers] vtkMultiProcessController : BUG ?

Philippe Guerville philippe.guerville at cea.fr
Wed Aug 30 11:13:55 EDT 2000


I tried to use data parallelism in vtk to cut trough a large unstructured
grid with a plane.
As in ParallelIso.cxx example, each process read a subset of the
unstructured grid and
compute the cut plane. The resulting polydata from each proces is send over
an output
port to process 0 and then render.

I can change interactively the cut plane position with vtkCutter::SetValue.

If for a given value the cut plane intersects one of the subset and for the
next value it
does not intersect this subset, I've got a seg fault.

With the help of totalview, I Think that the problem is the following :

    file vtkMultiProcessController.cxx Revision: 1.34

    616    int vtkMultiProcessController::ReadDataSet(vtkDataSet *object)
             {
    ....
    631  output = reader->GetOutput();
            output->Update();

            object->ShallowCopy(output);
    ....
    }

called from vtkMultiProcessController::ReadObject
                  vtkMultiProcessController::Receive
                  vtkInputPort::UpdateData

Line 634, the new output is "shallow" copied in the old output of
vtkInputPort.

But if you look at :

    file vtkPolyData.cxx Revision: 1.121

    1581  void vtkPolyData::ShallowCopy(vtkDataObject *dataObject)
             {
    ....
    1589        this->SetPolys(polyData->GetPolys());
    ....
    1615      // Do superclass
                  this->vtkPointSet::ShallowCopy(dataObject);
              }

and

    677    void vtkPolyData::SetPolys (vtkCellArray* p)
             {
                 if ( p != this->Polys && p != this->Dummy )
         !!!! DO NOTHING IF p == Dummy

If the Polys array of the new output of vtkInputPort is dummy, you keep the
old
one but you change the point set and the resulting vtkPolyData is
inconsistent.

I've done the following changes :

               void vtkPolyData::SetPolys (vtkCellArray* p)
              {
                 if(p == this->Dummy) p == 0;
                 if ( p != this->Polys)
               ......

I think that vtkPolyData::SetVerts , vtkPolyData::SetLines and
vtkPolyData::SetStrips
should be modified accordingly.

    Philippe Guerville
    philippe.guerville at cea.fr






More information about the vtkusers mailing list