[petsc-dev] PetscMallocAlign for Cuda

Jacob Faibussowitsch jacob.fai at gmail.com
Wed Sep 2 10:48:30 CDT 2020


I believe there are a few PetscMallocCuda impls in src/sys/memory/cuda/mcudahost.cu that seem to do what you are describing. If you are creating mats you can also consider cudaMallocPitch, but I’m not sure how that plays with the sparse storage impls that petsc mat uses. Seems more useful for dense.

Best regards,

Jacob Faibussowitsch
(Jacob Fai - booss - oh - vitch)
Cell: (312) 694-3391

> On Sep 2, 2020, at 09:58, Mark Adams <mfadams at lbl.gov> wrote:
> 
> PETSc mallocs seem to boil down to PetscMallocAlign. There are switches in here but I don't see a Cuda malloc. THis would seem to be convenient if I want to create an Object entirely on Cuda or any device. 
> 
> Are there any thoughts along these lines or should I just duplicate Mat creation, for instance, by hand?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20200902/466f4b2b/attachment.html>


More information about the petsc-dev mailing list