Kevin, Attached is a patch. Can you verify that it works after applying the patch? If so, I'll commit it to CVS.
Thanks Utkarsh On Thu, Feb 12, 2009 at 4:45 PM, Kevin H. Hobbs <hob...@ohiou.edu> wrote: > On Thu, 2009-02-12 at 15:34 -0500, Utkarsh Ayachit wrote: >> Ah and there's the bad news. >> In case of image data for the "if" condition at vtkPKdTree.cxx:435, >> I'd expect the condition to succeed and go to >> this->ProcessUserDefinedCuts(..) however, it seems like that condition >> is failing and it's going to this->MultiProcessBuildLocator(..) which >> is used for unstructured datasets. >> >> Are you able to reproduce the behavior with a simpler dataset (say >> wavelet) or something that;s already in ParaViewData, or some dataset >> that I can try it with? > > Yes, I was able to reproduce the problem with the wavelet source data. > and I got a new datum as well. > > It seems I have to load the large image from a .vti file for the error > to occur. > > The error does not occur when I create a large image in parallel with > the wavelet source. > >> Also give me all the steps to reproduce the >> problem (since I am not able to reproduce it with 5 procs using >> Wavelet source). >> >> Utkarsh > > In paraview connected to the builtin server I created a wavelet source > with extents 0 1958 0 1498 0 77 to match my file. > > I then saved that to a vti file. > > I then restarted paraview and started a 2 core server that the dialog > runs with > > mpirun -np 2 \ > /home/kevin/kitware/ParaView3_Build/bin/pvserver \ > --use-offscreen-rendering > > I loaded the image then selected volume rendering for the > representation. > > Then BLAMO swap-death. > > >
Index: Servers/Filters/vtkKdTreeManager.cxx =================================================================== RCS file: /cvsroot/ParaView3/ParaView3/Servers/Filters/vtkKdTreeManager.cxx,v retrieving revision 1.7 diff -u -3 -p -r1.7 vtkKdTreeManager.cxx --- Servers/Filters/vtkKdTreeManager.cxx 24 Nov 2008 14:32:41 -0000 1.7 +++ Servers/Filters/vtkKdTreeManager.cxx 12 Feb 2009 22:24:40 -0000 @@ -24,6 +24,7 @@ #include "vtkPoints.h" #include "vtkPVUpdateSuppressor.h" #include "vtkSmartPointer.h" +#include "vtkSphereSource.h" #include "vtkUnstructuredGrid.h" #define VTK_CREATE(type, name) \ @@ -38,7 +39,6 @@ class vtkKdTreeManager::vtkAlgorithmSet vtkStandardNewMacro(vtkKdTreeManager); vtkCxxRevisionMacro(vtkKdTreeManager, "$Revision: 1.7 $"); vtkCxxSetObjectMacro(vtkKdTreeManager, StructuredProducer, vtkAlgorithm); -vtkCxxSetObjectMacro(vtkKdTreeManager, KdTree, vtkPKdTree); //---------------------------------------------------------------------------- vtkKdTreeManager::vtkKdTreeManager() { @@ -46,6 +46,7 @@ vtkKdTreeManager::vtkKdTreeManager() this->StructuredProducer = 0; this->KdTree = 0; this->NumberOfPieces = 1; + this->KdTreeInitialized = false; } //---------------------------------------------------------------------------- @@ -95,6 +96,16 @@ void vtkKdTreeManager::RemoveAllProducer } //---------------------------------------------------------------------------- +void vtkKdTreeManager::SetKdTree(vtkPKdTree* tree) +{ + if (this->KdTree != tree) + { + vtkSetObjectBodyMacro(KdTree, vtkPKdTree, tree); + this->KdTreeInitialized = false; + } +} + +//---------------------------------------------------------------------------- void vtkKdTreeManager::Update() { vtkAlgorithmSet::iterator iter; @@ -132,17 +143,26 @@ void vtkKdTreeManager::Update() } this->KdTree->RemoveAllDataSets(); - for (dsIter = outputs.begin(); dsIter != outputs.end(); ++dsIter) - { - this->AddDataSetToKdTree(*dsIter); - } - - static bool initialized = false; - if (!initialized) + if (!this->KdTreeInitialized) { + // HACK: This hack fixes the following issue: + // * create wavelet (num procs >= 4) + // * volume render -- broken!!! + // * change some wavelet parameter (force the KdTree to rebuild) and all's fine! + // Seems like something doesn't get initialized correctly, I have no idea + // what. This seems to overcome the issue. + vtkSphereSource* sphere = vtkSphereSource::New(); + sphere->Update(); + this->KdTree->AddDataSet(sphere->GetOutput()); + sphere->Delete(); this->KdTree->BuildLocator(); - initialized = true; + this->KdTree->RemoveAllDataSets(); + this->KdTreeInitialized = true; } + for (dsIter = outputs.begin(); dsIter != outputs.end(); ++dsIter) + { + this->AddDataSetToKdTree(*dsIter); + } if (this->StructuredProducer) { Index: Servers/Filters/vtkKdTreeManager.h =================================================================== RCS file: /cvsroot/ParaView3/ParaView3/Servers/Filters/vtkKdTreeManager.h,v retrieving revision 1.2 diff -u -3 -p -r1.2 vtkKdTreeManager.h --- Servers/Filters/vtkKdTreeManager.h 7 Sep 2007 13:34:15 -0000 1.2 +++ Servers/Filters/vtkKdTreeManager.h 12 Feb 2009 22:24:40 -0000 @@ -65,6 +65,7 @@ protected: void AddDataSetToKdTree(vtkDataSet *data); + bool KdTreeInitialized; vtkAlgorithm* StructuredProducer; vtkPKdTree* KdTree; int NumberOfPieces;
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview