2011/10/30 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><div></div><div class="h5">On Sun, Oct 30, 2011 at 12:22 PM, 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><div class="gmail_quote">
<div><div></div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2011/10/28 Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span><br><div class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>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>
<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><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></blockquote><div><br></div></div></div><div>Right now, several batches does not work.For insertion to be efficient, you should keep the matrices in COO</div><div>format, or convert them back. We do not do either right now. The idea is to see if it ever matters for applications.</div>
<div><br></div><div><br></div></div></blockquote><div>OK, thanks.</div><div><br></div><div>Any estimate on when additive mode will be added to MatSetValuesBatch? As it is now, this batch function is of limited use to us, as it forces us to maintain an extra internal data structure to handle accumulation of numbers that are inserted at the same indices in the matrix. </div>
<div><br></div><div>Any particular reason you chose not to support additive mode in this first implementation? Are there any considerations I should be aware of?</div><div><br></div><div>Thanks,</div><div><br></div><div>
Fredrik </div>
</div><br>