2011/10/28 Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Fri, Oct 28, 2011 at 10:24 AM, Fredrik Heffer Valdmanis <span dir="ltr"><<a href="mailto:fredva@ifi.uio.no" target="_blank">fredva@ifi.uio.no</a>></span> wrote:<br></div><div class="gmail_quote">
<div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<div><br></div><div>I am working on integrating the new GPU based vectors and matrices into FEniCS. Now, I'm looking at the possibility for getting some speedup during finite element assembly, specifically when inserting the local element matrix into the global element matrix. In that regard, I have a few questions I hope you can help me out with:</div>
<div><br></div><div>- When calling MatSetValues with a MATSEQAIJCUSP matrix as parameter, what exactly is it that happens? As far as I can see, MatSetValues is not implemented for GPU based matrices, neither is the mat->ops->setvalues set to point at any function for this Mat type. </div>
</blockquote><div><br></div></div><div>Yes, MatSetValues always operates on the CPU side. It would not make sense to do individual operations on the GPU.</div><div><br></div><div>I have written batched of assembly for element matrices that are all the same size:</div>
<div><br></div><div> <a href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatSetValuesBatch.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatSetValuesBatch.html</a></div>
</div></blockquote><div><br></div><div>Thanks. I assume that the best way to use the batch function is to batch up all element matrices and insert all with one function call? Or is it recommended to split it up into several smaller batches?</div>
<div><br></div><div>-- </div><div>Fredrik</div></div>