[petsc-dev] [petsc-maint #88993] Petsc with Cuda 4.0 and Multiple GPUs

Barry Smith bsmith at mcs.anl.gov
Sat Oct 1 21:04:26 CDT 2011


  Dave,

    We have no mechanism in the PETSc code for a PETSc single CPU process to use two GPUs at the same time. However you could have two MPI processes each using their own GPU.  
 
    The one tricky part is you need to make sure each MPI process uses a different GPU. We currently do not have a mechanism to do this assignment automatically. I think it can be done with 
cudaSetDevice(). But I don't know the details, sending this to petsc-dev at mcs.anl.gov where more people may know. 

  PETSc-folks,

       We need a way to have this setup automatically.


   Barry



On Oct 1, 2011, at 5:43 PM, Dave Nystrom wrote:

> I'm running petsc on a machine with Cuda 4.0 and 2 gpus.  This is a desktop
> machine with a single processor.  I know that Cuda 4.0 has support for
> running on multiple gpus but don't know if petsc uses that.  But suppose I
> have a problem that will fit in the memory for a single gpu.  Will petsc run
> the problem on a single gpu or does it split it between the 2 gpus and incur
> the communication overhead of copying data between the two gpus?
> 
> Thanks,
> 
> Dave
> 




More information about the petsc-dev mailing list