Re: [petsc-users] DMPlex: a Mapping Array between Natural and Distributed Cell Index

2022-07-14 Thread Bora Jeong
Okay, I checked it and you are correct. In my case, simply, natural node index can be identified by stacking all the preceding processor's numbers of nodes for a particular processor, which is good due to simplicity. However, one serious question is why this is happening in my code? In other words,

Re: [petsc-users] DMPlex: a Mapping Array between Natural and Distributed Cell Index

2022-07-14 Thread Matthew Knepley
On Thu, Jul 14, 2022 at 5:47 PM Bora Jeong wrote: > Thank you for the comments. I have these errors when I call PetscSFView() > after DMGetNaturalSF() > > [2]PETSC ERROR: - Error Message > -- > [2]PETSC ERROR: Null ar

Re: [petsc-users] [DMCreate from a Gmsh with mixed mesh crash for DMPlex]

2022-07-14 Thread Mike Michell
VTK format itself supports pyramids for sure. But I do not think PETSc output part through VTK format does not. Is there any possibility to debug this issue? Thanks, > On Wed, Jul 13, 2022 at 4:18 PM Mike Michell > wrote: > >> Before your pull request merged to main, I copied your change to my

Re: [petsc-users] DMPlex: a Mapping Array between Natural and Distributed Cell Index

2022-07-14 Thread Bora Jeong
Thank you for the comments. I have these errors when I call PetscSFView() after DMGetNaturalSF() [2]PETSC ERROR: - Error Message -- [2]PETSC ERROR: Null argument, when expecting valid pointer [2]PETSC ERROR: Null Point

Re: [petsc-users] Error running src/snes/tutorials/ex19 on Nvidia Tesla K40m : CUDA ERROR (code = 101, invalid device ordinal)

2022-07-14 Thread Juan Pablo de Lima Costa Salazar via petsc-users
Thank you Barry and Stefano, Below is the output from the example, which I ran with an added option since my mpi is not gpu aware. I believe this may be responsible for the error. The reason I chose to compile with the option >>> --download-hypre-configure-arguments=--enable-unified-memory \ i

Re: [petsc-users] Error running src/snes/tutorials/ex19 on Nvidia Tesla K40m : CUDA ERROR (code = 101, invalid device ordinal)

2022-07-14 Thread Stefano Zampini
You don't need unified memory for boomeramg to work. On Thu, Jul 14, 2022, 18:55 Barry Smith wrote: > > So the PETSc test all run, including the test that uses a GPU. > > The hypre test is failing. It is impossible to tell from the output why. > > You can run it manually, cd src/snes/tutor

Re: [petsc-users] Error running src/snes/tutorials/ex19 on Nvidia Tesla K40m : CUDA ERROR (code = 101, invalid device ordinal)

2022-07-14 Thread Barry Smith
So the PETSc test all run, including the test that uses a GPU. The hypre test is failing. It is impossible to tell from the output why. You can run it manually, cd src/snes/tutorials make ex19 mpiexec -n 1 ./ex19 -dm_vec_type cuda -dm_mat_type aijcusparse -da_refine 3 -snes_monitor_shor

Re: [petsc-users] DMPlex: a Mapping Array between Natural and Distributed Cell Index

2022-07-14 Thread Matthew Knepley
On Wed, Jul 13, 2022 at 10:17 PM Bora Jeong wrote: > Dear petsc team, > > I am a user of DMPlex for a finite volume code and there is a necessity to > know global index of each cell. Here the global index means the indexing > that can be found from a mesh file itself without distribution over > p

Re: [petsc-users] KSPComputeRitz, GMRES, matrix with complex number

2022-07-14 Thread Mark Adams
On Thu, Jul 14, 2022 at 11:29 AM feng wang wrote: > Thanks for the clarification. any recommendations to get around this? > I would look at the existing code and see if you can see what is limiting it to real (comments hopefully), if it looks like something you could do, start with a git repo of

Re: [petsc-users] KSPComputeRitz, GMRES, matrix with complex number

2022-07-14 Thread feng wang
Thanks for the clarification. any recommendations to get around this? I am solving a set of linear systems of A_i x_i = B_i with matrix-based GMRES. The entries of A_i and B_i are complex numbers. It is pre-conditioned with ASM and the preconditioning matrix is A_i itself. I would like to show t

Re: [petsc-users] DMPlex: a Mapping Array between Natural and Distributed Cell Index

2022-07-14 Thread Barry Smith
> On Jul 13, 2022, at 9:52 PM, Bora Jeong wrote: > > Dear petsc team, > > I am a user of DMPlex for a finite volume code and there is a necessity to > know global index of each cell. Here the global index means the indexing that > can be found from a mesh file itself without distribution

Re: [petsc-users] KSPComputeRitz, GMRES, matrix with complex number

2022-07-14 Thread Mark Adams
No. I missed that note. Complex has not been implemented. On Thu, Jul 14, 2022 at 9:54 AM feng wang wrote: > Hi Mark, > > Thanks for your reply! > > Maybe I have a misunderstanding of the documentation of KSPComputeRitz ( > https://petsc.org/main/docs/manualpages/KSP/KSPComputeRitz/). It says

Re: [petsc-users] KSPComputeRitz, GMRES, matrix with complex number

2022-07-14 Thread feng wang
Hi Mark, Thanks for your reply! Maybe I have a misunderstanding of the documentation of KSPComputeRitz (https://petsc.org/main/docs/manualpages/KSP/KSPComputeRitz/). It says "-this is currently not implemented when PETSc is built with complex numbers". But if it works, I will give it a try.

Re: [petsc-users] KSPComputeRitz, GMRES, matrix with complex number

2022-07-14 Thread Mark Adams
Why do you say it only works with Real? You need to configure PETSc to use complex numbers and it should work. This is an advanced method and it does not have any tests, which basically says it is very experimental. Don't expect it to be very robust. Mark On Thu, Jul 14, 2022 at 7:19 AM feng wang

[petsc-users] KSPComputeRitz, GMRES, matrix with complex number

2022-07-14 Thread feng wang
Dear All, I am using GMRES with complex numbers and would like to compute the Ritz values. I am looking at KSPComputeRitz and it seems to me that it only works with Petsc compiled with real numbers. Is there an easy alternative way