On Tue, Sep 6, 2011 at 11:25 AM, Randall Mackie <span dir="ltr"><<a href="mailto:rlmackie862@gmail.com">rlmackie862@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><br><div><div class="im"><div>On Sep 6, 2011, at 9:16 AM, Matthew Knepley wrote:</div><br><blockquote type="cite">On Tue, Sep 6, 2011 at 11:12 AM, Randall Mackie <span dir="ltr"><<a href="mailto:rlmackie862@gmail.com" target="_blank">rlmackie862@gmail.com</a>></span> wrote:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On Sep 6, 2011, at 9:08 AM, Barry Smith wrote:<br>
<br>
><br>
><br>
> On Sep 6, 2011, at 10:59 AM, Daniel Lowell wrote:<br>
><br>
>> On this page: <a href="http://www.mcs.anl.gov/petsc/petsc-as/features/gpus.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-as/features/gpus.html</a><br>
>><br>
>> It states: "All of the Krylov methods except KSPIBCGS run on the GPU."<br>
>> I actually could only find ksp/pc/bicgstabcusp for any ksp implementation on the GPU.<br>
><br>
>  Daniel,<br>
><br>
>     All the vector operations and the matrix-vector product used by the Krylov methods implemented in PETSc (except KSPIBCGS) run on the GPU without copying up or down vector or matrix values, in the same way as ksp/pc/bicgstabcusp does, hence we say they run on the GPU. In fact, in our tests our BiGCStab runs just as fast as the Nvidia CUSP code ksp/pc/bicgstabcusp.<br>


><br>
>    In other words, higher level algorithms such as Krylov methods and Newton methods do not need to be "written for the GPU", so long as the kernel operations run on the GPU.<br>
><br>
><br>
><br>
>   Barry<br>
<br>
Barry,<br>
<br>
But is this still only for real data types? Last time I checked, earlier this year, complex valued data were not<br>
supported under PETSc, even though complex data types are supported in CUSP.<br></blockquote><div><br></div><div>I have not tried, but I do not understand why it would not work. We just use PetscScalar. Can you send</div>

<div>the problem you found?</div><div><br></div><div>   Matt</div></div></blockquote><div><br></div><div><br></div></div>Matt,</div><div><br></div><div>Here is the message that I received earlier this year, but I never did have time to follow up on it then:</div>
</div></blockquote><div><br></div><div>Ah, so I would characterize this as "CUSP does not work with std::complex", which is a big problem.</div><div><br></div><div>    Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div><br></div><div><blockquote type="cite"><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:Helvetica;font-size:medium;color:rgb(0, 0, 0)"><b>From: </b></span><span style="font-family:Helvetica;font-size:medium">Barry Smith <<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>><br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:Helvetica;font-size:medium;color:rgb(0, 0, 0)"><b>Date: </b></span><span style="font-family:Helvetica;font-size:medium">May 24, 2011 5:04:51 AM PDT<br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:Helvetica;font-size:medium;color:rgb(0, 0, 0)"><b>To: </b></span><span style="font-family:Helvetica;font-size:medium"><a href="mailto:petsc-maint@mcs.anl.gov" target="_blank">petsc-maint@mcs.anl.gov</a>, Victor Minden <<a href="mailto:victorminden@gmail.com" target="_blank">victorminden@gmail.com</a>><br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:Helvetica;font-size:medium;color:rgb(0, 0, 0)"><b>Cc: </b></span><span style="font-family:Helvetica;font-size:medium">Randall Mackie <<a href="mailto:rlmackie862@gmail.com" target="_blank">rlmackie862@gmail.com</a>><br>
</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span style="font-family:Helvetica;font-size:medium;color:rgb(0, 0, 0)"><b>Subject: </b></span><span style="font-family:Helvetica;font-size:medium"><b>Re: [petsc-maint #71751] error during compile</b><br>
</span></div><br><div><br> Victor,<br><br>    Thanks for the info. I've forgotten about the blas.  <br><br> Randall,<br><br>     Looks like it is not so trivial as I had made it out to be. Perhaps if you ask on <a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">petsc-dev@mcs.anl.gov</a> there may be people who want this also and are willing to share the work?<br>
<br>  Barry<br><br>On May 23, 2011, at 6:06 PM, Victor Minden wrote:<br><br><blockquote type="cite">Barry,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Currently there should be two things going on--one is that some of the<br>
</blockquote><blockquote type="cite">CUBLAS routines used for basic vector operations (which we've been moving<br></blockquote><blockquote type="cite">away from) have 4 different forms depending on single/double and<br>
</blockquote><blockquote type="cite">real/complex--currently those that we still use are hard-coded as real and<br></blockquote><blockquote type="cite">#ifdeffed to be single/double, and I haven't looked in depth but I think<br>
</blockquote><blockquote type="cite">those are the errors that Randy sent.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Those should be pretty quick to change, but they won't make complex work,<br>
</blockquote><blockquote type="cite">because once you get past <a href="http://veccusp.cu" target="_blank">veccusp.cu</a> there are a bunch more errors in the<br></blockquote><blockquote type="cite">cusp matrix routines which work with complex if you use the relatively new<br>
</blockquote><blockquote type="cite">(Oct?  Dec?) cusp complex type that they've added to the cusp library.  So,<br></blockquote><blockquote type="cite">we need to make the GPU routines work with the standard complex type or we<br>
</blockquote><blockquote type="cite">need to convert all the GPU code to use the cusp type.  I don't know how<br></blockquote><blockquote type="cite">much work this is.<br></blockquote><blockquote type="cite"><br></blockquote>
<blockquote type="cite">As it stands, I'm just starting my internship this week so I probably won't<br></blockquote><blockquote type="cite">be able to look at this in-depth until the weekend, just FYI.<br></blockquote>
<blockquote type="cite"><br></blockquote><blockquote type="cite">Cheers,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Victor<br></blockquote><blockquote type="cite">---<br></blockquote>
<blockquote type="cite">Victor L. Minden<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Tufts University<br></blockquote><blockquote type="cite">School of Engineering<br></blockquote><blockquote type="cite">
Class of 2012<br></blockquote><blockquote type="cite"><br></blockquote></div></div></blockquote></div><div class="im"><div><br></div><div><br></div><div><br><blockquote type="cite"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Randy<br>
<br>
<br>
><br>
>><br>
>> CUSP does have everything mentioned in the above PETSc link:<br>
>> <a href="http://code.google.com/p/cusp-library/wiki/QuickStartGuide#Iterative_Solvers" target="_blank">http://code.google.com/p/cusp-library/wiki/QuickStartGuide#Iterative_Solvers</a><br>
>><br>
>> However I don't see where any of it is implemented in the latest Dev release, Krylov solvers or preconditioners.<br>
>><br>
>> Can anyone clear this up for me?<br>
>><br>
>> Thanks,<br>
>><br>
>> Daniel Lowell<br>
><br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>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<br>
</blockquote></div><br></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>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<br>