[petsc-users] Cuda: Vec and Mat types

Karthikeyan Chockalingam - STFC UKRI karthikeyan.chockalingam at stfc.ac.uk
Wed Oct 27 15:37:24 CDT 2021


Thank you for your response.

It tried running ksp/ex2.c using


./ex2 -m 9 -n 9 –vec_type cuda -mat_type aijcusparse -ksp_type cg -pc_type jacobi -log_view


but the log file didn’t record any gpu flops.

Sorry, my next question doesn’t belong to this thread.
Does DMDA only work on structured grid/mesh and not on unstructured grid/mesh?

Best,
Karthik.

From: Junchao Zhang <junchao.zhang at gmail.com>
Date: Wednesday, 27 October 2021 at 21:13
To: "Chockalingam, Karthikeyan (STFC,DL,HC)" <karthikeyan.chockalingam at stfc.ac.uk>
Cc: "petsc-users at mcs.anl.gov" <petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] Cuda: Vec and Mat types



On Wed, Oct 27, 2021 at 2:24 PM Karthikeyan Chockalingam - STFC UKRI <karthikeyan.chockalingam at stfc.ac.uk<mailto:karthikeyan.chockalingam at stfc.ac.uk>> wrote:
Hello,

I hope, I am framing the question currently.
Are only distributed arrays (DMDA) of -vec_type and -mat_type only supported by CUDA?
I don't understand this question.  Currently, CUDA-capable types include VECCUDA, MATAIJCUDA and MATDENSECUDA, either sequential or MPI.

I am reading the petsc user manual in section 2.4 distributed arrays are introduced but at the start of chapter two there are other vector and matrix types as well. I wonder if these types (I don’t how they are referred by) are also CUDA supported?

Can you please point me to some tutorial examples in KSP and SNES that can run on gpus?
search "-mat_type aijcusparse" or "-dm_mat_type aijcusparse" in petsc tests/tutorials, you will find many.


At the moment I am testing KSP/ex45.c with different preconditioners on cpus and gpus.

I tried to run KSP/ex2.c with -vec_type cuda and -mat_type aijcuda noticed there was no gpu flops recorded in my log file.
It is -mat_type aijcusparse


Many thanks,
Karthik.

This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20211027/81fba66a/attachment.html>


More information about the petsc-users mailing list