Re: [petsc-users] MatZeroRows and MATELEMENTAL

2014-10-28 Thread Francesco Ballarin
Thanks Jack, Barry and Matt. I patched my PETSc 3.5.2 as follows, but I am not really sure that this is the correct way (for example, I see in MatSetValues_Elemental two calls to functions P2RO and RO2E for the computation of the local row index but I do not understand what is their purpose, nor i

Re: [petsc-users] Lookup error in PetscTableFind()

2014-10-28 Thread Barry Smith
You don’t care about checking for leaks. I use -q --tool=memcheck --num-callers=20 --track-origins=yes > On Oct 28, 2014, at 1:50 PM, Luc Berger-Vergiat wrote: > > Yes, I am running with --leak-check=full > Reconfiguring and recompiling the whole library and my code in debug mode > does t

Re: [petsc-users] Lookup error in PetscTableFind()

2014-10-28 Thread Luc Berger-Vergiat
Yes, I am running with --leak-check=full Reconfiguring and recompiling the whole library and my code in debug mode does take quite some time on CETUS/MIRA... Hopefully the queue will go up fast and I can give you some details about the issue. Best, Luc On 10/28/2014 02:25 PM, Barry Smith wrot

Re: [petsc-users] Lookup error in PetscTableFind()

2014-10-28 Thread Barry Smith
You need to pass some options to valgrind telling it to check for memory corruption issues > On Oct 28, 2014, at 12:30 PM, Luc Berger-Vergiat wrote: > > Ok, I'm recompiling PETSc in debug mode then. > Do you know what the call sequence should be on CETUS to get valgrind > attached to PETSc

Re: [petsc-users] Book for the PETSc finite volume method

2014-10-28 Thread Rongliang Chen
Great. I will go to your office about 3PM this afternoon. Thank you very much. Best regards, Rongliang On 10/28/2014 11:41 AM, Jed Brown wrote: Rongliang Chen writes: Yes. I am at CU Boulder. I will read the Berger paper first, and then if possible, I will go to your office to talk with you

Re: [petsc-users] Book for the PETSc finite volume method

2014-10-28 Thread Jed Brown
Rongliang Chen writes: > Yes. I am at CU Boulder. I will read the Berger paper first, and then if > possible, I will go to your office to talk with you when you are free. I can meet before 5pm this afternoon or tomorrow any time other than 12-1pm. Note that the example does not currently defi

Re: [petsc-users] Book for the PETSc finite volume method

2014-10-28 Thread Rongliang Chen
Yes. I am at CU Boulder. I will read the Berger paper first, and then if possible, I will go to your office to talk with you when you are free. Thanks. Best, Rongliang On 10/28/2014 11:08 AM, Jed Brown wrote: Rongliang Chen writes: Hi Jed, I am solving the 3D compressible Navier-Stokes eq

Re: [petsc-users] Lookup error in PetscTableFind()

2014-10-28 Thread Luc Berger-Vergiat
Ok, I'm recompiling PETSc in debug mode then. Do you know what the call sequence should be on CETUS to get valgrind attached to PETSc? Would this work for example: runjob --np 32 -p 8 --block $COBALT_PARTNAME --cwd /projects/shearbands/job1/200/4nodes_32cores/LU --verbose=INFO --envs FEAPHOME

Re: [petsc-users] Fieldsplit with LSC for constrained elasticity/poroelasticity?

2014-10-28 Thread Jed Brown
Tabrez Ali writes: > Jed > > You're right and it is precisely what I am trying to understand as well. > I am attaching the comparison to the analytical solution. As you can see > the agreement is almost perfect, except at the discontinuity (y=0 in the > analytical solution). > > So why am I ge

Re: [petsc-users] Book for the PETSc finite volume method

2014-10-28 Thread Jed Brown
Rongliang Chen writes: > Hi Jed, > > I am solving the 3D compressible Navier-Stokes equations. I have read > the ex11.c for several days and still do not fully understand this. I > will look at the older version as you suggested. Maybe I need to go to > your office to ask you some questions. :

Re: [petsc-users] Fieldsplit with LSC for constrained elasticity/poroelasticity?

2014-10-28 Thread Matthew Knepley
On Tue, Oct 28, 2014 at 12:05 PM, Tabrez Ali wrote: > Matt > > The analytical (Okada) solution is wrong at the fault. PETSc is right. It > is a strike slip fault and constraints are being enforced correctly. > If the solution is right and the residual is large, then the function calculating the

Re: [petsc-users] Fieldsplit with LSC for constrained elasticity/poroelasticity?

2014-10-28 Thread Tabrez Ali
Matt The analytical (Okada) solution is wrong at the fault. PETSc is right. It is a strike slip fault and constraints are being enforced correctly. Tabrez On 10/28/2014 11:57 AM, Matthew Knepley wrote: On Tue, Oct 28, 2014 at 11:56 AM, Tabrez Ali > wrote:

Re: [petsc-users] Fieldsplit with LSC for constrained elasticity/poroelasticity?

2014-10-28 Thread Matthew Knepley
On Tue, Oct 28, 2014 at 11:56 AM, Tabrez Ali wrote: > Jed > > You're right and it is precisely what I am trying to understand as well. I > am attaching the comparison to the analytical solution. As you can see the > agreement is almost perfect, except at the discontinuity (y=0 in the > analytical

Re: [petsc-users] Fieldsplit with LSC for constrained elasticity/poroelasticity?

2014-10-28 Thread Tabrez Ali
Jed You're right and it is precisely what I am trying to understand as well. I am attaching the comparison to the analytical solution. As you can see the agreement is almost perfect, except at the discontinuity (y=0 in the analytical solution). So why am I getting the correct solution when a

Re: [petsc-users] Lookup error in PetscTableFind()

2014-10-28 Thread Barry Smith
Hmm, this should never happen. In the code ierr = PetscTableCreate(aij->B->rmap->n,mat->cmap->N+1,&gid1_lid1);CHKERRQ(ierr); for (i=0; iB->rmap->n; i++) { for (j=0; jilen[i]; j++) { PetscInt data,gid1 = aj[B->i[i] + j] + 1; ierr = PetscTableFind(gid1_lid1,gid1,&data);CHK

Re: [petsc-users] Book for the PETSc finite volume method

2014-10-28 Thread Rongliang Chen
Hi Jed, I am solving the 3D compressible Navier-Stokes equations. I have read the ex11.c for several days and still do not fully understand this. I will look at the older version as you suggested. Maybe I need to go to your office to ask you some questions. :-) Best regards, Rongliang On 10

Re: [petsc-users] Fieldsplit with LSC for constrained elasticity/poroelasticity?

2014-10-28 Thread Jed Brown
Tabrez Ali writes: > Matt and Jed > > But it does appear to work well in practice (as in I get the correct > solution). Your "correct" solution has a residual seven orders of magnitude bigger than the initial guess. Does that not give you pause? signature.asc Description: PGP signature

Re: [petsc-users] Book for the PETSc finite volume method

2014-10-28 Thread Jed Brown
Rongliang Chen writes: > Thanks Matt and Jed, > > I am trying to write a parallel FVM code on unstructured grid for > compressible NS equations. I found that the finite volume code on the > structured mesh is easy to write but for the unstructured mesh, it is > really untrivial. I want to foll

Re: [petsc-users] Fieldsplit with LSC for constrained elasticity/poroelasticity?

2014-10-28 Thread Tabrez Ali
Matt and Jed But it does appear to work well in practice (as in I get the correct solution). Based on what I have tried, LSC (with GAMG on 00) is the only solver I am able to use on relatively large problems with non trivial geometries (e.g., see my original email). So why is that? I will e

Re: [petsc-users] Book for the PETSc finite volume method

2014-10-28 Thread Rongliang Chen
Thanks Matt and Jed, I am trying to write a parallel FVM code on unstructured grid for compressible NS equations. I found that the finite volume code on the structured mesh is easy to write but for the unstructured mesh, it is really untrivial. I want to follow the PETSc's DMPlexFV but it is n

Re: [petsc-users] Book for the PETSc finite volume method

2014-10-28 Thread Jed Brown
Matthew Knepley writes: > On Tue, Oct 28, 2014 at 10:34 AM, Rongliang Chen > wrote: > >> Hello, >> >> I have a very elementary question. I am trying to learn the PETSc finite >> volume method codes. Can you tell me which book did you refer to for the >> PETSc FVM? > > > PETSc has some support fo

Re: [petsc-users] Book for the PETSc finite volume method

2014-10-28 Thread Matthew Knepley
On Tue, Oct 28, 2014 at 10:34 AM, Rongliang Chen wrote: > Hello, > > I have a very elementary question. I am trying to learn the PETSc finite > volume method codes. Can you tell me which book did you refer to for the > PETSc FVM? PETSc has some support for operations done in finite volume codes

[petsc-users] Book for the PETSc finite volume method

2014-10-28 Thread Rongliang Chen
Hello, I have a very elementary question. I am trying to learn the PETSc finite volume method codes. Can you tell me which book did you refer to for the PETSc FVM? Thanks. Best regards, Rongliang

Re: [petsc-users] Fieldsplit with LSC for constrained elasticity/poroelasticity?

2014-10-28 Thread Jed Brown
[re-adding list to Cc] Tabrez Ali writes: > Jed > > The reason I did not nondimenionalize was because it didnt make gmres > with asm go any faster for my test cases. The true residual spikes up by 15 orders of magnitude when you start solving (with MUMPS on fieldsplit_0_). That is a major pro

Re: [petsc-users] Adaptive controllers in TS

2014-10-28 Thread Jed Brown
Miguel Angel Salazar de Troya writes: > Sorry to be pushy, but could anyone help me on this? Your last email didn't have a specific question, so I'm not sure how to answer. What you want to do is possible, but not trivial and might require library modifications to avoid doing something perverse

[petsc-users] Lookup error in PetscTableFind()

2014-10-28 Thread Luc Berger-Vergiat
Hi, I am running a code on CETUS and I use PETSc for as a linear solver. Here is my submission command: qsub -A shearbands -t 60 -n 4 -O 4nodes_32cores_Mult --mode script 4nodes_32cores_LU Here is "4nodes_32cores_LU": #!/bin/sh LOCARGS="--block $COBALT_PARTNAME ${COBALT_CORNER:+--

Re: [petsc-users] Fieldsplit with LSC for constrained elasticity/poroelasticity?

2014-10-28 Thread Matthew Knepley
On Tue, Oct 28, 2014 at 9:49 AM, Tabrez Ali wrote: > Matt > > The system is certainly not singular (checked using -pc_type svd > -pc_svd_monitor). It also gives the correct solution (compared to the > analytical solution for a trivial problem). > Something is very wrong with the preconditioner

Re: [petsc-users] Fieldsplit with LSC for constrained elasticity/poroelasticity?

2014-10-28 Thread Tabrez Ali
Matt The system is certainly not singular (checked using -pc_type svd -pc_svd_monitor). It also gives the correct solution (compared to the analytical solution for a trivial problem). Tabrez On 10/28/2014 08:44 AM, Matthew Knepley wrote: On Tue, Oct 28, 2014 at 8:00 AM, Tabrez Ali

Re: [petsc-users] Adaptive controllers in TS

2014-10-28 Thread Miguel Angel Salazar de Troya
Sorry to be pushy, but could anyone help me on this? Thanks Miguel On Thu, Oct 23, 2014 at 10:46 AM, Miguel Angel Salazar de Troya < salazardetr...@gmail.com> wrote: > I decided to implement the continuous adjoint because it is clearer to me > how to do it and the gradient will converge anyways.

Re: [petsc-users] TSSetIJacobian is never called

2014-10-28 Thread Matthew Knepley
On Tue, Oct 28, 2014 at 9:22 AM, Sharp Stone wrote: > Hi Matt and Jed, > > Thank you for your replies. Now I see Petsc will calculate functions' > residue in SNES before form the Jacobian. In order to get a initial > non-zero residues of the functions, we cannot initialize some of the > discretiz

Re: [petsc-users] Multiple solves with PCMG fail

2014-10-28 Thread Jed Brown
Mark Adams writes: > OK, so the first time there is no RHS and so not eigen estimate and the > next solves do not check to see if a valid eigen estimate has been created. I think so. I'm hoping Filippo will confirm. > Jed: could we just check for zero iterations in the eigen estimator and > the

Re: [petsc-users] Fieldsplit with LSC for constrained elasticity/poroelasticity?

2014-10-28 Thread Matthew Knepley
On Tue, Oct 28, 2014 at 9:03 AM, Jed Brown wrote: > Matthew Knepley writes: > > > On Tue, Oct 28, 2014 at 8:00 AM, Tabrez Ali > wrote: > > > >> Matt > >> > >> With MUMPS it is indeed the same but not faster. E.g., see 1.txt and > 2.txt > >> > > > > There is a big problem here. This system is n

Re: [petsc-users] Fieldsplit with LSC for constrained elasticity/poroelasticity?

2014-10-28 Thread Jed Brown
Matthew Knepley writes: > On Tue, Oct 28, 2014 at 8:00 AM, Tabrez Ali wrote: > >> Matt >> >> With MUMPS it is indeed the same but not faster. E.g., see 1.txt and 2.txt >> > > There is a big problem here. This system is never actually being solved. > Look at 1.txt: > > 0 KSP preconditioned resid

Re: [petsc-users] Fieldsplit with LSC for constrained elasticity/poroelasticity?

2014-10-28 Thread Matthew Knepley
On Tue, Oct 28, 2014 at 8:00 AM, Tabrez Ali wrote: > Matt > > With MUMPS it is indeed the same but not faster. E.g., see 1.txt and 2.txt > There is a big problem here. This system is never actually being solved. Look at 1.txt: 0 KSP preconditioned resid norm 9.320055451716e+05 true resid norm

Re: [petsc-users] Fieldsplit with LSC for constrained elasticity/poroelasticity?

2014-10-28 Thread Matthew Knepley
On Tue, Oct 28, 2014 at 5:39 AM, Tabrez Ali wrote: > Mark > > When I replace "-fieldsplit_0_ksp_type preonly" with > "-fieldsplit_0_ksp_type cg" then it becomes very slow (had to kill it). > That means something in the setup is wrong. It should be about the same or faster. Run with -fieldsplit_

Re: [petsc-users] Multiple solves with PCMG fail

2014-10-28 Thread Mark Adams
On Mon, Oct 27, 2014 at 3:02 PM, Filippo Leonardi < filippo.leona...@sam.math.ethz.ch> wrote: > On Monday 27 October 2014 14:31:45 Mark Adams wrote: > > > > I'm not sure what you are asking. starting i=0 or i=1, and with and > > without mg. So four possibilities? The solutions will be different

Re: [petsc-users] Fieldsplit with LSC for constrained elasticity/poroelasticity?

2014-10-28 Thread Tabrez Ali
Mark When I replace "-fieldsplit_0_ksp_type preonly" with "-fieldsplit_0_ksp_type cg" then it becomes very slow (had to kill it). With MUMPS , i.e., with '-fieldsplit_0_pc_type lu -fieldsplit_0_pc_factor_mat_solver_package mumps -fieldsplit_0_ksp_type preonly' it works fine but takes more ti