<div dir="ltr"><div dir="ltr">On Sun, Oct 17, 2021 at 7:12 PM Swarnava Ghosh <<a href="mailto:swarnava89@gmail.com">swarnava89@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Do I need convert the MATSEQBAIJ to a cuda matrix in code?<div></div></div></blockquote><div><br></div><div>You would need a call to MatSetFromOptions() to take that type from the command line, and not have</div><div>the type hard-coded in your application. It is generally a bad idea to hard code the implementation type.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>If I do it from command line, then are the other MatVec calls are ported onto CUDA? I have many MatVec calls in my code, but I specifically want to port just one call.</div></div></blockquote><div><br></div><div>You can give that one matrix an options prefix to isolate it.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Sincerely,</div><div>Swarnava</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 17, 2021 at 7:07 PM Junchao Zhang <<a href="mailto:junchao.zhang@gmail.com" target="_blank">junchao.zhang@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>You can do that with command line options -mat_type aijcusparse -vec_type cuda<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 17, 2021, 5:32 PM Swarnava Ghosh <<a href="mailto:swarnava89@gmail.com" target="_blank">swarnava89@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear Petsc team,<div><br></div><div>I had a query regarding using CUDA to accelerate a matrix vector product. </div><div>I have a sequential sparse matrix (MATSEQBAIJ type). I want to port a MatVec call onto GPUs. Is there any code/example I can look at?</div><div><br></div><div>Sincerely,</div><div>SG</div></div>
</blockquote></div></div></div>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>