Re: [petsc-users] Using PETSc GPU backend

2024-04-13 Thread Ng, Cho-Kuen via petsc-users
Thanks Mark and Matt for the comments. From: Mark Adams Sent: Saturday, April 13, 2024 12:53 PM To: Matthew Knepley Cc: Ng, Cho-Kuen ; Barry Smith ; petsc-users ; Jacob Faibussowitsch Subject: Re: [petsc-users] Using PETSc GPU backend As Matt said, high

Re: [petsc-users] Using PETSc GPU backend

2024-04-13 Thread Mark Adams
, >> Cho >> -- >> *From:* Mark Adams >> *Sent:* Friday, April 12, 2024 4:52 PM >> *To:* Barry Smith >> *Cc:* Ng, Cho-Kuen ; petsc-users < >> petsc-users@mcs.anl.gov>; Jacob Faibussowitsch >> *Subject:* Re:

Re: [petsc-users] Using PETSc GPU backend

2024-04-13 Thread Matthew Knepley
rom:* Mark Adams > *Sent:* Friday, April 12, 2024 4:52 PM > *To:* Barry Smith > *Cc:* Ng, Cho-Kuen ; petsc-users < > petsc-users@mcs.anl.gov>; Jacob Faibussowitsch > *Subject:* Re: [petsc-users] Using PETSc GPU backend > > As Barry said, this is a bit small but the perfor

Re: [petsc-users] Using PETSc GPU backend

2024-04-12 Thread Ng, Cho-Kuen via petsc-users
en ; petsc-users ; Jacob Faibussowitsch Subject: Re: [petsc-users] Using PETSc GPU backend As Barry said, this is a bit small but the performance looks reasonable. The solver does very badly, mathematically. I would try hypre to get another data point. You could also try 'cg' to check that the

Re: [petsc-users] Using PETSc GPU backend

2024-04-12 Thread Mark Adams
n > *Sent:* Saturday, August 12, 2023 8:08 AM > *To:* Jacob Faibussowitsch > *Cc:* Barry Smith ; petsc-users > > *Subject:* Re: [petsc-users] Using PETSc GPU backend > > Thanks Jacob. > -- > *From:* Jacob Faibussowitsch > *Sent:* Saturday,

Re: [petsc-users] Using PETSc GPU backend

2024-04-12 Thread Barry Smith
ry Smith mailto:bsm...@petsc.dev>>; petsc-users > mailto:petsc-users@mcs.anl.gov>> > Subject: Re: [petsc-users] Using PETSc GPU backend > > Thanks Jacob. > From: Jacob Faibussowitsch mailto:jacob@gmail.com>> > Sent: Saturday, August 12, 2023 5:02 AM &g

Re: [petsc-users] Using PETSc GPU backend

2024-04-12 Thread Ng, Cho-Kuen via petsc-users
] Using PETSc GPU backend Thanks Jacob. From: Jacob Faibussowitsch Sent: Saturday, August 12, 2023 5:02 AM To: Ng, Cho-Kuen Cc: Barry Smith ; petsc-users Subject: Re: [petsc-users] Using PETSc GPU backend > Can petsc show the number of GPUs used? -device_view B

Re: [petsc-users] Using PETSc GPU backend

2023-08-12 Thread Ng, Cho-Kuen via petsc-users
Thanks Jacob. From: Jacob Faibussowitsch Sent: Saturday, August 12, 2023 5:02 AM To: Ng, Cho-Kuen Cc: Barry Smith ; petsc-users Subject: Re: [petsc-users] Using PETSc GPU backend > Can petsc show the number of GPUs used? -device_view Best regards, Ja

Re: [petsc-users] Using PETSc GPU backend

2023-08-12 Thread Jacob Faibussowitsch
gt; Thanks, > Cho > > From: Barry Smith > Sent: Wednesday, August 9, 2023 4:09 PM > To: Ng, Cho-Kuen > Cc: petsc-users@mcs.anl.gov > Subject: Re: [petsc-users] Using PETSc GPU backend > > We would need more information about "hanging". Do PETSc examples a

