<div class="gmail_quote">On Thu, Feb 24, 2011 at 23:49, M. Scot Breitenfeld <span dir="ltr"><<a href="mailto:brtnfld@uiuc.edu">brtnfld@uiuc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":55">I would not say it's zero to compute the entries (I guess it takes about<br>
3.5ms per particle for the calculations). This is a fairly small case,<br>
only 8000 particles.</div></blockquote></div><br><div>With 300 to 900 interactions per particle, times 3 for each component, times two for lower and upper triangular piece. So we're looking at half a microsecond per insertion. That still seems like a lot, but perhaps the access pattern is very irregular because the particles have an essentially random ordering. Did you build --with-debugging=0? That should make a reasonable difference.</div>
<div><br></div><div>Also, since the matrix is symmetric, you might consider using the SBAIJ matrix format. That will cut your storage costs almost in half and should speed up insertion because all interactions for a given particle will be in the same block-row, thus nearby in memory.</div>