Title: Re: [petsc-users] petsc4py & GPU
Hi,

Thank you for reply:) Sorry for maybe stupid question in the scope of setting petsc(4py) options.
Should the following calls (somewhere before creating matrix & vectors):

PETSc.Options().setValue("ksp_view", "")
PETSc.Options().setValue("log_view", "")


be enough to enable extended output?

Best,
Damian


W liście datowanym 20 kwietnia 2017 (14:10:11) napisano:


On Thu, Apr 20, 2017 at 5:03 AM, Damian Kaliszan <[email protected]> wrote:
Hi,

Currently  I'm  doing a simple Ax=b with KSP method and MPI by loading
in parallel a data from file

viewer = petsc4py.PETSc.Viewer().createBinary(Afilename, 'r')
A = petsc4py.PETSc.Mat().load(viewer).

(same for b & x vectors) and then calling a solver

ksp.solve(b, x)

I would like to do the same using GPU.
I  changed respectively the above to
viewer = petsc4py.PETSc.Viewer().createBinary(Afilename, 'r')
A = PETSc.Mat().create(comm=comm)
A.setType(PETSc.Mat.Type.MPIAIJCUSPARSE)
A.load(viewer)
...
What else needs to be changed?
Running  the  above and checking nvidia-smi output confirms the python
script and computations are done on CPU, not GPU as I 'd like to...

1) Make sure the Vec types are also for the GPU

2) Send the output of

 -ksp_view -log_view

 Thanks,

   Matt

Any help would be appreciated.

Best,
Damian





--
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




-------------------------------------------------------
Damian Kaliszan

Poznan Supercomputing and Networking Center
HPC and Data Centres Technologies
ul. Jana Pawła II 10
61-139 Poznan
POLAND

phone (+48 61) 858 5109
e-mail
[email protected]
www - http://www.man.poznan.pl/
-------------------------------------------------------

Reply via email to