View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009626ParaViewBugpublic2009-09-30 12:102009-10-02 14:59
ReporterZhanping Liu 
Assigned ToZhanping Liu 
PrioritynormalSeverityminorReproducibilitysometimes
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.6 
Target Version3.6.2Fixed in Version3.6.2 
Summary0009626: Wrong bounding info obtained in vtkMergeCells::MapPointsToIdsUsingLocator()
DescriptionI have had a problem of ridiculously slow D3 of PV 3.6.1/3.7-cvs under
some conditions. Most of the time the problem occurs when I have more
pvserver processes than the number of data pieces, in which case D3
takes two orders of magnitude more time than usual, despite that the
resulting repartitioned dataset looks fine.

Attaching a performance analyzer (Apple's Shark) to the pvserver
processes revealed that, in one of the pvserver processes
vtkMergePoints::InsertUniquePoint() took up virtually all of the
processor time, as attached sharkOutput.jpg.

It further turned out that this is because the instance of
vtkMergePoints is given indeterminate bounds by its caller
vtkMergeCells::MapPointsToIdsUsingLocator() and hence hashing based on
relative point coordinates in the bounds is not working. Here is a
proposed fix to the problem (the comment "points0->GetNumberOfPoints()
is equal to..." was taken from about 50 lines below the patched lines
in the same function. I believe it explains everything.).

Index: vtkMergeCells.cxx
===================================================================
RCS file: /cvsroot/ParaView3/ParaView3/VTK/Graphics/vtkMergeCells.cxx,v
retrieving revision 1.9
diff -u -r1.9 vtkMergeCells.cxx
--- vtkMergeCells.cxx 23 Jan 2009 03:25:07 -0000 1.9
+++ vtkMergeCells.cxx 30 Sep 2009 06:47:09 -0000
@@ -723,7 +723,12 @@
    if (npoints0 > 0)
      {
      double tmpbounds[6];
+ // points0->GetNumberOfPoints() is equal to the upper bound
+ // on the points in the final merged grid. We need to temporarily
+ // set it to the number of points added to the merged grid so far.
+ points0->GetData()->SetNumberOfTuples(npoints0);
      grid->GetBounds(tmpbounds);
+ points0->GetData()->SetNumberOfTuples(this->TotalNumberOfPoints);

      bounds[0] = ((tmpbounds[0] < bounds[0]) ? tmpbounds[0] : bounds[0]);
      bounds[2] = ((tmpbounds[2] < bounds[2]) ? tmpbounds[2] : bounds[2]);
Additional InformationThis bug was reported by Takuya Oshima. Thanks.
TagsNo tags attached.
Project
Topic Name
Type
Attached Files

 Relationships

  Notes
(0017847)
Zhanping Liu (developer)
2009-09-30 12:34

The bug was due to updating the number of points (of 'points0' of type vtkPoints) with an upper bound (limit, i.e., the number of all points to be merged for presence in the final grid) prior to the call to MapPointsToIdsUsingLocator() while the number of points (of 'points0') merged so far is accessed in MapPointsToIdsUsingLocator(), after the aforementioned update, to obtain the bounding info of 'points0'.

This bug was fixed with the suggested fix.

new revision: 1.10; previous revision: 1.9
(0017866)
Utkarsh Ayachit (administrator)
2009-10-01 10:52

/cvsroot/ParaView3/ParaView3/VTK/Graphics/vtkMergeCells.cxx,v <-- VTK/Graphics/vtkMergeCells.cxx
new revision: 1.9.6.1; previous revision: 1.9
(0017912)
Alan Scott (manager)
2009-10-02 14:59

I am not sure how to test for performance, so will assume zhanping understands this fix. I tested client/numerous servers, Linux, 3.6.2, and D3 looks good.

Closed.

 Issue History
Date Modified Username Field Change
2009-09-30 12:10 Zhanping Liu New Issue
2009-09-30 12:11 Zhanping Liu Assigned To => Zhanping Liu
2009-09-30 12:11 Zhanping Liu Status backlog => tabled
2009-09-30 12:34 Zhanping Liu Note Added: 0017847
2009-09-30 12:34 Zhanping Liu Status tabled => @80@
2009-10-01 10:51 Utkarsh Ayachit Fixed in Version => 3.6.2
2009-10-01 10:51 Utkarsh Ayachit Target Version => 3.6.2
2009-10-01 10:52 Utkarsh Ayachit Note Added: 0017866
2009-10-02 14:59 Alan Scott Note Added: 0017912
2009-10-02 14:59 Alan Scott Status @80@ => closed
2009-10-02 14:59 Alan Scott Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team