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