[petsc-users] PETSc Data structures on GPU

Matthew Knepley knepley at gmail.com
Thu Dec 6 14:15:11 CST 2018


On Thu, Dec 6, 2018 at 2:43 PM Weston, Brian Thomas via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> For parallel computations on the CPU, we allocate our own vectors and then
> give PETSc a point to our vectors using VecCreateMPIWithArray. For
> computations only on the GPU, we allocate vectors on the GPU and we’d like
> to do the same thing and give PETSc a pointer to our vector.
>
>
>
> 1. Does VecCreateMPICUDAWithArray have the same functionality and will it
> only operate on the GPU?
>

Karl will know.


> 2. Are there ways to ensure that our PETSc matrices and vectors only live
> on the GPU (as to avoid data transfer from CPU to GPU)?
>

The coherence strategy does not activate unless you ask for the CPU
version. It should do what you want if you only execute GPU operations.


> 3. Lastly, if in the future we move to AMG clusters, will these PETSc CUDA
> commands still work?
>

AMD? The viennacl implementation will work on AMD. Everything looks the
same, and you could try that out on your Nvidia hardware as well.

  Thanks,

    Matt


> Thanks,
>
> Brian
>
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181206/1fbb5bdd/attachment.html>


More information about the petsc-users mailing list