MantisBT - VTK
View Issue Details
0008130VTK(No Category)public2008-11-20 14:482016-08-12 09:55
Benjamin Schindler 
Kitware Robot 
normalminoralways
closedmoved 
 
 
0008130: Make vtkPointLocator::findClosestPointsWithinRadius thread-safe
It is reportet that findClosestsPointsWithinRadius is supposed to be thread-safe. Well, it's not in 5.2.

Changing line 920 from:

pt = this->DataSet->GetPoint(ptId);

to

this->DataSet->GetPoint(ptId, pt);

(and converting pt from double* to double[3])

Makes it work for me. I'm not yet sure whether the buckets used there are thread-safe (haven't had a look at it), but my code seems happy atm
No tags attached.
patch 0001-Make-FindPointsWithinRadius-race-free.patch (1,122) 2008-11-21 06:02
https://www.vtk.org/Bug/file/6859/0001-Make-FindPointsWithinRadius-race-free.patch
Issue History
2008-11-20 14:48Benjamin SchindlerNew Issue
2008-11-21 06:02Benjamin SchindlerFile Added: 0001-Make-FindPointsWithinRadius-race-free.patch
2008-11-21 11:57Benjamin SchindlerNote Added: 0014158
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2016-08-12 09:55Kitware RobotNote Added: 0037040
2016-08-12 09:55Kitware RobotStatusexpired => closed
2016-08-12 09:55Kitware RobotResolutionopen => moved
2016-08-12 09:55Kitware RobotAssigned To => Kitware Robot

Notes
(0014158)
Benjamin Schindler   
2008-11-21 11:57   
Ok, forget about it. The code is obviously still racy

I have a very big big dislike for this kind of design (Returning a pointer to an internal buffer which is a copy of data). I really would suggest to use something different. It also hurts performance to an extreme amount. I'm running some sph interpolation and have to run FindClosestPoints quite a lot.
On benchmarking, I figured that 50% (!!!!!) of the time in FindClosestPoints is spent during GetPoints creating completely unnecessary copies of data.
(0037040)
Kitware Robot   
2016-08-12 09:55   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.