Re: [petsc-users] Using PETSc GPU backend

2023-08-11 Thread Ng, Cho-Kuen via petsc-users
show the number of GPUs used? Thanks, Cho From: Barry Smith Sent: Wednesday, August 9, 2023 4:09 PM To: Ng, Cho-Kuen Cc: petsc-users@mcs.anl.gov Subject: Re: [petsc-users] Using PETSc GPU backend We would need more information about "hanging"

Re: [petsc-users] Using PETSc GPU backend

2023-08-09 Thread Barry Smith
> > Best, > Cho > > From: Barry Smith mailto:bsm...@petsc.dev>> > Sent: Monday, July 17, 2023 6:58 AM > To: Ng, Cho-Kuen mailto:c...@slac.stanford.edu>> > Cc: petsc-users@mcs.anl.gov <mailto:petsc-users@mcs.anl.gov> > mailto:petsc-users@mcs.a

Re: [petsc-users] Using PETSc GPU backend

2023-08-09 Thread Ng, Cho-Kuen via petsc-users
: Barry Smith Sent: Monday, July 17, 2023 6:58 AM To: Ng, Cho-Kuen Cc: petsc-users@mcs.anl.gov Subject: Re: [petsc-users] Using PETSc GPU backend The examples that use DM, in particular DMDA all trivially support using the GPU with -dm_mat_type aijcusparse -dm_vec_type cuda On Jul 17, 2023

Re: [petsc-users] Using PETSc GPU backend

2023-07-17 Thread Barry Smith
etsc-users@mcs.anl.gov> > mailto:petsc-users@mcs.anl.gov>> > Subject: Re: [petsc-users] Using PETSc GPU backend > > > >Cho, > > We currently have a crappy API for turning on GPU support, and our > documentation is misleading in places. > &g

Re: [petsc-users] Using PETSc GPU backend

2023-07-16 Thread Ng, Cho-Kuen via petsc-users
Subject: Re: [petsc-users] Using PETSc GPU backend Cho, We currently have a crappy API for turning on GPU support, and our documentation is misleading in places. People constantly say "to use GPU's with PETSc you only need to use -mat_type aijcusparse (for example)" This is

Re: [petsc-users] Using PETSc GPU backend

2023-07-15 Thread Barry Smith
tthew Knepley mailto:knep...@gmail.com>> >> Sent: Friday, July 14, 2023 5:57 PM >> To: Ng, Cho-Kuen mailto:c...@slac.stanford.edu>> >> Cc: Barry Smith mailto:bsm...@petsc.dev>>; Mark Adams >> mailto:mfad...@lbl.gov>>; petsc-users@mcs.anl.gov >> <mai

Re: [petsc-users] Using PETSc GPU backend

2023-07-15 Thread Matthew Knepley
c:* Barry Smith ; Mark Adams ; > petsc-users@mcs.anl.gov > *Subject:* Re: [petsc-users] Using PETSc GPU backend > > On Fri, Jul 14, 2023 at 7:57 PM Ng, Cho-Kuen > wrote: > > I managed to pass the following options to PETSc using a GPU node on > Perlmutter. > > -mat

Re: [petsc-users] Using PETSc GPU backend

2023-07-14 Thread Ng, Cho-Kuen via petsc-users
nused options." However, there is no improvement on the GPU performance. Thanks, Cho From: Matthew Knepley Sent: Friday, July 14, 2023 5:57 PM To: Ng, Cho-Kuen Cc: Barry Smith ; Mark Adams ; petsc-users@mcs.anl.gov Subject: Re: [petsc-users] Using PETSc G

Re: [petsc-users] Using PETSc GPU backend

2023-07-14 Thread Matthew Knepley
r > of magnitude slower. How can I improve the GPU performance? > > Thanks, > Cho > -- > *From:* Ng, Cho-Kuen > *Sent:* Friday, June 30, 2023 7:57 AM > *To:* Barry Smith ; Mark Adams > *Cc:* Matthew Knepley ; petsc-users@mcs.anl.gov < > p

