PETSc on GPUs

Barry Smith bsmith at mcs.anl.gov
Wed Sep 17 21:33:27 CDT 2008


   Ahmed,

    This is very cool.
On Sep 17, 2008, at 8:05 PM, Ahmed El Zein wrote:

> Harald,
> I am working on implementing SpMV on a NVIDIA GPU with CUDA for SML
> applications (just about finished actually).
>
> As the SML application I am planing to base my work on uses PETSc, I
> have written some functions that will convert AIJ matrices and Vectors
> to SP and copy them to the GPU, multiply them and copy them back to  
> the
> host. I would be happy to share them with you if you want.

    I think to really make the GPU truly a large step forward in  
performance, the Vec's need to
be kept on the GPU and only transported back to the main CPU when
absolutely needed. For example, consider a KSP solver like CG, it would
run on the main CPU but each Vec is actually just a handle for the  
true vector
entries that are in the GPU memory, a call to VecAXPY(), for example,  
would
pass the scalar and the two Vec handles down to the GPU where the actual
axpy is performed. With this paradigm the only values passed back to the
main CPU are scalars. This is why I think this work has to be done only
on the latests GPU systems with lots of memory.

    Barry

>
>
> While this would be outside the scope of my MPhil I would be very
> interested in helping to add GPU support for PETSC. I have not yet had
> any experience with CTM for programming ATI GPUs but I believe there
> would not be a huge difference.
>
> I have access to a GeForce 8800GTX GPU (single precession only) at the
> ANU. I have been talking with my supervisor about getting a GTX280 or
> GTX 260 (supports double precision) but I don't know if we will be
> getting one.
>
> Anyway I would like to help. So if anyone would like to start thinking
> how this would be best implemented, I am available. :)
>
> Ahmed
>
> On Wed, 2008-09-17 at 08:24 -0700, Harald Pfeiffer wrote:
>> Hi,
>>
>> do you know whether there are any efforts to run PETSc on GPUs
>> (graphical processing units)?
>>
>> Thanks,
>> Harald
>>
>>
>>
>




More information about the petsc-dev mailing list