[petsc-users] Question on usage of PetscMalloc(Re)SetCUDAHost

Junchao Zhang junchao.zhang at gmail.com
Tue Aug 25 21:56:48 CDT 2020


On Tue, Aug 25, 2020 at 9:01 PM Sajid Ali <sajidsyed2021 at u.northwestern.edu>
wrote:

> Hi Barry,
>
> Thanks for the explanation! Removing the calls to
> PetscMalloc(Re)SetCUDAHost solved that issue.
>
> Just to clarify, all PetscMalloc(s) happen on the host and there is no
> special PetscMalloc for device memory allocation ? (Say for an operation
> sequence PetscMalloc1(N, &ptr), VecCUDAGetArray(cudavec, &ptr) )
>
> PetscMallocSetCUDAHost() is to instruct petsc to
use cudaHostAlloc() thereafter to allocate non-pagable host memory.
Yes, there is no variant of PetscMalloc doing cudaMalloc.


> Thank You,
> Sajid Ali | PhD Candidate
> Applied Physics
> Northwestern University
> s-sajid-ali.github.io
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200825/b941890a/attachment-0001.html>


More information about the petsc-users mailing list