Re: [petsc-users] Using PETSc GPU backend

2023-07-14 Thread Ng, Cho-Kuen via petsc-users
slower. How can I improve the GPU performance? Thanks, Cho From: Ng, Cho-Kuen Sent: Friday, June 30, 2023 7:57 AM To: Barry Smith ; Mark Adams Cc: Matthew Knepley ; petsc-users@mcs.anl.gov Subject: Re: [petsc-users] Using PETSc GPU backend Barry, Mark and Matt

Re: [petsc-users] Using PETSc GPU backend

2023-06-30 Thread Ng, Cho-Kuen via petsc-users
Paul, Thank you for your suggestion. I will try different spack install specifications. Cho From: Grosse-Bley, Paul Leonard Sent: Friday, June 30, 2023 4:07 AM To: Ng, Cho-Kuen Cc: petsc-users@mcs.anl.gov Subject: Re: [petsc-users] Using PETSc GPU backend Hi

Re: [petsc-users] Using PETSc GPU backend

2023-06-30 Thread Ng, Cho-Kuen via petsc-users
: [petsc-users] Using PETSc GPU backend Note that options like -mat_type aijcusparse -vec_type cuda only work if the program is set up to allow runtime swapping of matrix and vector types. If you have a call to MatCreateMPIAIJ() or other specific types then then these options do nothing

Re: [petsc-users] Using PETSc GPU backend

2023-06-30 Thread Barry Smith
ialize() >> unless you shut it off. >> >> Thanks, >> >> Matt >> >>> Cho >>> From: Ng, Cho-Kuen mailto:c...@slac.stanford.edu>> >>> Sent: Thursday, June 29, 2023 8:32 PM >>> To: Mark Adams mailto:mfad...@lbl.gov

Re: [petsc-users] Using PETSc GPU backend

2023-06-30 Thread Mark Adams
line argument automatically in PetscInitialize() > unless you shut it off. > > Thanks, > > Matt > > >> Cho >> -- >> *From:* Ng, Cho-Kuen >> *Sent:* Thursday, June 29, 2023 8:32 PM >> *To:* Mark Adams >&g

Re: [petsc-users] Using PETSc GPU backend

2023-06-30 Thread Matthew Knepley
users@mcs.anl.gov > *Subject:* Re: [petsc-users] Using PETSc GPU backend > > Mark, > > Thanks for the information. How do I put the runtime options for the > executable, say, a.out, which does not have the provision to append > arguments? Do I need to change the C++ main to read i

Re: [petsc-users] Using PETSc GPU backend

2023-06-29 Thread Ng, Cho-Kuen via petsc-users
Cc: petsc-users@mcs.anl.gov Subject: Re: [petsc-users] Using PETSc GPU backend Mark, Thanks for the information. How do I put the runtime options for the executable, say, a.out, which does not have the provision to append arguments? Do I need to change the C++ main to read in the options

Re: [petsc-users] Using PETSc GPU backend

2023-06-29 Thread Ng, Cho-Kuen via petsc-users
, 2023 5:55 PM To: Ng, Cho-Kuen Cc: petsc-users@mcs.anl.gov Subject: Re: [petsc-users] Using PETSc GPU backend Run with options: -mat_type aijcusparse -vec_type cuda -log_view -options_left The last column of the performance data (from -log_view) will be the percent flops on the GPU. Check

Re: [petsc-users] Using PETSc GPU backend

2023-06-29 Thread Mark Adams
Run with options: -mat_type aijcusparse -vec_type cuda -log_view -options_left The last column of the performance data (from -log_view) will be the percent flops on the GPU. Check that that is > 0. The end of the output will list the options that were used and options that were _not_ used (if

[petsc-users] Using PETSc GPU backend

2023-06-29 Thread Ng, Cho-Kuen via petsc-users
I installed PETSc on Perlmutter using "spack install petsc+cuda+zoltan" and used it by "spack load petsc/fwge6pf". Then I compiled the application code (purely CPU code) linking to the petsc package, hoping that I can get performance improvement using the petsc GPU backend. However, the timing