Re: [petsc-users] Cuda: Vec and Mat types

2021-10-27 Thread Junchao Zhang
On Wed, Oct 27, 2021 at 3:37 PM Karthikeyan Chockalingam - STFC UKRI < karthikeyan.chockalin...@stfc.ac.uk> wrote: > 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 > under s

Re: [petsc-users] Cuda: Vec and Mat types

2021-10-27 Thread Matthew Knepley
On Wed, Oct 27, 2021 at 4:37 PM Karthikeyan Chockalingam - STFC UKRI < karthikeyan.chockalin...@stfc.ac.uk> wrote: > 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 > > > > b

Re: [petsc-users] Cuda: Vec and Mat types

2021-10-27 Thread Karthikeyan Chockalingam - STFC UKRI
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 gri

Re: [petsc-users] Cuda: Vec and Mat types

2021-10-27 Thread Junchao Zhang
On Wed, Oct 27, 2021 at 2:24 PM Karthikeyan Chockalingam - STFC UKRI < karthikeyan.chockalin...@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 que

Re: [petsc-users] Question about setting block size for arbitrary Mat formats

2021-10-27 Thread Matthew Knepley
On Wed, Oct 27, 2021 at 12:25 PM Samuel Estes wrote: > Hi, > > I am solving a linear system in which the matrix has some block structure. > We will ultimately use the BAIJ format but for now we are just using the > default CSR and would like to play with different formats to compare > performance

[petsc-users] Cuda: Vec and Mat types

2021-10-27 Thread Karthikeyan Chockalingam - STFC UKRI
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 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

[petsc-users] Question about setting block size for arbitrary Mat formats

2021-10-27 Thread Samuel Estes
Hi, I am solving a linear system in which the matrix has some block structure. We will ultimately use the BAIJ format but for now we are just using the default CSR and would like to play with different formats to compare performance for our problem. Currently, I call MatSetBlockSize so that I can

Re: [petsc-users] Strange behavior of TS after setting hand-coded Jacobian

2021-10-27 Thread Zhang, Hong via petsc-users
Since your Jacobian matrix is small, it is possible to compare your hand-written Jacobian with the finite-difference approximation directly. Add -snes_test_jacobian_view to print out the matrices. Then you can see exactly where the difference is. Hong > On Oct 27, 2021, at 12:47 AM, 仓宇 wrote:

Re: [petsc-users] Question regarding DMPlex reordering

2021-10-27 Thread Matthew Knepley
On Wed, Oct 27, 2021 at 9:54 AM Pierre Seize wrote: > Hi, thanks for the fix. It seems to work fine. > > Out of curiosity, I noticed the MatOrderingType of DMPlexGetOrdering is > not used. Is this intentional ? To match MatGetOrdering ? > True. It only does RCM. I noticed that when fixing it. I h

Re: [petsc-users] Question regarding DMPlex reordering

2021-10-27 Thread Pierre Seize
Hi, thanks for the fix. It seems to work fine. Out of curiosity, I noticed the MatOrderingType of DMPlexGetOrdering is not used. Is this intentional ? To match MatGetOrdering ? Pierre On 27/10/21 15:03, Matthew Knepley wrote: On Wed, Oct 27, 2021 at 3:15 AM Pierre Seize

Re: [petsc-users] Strange behavior of TS after setting hand-coded Jacobian

2021-10-27 Thread Barry Smith
You can run with -ksp_error_if_not_converged to get it to stop as soon as a linear solve fails to help track down the exact breaking point. > The problem under consideration contains an eigen-value to be solved, > making the first diagonal element of the jacobian matrix being zero. > From th

Re: [petsc-users] Question regarding DMPlex reordering

2021-10-27 Thread Matthew Knepley
On Wed, Oct 27, 2021 at 3:15 AM Pierre Seize wrote: > > > On 26/10/21 22:28, Matthew Knepley wrote: > > On Tue, Oct 26, 2021 at 10:17 AM Pierre Seize > wrote: > >> Hi, I had the idea to try and renumber my mesh cells, as I've heard it's >> better: "neighbouring cells are stored next to one anoth

Re: [petsc-users] How to construct DMPlex of cells with different topological dimension?

2021-10-27 Thread Matthew Knepley
On Wed, Oct 27, 2021 at 4:50 AM 袁煕 wrote: > Hi, > > I am trying to parallelize my serial FEM program using PETSc. This program > calculates structure deformation by using various types of elements such as > solid, shell, beam, and truss. At the very beginning, I found it was hard > for me to put

[petsc-users] How to construct DMPlex of cells with different topological dimension?

2021-10-27 Thread 袁煕
Hi, I am trying to parallelize my serial FEM program using PETSc. This program calculates structure deformation by using various types of elements such as solid, shell, beam, and truss. At the very beginning, I found it was hard for me to put such kinds of elements into DMPlex. Because solid eleme

Re: [petsc-users] Question regarding DMPlex reordering

2021-10-27 Thread Pierre Seize
On 26/10/21 22:28, Matthew Knepley wrote: On Tue, Oct 26, 2021 at 10:17 AM Pierre Seize > wrote: Hi, I had the idea to try and renumber my mesh cells, as I've heard it's better: "neighbouring cells are stored next to one another, and memory access are