[petsc-users] Questions on Petsc4py with PyCUDA
Guangpu Zhu
zhugp01 at nus.edu.sg
Sat Oct 23 03:46:03 CDT 2021
Dear Sir/Madam,
I am using the Petsc4py with PyCUDA. According to the following link
https://www.mcs.anl.gov/petsc/petsc4py-current/docs/apiref/petsc4py.PETSc.Vec.Type-class.html
I set the vector type as 'cuda', the simple code is as follows:
import sys
import petsc4py
from petsc4py import PETSc
petsc4py.init(sys.argv)
from pycuda import autoinit
import pycuda.driver as drv
import pycuda.compiler as compiler
import pycuda.gpuarray as gpuarray
a = PETSc.Vec().create()
a.setType('cuda')
a.setSizes(8)
But when I run this code, it always shows that "Unknown vector type: cuda".
I have tried:
(a) petsc4py 3.15.0 with PyCUDA 2020.1
(b) petsc4py 3.15.1 with PyCUDA 2021.1
(c) petsc4py 3.16.0 with PyCUDA 2021.1
but it always shows the same message: Unknown vector type: cuda
The CUDA version on my computer is CUDA 11.3.
So I am writing this e-mail to ask for your help and advice. Thank you in advance.
Best,
Guangpu Zhu
---
Guangpu Zhu
Research Associate, Department of Mechanical Engineering
National University of Singapore
Personal E-mail: zhugpupc at gmail.com
Phone: (+65) 87581879
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20211023/32f748df/attachment-0001.html>
More information about the petsc-users
mailing list