Re: [petsc-users] Solving NON-Diagonally dominant sparse system

2017-04-10 Thread Kaushik Kulkarni
A strange behavior I am observing is: Problem: I have to solve A*x=rhs, and currently I am currently trying to solve for a system where I know the exact solution. I have initialized the exact solution in the Vec x_exact. MatMult(A, x_exact, dummy);// Storing the value of A*x_exact in dummy

Re: [petsc-users] Solving NON-Diagonally dominant sparse system

2017-04-10 Thread Kaushik Kulkarni
Thank you for the inputs. I tried Barry' s suggestion to use SuperLU, but the solution does not converge and on doing -ksp_monitor -ksp_converged_reason. I get the following error:- 240 KSP Residual norm 1.722571678777e+07 Linear solve did not converge due to DIVERGED_DTOL iterations 240 For some

Re: [petsc-users] how to use petsc4py with mpi subcommunicators?

2017-04-10 Thread Jed Brown
Rodrigo Felicio writes: > Hello all, > > Sorry for the newbie question, but is there a way of making petsc4py work > with an MPI group or subcommunicator? I saw a solution posted back in 2010 > (http://lists.mcs.anl.gov/pipermail/petsc-users/2010-May/006382.html),

Re: [petsc-users] SNES diverges when KSP reach max iteration?

2017-04-10 Thread Ping He
It works. Thanks! On 04/10/2017 03:14 PM, Barry Smith wrote: SNESSetMaxLinearSolveFailures() or -snes_max_linear_solve_fail 1000 (use some large number here). On Apr 10, 2017, at 1:22 PM, Ping He wrote: Dear all, I am using SNES for an incompressible flow

Re: [petsc-users] Solving NON-Diagonally dominant sparse system

2017-04-10 Thread Xiaoye S. Li
If you need to use SuperLU_DIST, the pivoting is done statically, using maximum weighted matching, so the small diagonals are usually taken care as well. It is not as good as partial pivoting, but works most of the time. Sherry On Mon, Apr 10, 2017 at 12:07 PM, Barry Smith

Re: [petsc-users] SNES diverges when KSP reach max iteration?

2017-04-10 Thread Barry Smith
SNESSetMaxLinearSolveFailures() or -snes_max_linear_solve_fail 1000 (use some large number here). > On Apr 10, 2017, at 1:22 PM, Ping He wrote: > > Dear all, > > I am using SNES for an incompressible flow problem. I choose the > preconditioned matrix-free Newton

Re: [petsc-users] Solving NON-Diagonally dominant sparse system

2017-04-10 Thread Barry Smith
I would suggest using ./configure --download-superlu and then when running the program -pc_type lu -pc_factor_mat_solver_package superlu Note that this is SuperLU, it is not SuperLU_DIST. Superlu uses partial pivoting for numerical stability so should be able to handle the small or zero

[petsc-users] how to use petsc4py with mpi subcommunicators?

2017-04-10 Thread Rodrigo Felicio
Hello all, Sorry for the newbie question, but is there a way of making petsc4py work with an MPI group or subcommunicator? I saw a solution posted back in 2010 (http://lists.mcs.anl.gov/pipermail/petsc-users/2010-May/006382.html), but it does not work for me. Indeed, if I try to use

Re: [petsc-users] GAMG for the unsymmetrical matrix

2017-04-10 Thread Kong, Fande
On Sun, Apr 9, 2017 at 6:04 AM, Mark Adams wrote: > You seem to have two levels here and 3M eqs on the fine grid and 37 on > the coarse grid. 37 is on the sub domain. rows=18145, cols=18145 on the entire coarse grid. > I don't understand that. > > You are also calling