<div>Got it and thanks.</div>
<div>-Zhanping<br><br></div>
<div class="gmail_quote">2009/10/1 Takuya OSHIMA <span dir="ltr"><<a href="mailto:oshima@eng.niigata-u.ac.jp">oshima@eng.niigata-u.ac.jp</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Guys, thanks for all the responses, the tracker entry and applying the<br>patch.<br><br>I'm afraid I'm not sure if I can provide a good test dataset since the<br>
bug does not affect small cases (the point insertion should take<br>O(n^2) of time where n is the number of points, when the hasing is not<br>working) and relies on indeterminate values (there's always a<br>possibility that the problem doesn't reproduce), which is why I did<br>
all the tracking down by myself. But I'll see if I can do something.<br>
<div class="im"><br>Takuya<br><br>Takuya OSHIMA, Ph.D.<br>Faculty of Engineering, Niigata University<br>8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN<br><br></div>From: Zhanping Liu <<a href="mailto:zhanping.liu@kitware.com">zhanping.liu@kitware.com</a>><br>
<div class="im">Subject: Re: [Paraview] Ridiculously slow D3 (a bug in vtkMergeCells)<br></div>Date: Wed, 30 Sep 2009 12:39:15 -0400<br><br>> *<br>
<div>
<div></div>
<div class="h5">> Takuya:<br>> <br>> The problem was reflected on Mantis (issue #009626) and the suggested fix<br>> was applied. If you have any test (and shareable datasets), please feel free<br>> to submit it via Mantis.<br>
> <br>> Thanks for the report and the fix.<br>> <br>> -Zhanping<br>> --<br>> Zhanping Liu, PhD<br>> Kitware, Inc.<br>> 28 Corporate Drive<br>> Clifton Park, NY 12065-8662<br>> Phone: 518-371-3971 x 138<br>
> <a href="http://www.zhanpingliu.org/" target="_blank">http://www.zhanpingliu.org</a><br>> On Wed, Sep 30, 2009 at 3:51 AM, Takuya OSHIMA <<a href="mailto:oshima@eng.niigata-u.ac.jp">oshima@eng.niigata-u.ac.jp</a>><br>
> wrote:<br>><br>> Hi,<br>><br>> I have had a problem of ridiculously slow D3 of PV 3.6.1/3.7-cvs under<br>> some conditions. Most of the time the problem occurs when I have more<br>> pvserver processes than the number of data pieces, in which case D3<br>
> takes two orders of magnitude more time than usual, despite that the<br>> resulting repartitioned dataset looks fine.<br>><br>> Attaching a performance analyzer (Apple's Shark) to the pvserver<br>
> processes revealed that, in one of the pvserver processes<br>> vtkMergePoints::InsertUniquePoint() took up virtually all of the<br>> processor time, as attached sharkOutput.jpg.<br>><br>> It further turned out that this is because the instance of<br>
> vtkMergePoints is given indeterminate bounds by its caller<br>> vtkMergeCells::MapPointsToIdsUsingLocator() and hence hashing based on<br>> relative point coordinates in the bounds is not working. Here is a<br>
> proposed fix to the problem (the comment "points0->GetNumberOfPoints()<br>> is equal to..." was taken from about 50 lines below the patched lines<br>> in the same function. I believe it explains everything.).<br>
><br>> Index: vtkMergeCells.cxx<br>> ===================================================================<br>> RCS file: /cvsroot/ParaView3/ParaView3/VTK/Graphics/vtkMergeCells.cxx,v<br>> retrieving revision 1.9<br>
> diff -u -r1.9 vtkMergeCells.cxx<br>> --- vtkMergeCells.cxx 23 Jan 2009 03:25:07 -0000 1.9<br>> +++ vtkMergeCells.cxx 30 Sep 2009 06:47:09 -0000<br>> @@ -723,7 +723,12 @@<br>> if (npoints0 > 0)<br>
> {<br>> double tmpbounds[6];<br>> + // points0->GetNumberOfPoints() is equal to the upper bound<br>> + // on the points in the final merged grid. We need to temporarily<br>
> + // set it to the number of points added to the merged grid so far.<br>> + points0->GetData()->SetNumberOfTuples(npoints0);<br>> grid->GetBounds(tmpbounds);<br>> + points0->GetData()->SetNumberOfTuples(this->TotalNumberOfPoints);<br>
><br>> bounds[0] = ((tmpbounds[0] < bounds[0]) ? tmpbounds[0] : bounds[0]);<br>> bounds[2] = ((tmpbounds[2] < bounds[2]) ? tmpbounds[2] : bounds[2]);<br>><br>> Regards,<br>> Takuya<br>
><br>> Takuya OSHIMA, Ph.D.<br>> Faculty of Engineering, Niigata University<br>> 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN<br>><br>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>><br>> Visit other Kitware open-source projects at <a href="http://www.kitware.com/" target="_blank">http://www.kitware.com/</a><br>
> opensource/opensource.html<br>><br>> Please keep messages on-topic and check the ParaView Wiki at: http://<br>> <a href="http://paraview.org/Wiki/ParaView" target="_blank">paraview.org/Wiki/ParaView</a><br>
><br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</div></div></blockquote></div><br><br clear="all">
<div></div><br>-- <br>Zhanping Liu, PhD<br>Kitware, Inc.<br>28 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-371-3971 x 138<br><a href="http://www.zhanpingliu.org">http://www.zhanpingliu.org</a><br>