Re: [petsc-users] Meaning of PETSc error code 77

2019-02-08 Thread Smith, Barry F. via petsc-users


   This particular error "Petsc has generated inconsistent data" is a 
catastrophic error (not, for example, simply failure to solve a system) so it 
is not possible to by-pass the error. We would need to know exactly where in 
the PETSc code the error was detected to to help you resolve the problem.

   Barry


> On Feb 8, 2019, at 11:40 AM, aditya kumar via petsc-users 
>  wrote:
> 
> Hello,
> 
> I am using PETSc with FEniCS project libraries to solve a nonlinear problem. 
> I am using PETSc Krylov solver with the following configuration
> 
> pc = PETScPreconditioner("petsc_amg") 
> PETScOptions.set("mg_levels_ksp_type", "chebyshev")
> PETScOptions.set("mg_levels_pc_type", "jacobi")
> PETScOptions.set("mg_levels_esteig_ksp_type", "cg")
> PETScOptions.set("mg_levels_ksp_chebyshev_esteig_steps", 50)
> solver_u = PETScKrylovSolver("cg", pc)
> 
> 
> 
> I am encountering this error sometimes during the solution of the linear 
> system:
> 
> Error:   Unable to successfully call PETSc function 'KSPSolve'.
> *** Reason:  PETSc error code is: 77 (Petsc has generated inconsistent data).
> *** Where:   This error was encountered inside 
> /tmp/dolfin/dolfin/la/PETScKrylovSolver.cpp. 
> 
> *** Process: 130
> 
> Can anybody help me in understanding the possible reasons for this error 
> code? Or refer me to any available documentation? It will be really helpful. 
> 
> Also, I will like to know if there is a way to prevent the code from stopping 
> due to such PETSc errors, so that I can tweak some parameters to hopefully 
> make it progress.  
> 
> 
> Thanks and Regards,
> Aditya
> 



Re: [petsc-users] Meaning of PETSc error code 77

2019-02-08 Thread Justin Chang via petsc-users
 Hi Aditya,

I wouldn't trust FEniCS' wrappers around PETSc. It might also depend on the
version of DOLFIN you're working with.

Shameless plug: Try using pfibs

https://github.com/NREL/pfibs

 We wrote a slightly better PETSc interface to FEniCS. It does require
FEniCS 2018.1.0 or higher. This should at least give better error logs for
your problem.

Also I know a lot of PETSc solvers rely on some sort of DM, which FEniCS
(at the moment) does not automatically provide. We have a pFibs branch
which attaches a DMShell to your functionspace.

https://github.com/NREL/pfibs/tree/dm-nested-solver-feature

It's still in its early stages, but it should at least be able to handle
the PETScOptions you've set above.

Hopefully this helps,
Justin

On Fri, Feb 8, 2019 at 10:41 AM aditya kumar via petsc-users <
petsc-users@mcs.anl.gov> wrote:

> Hello,
>
> I am using PETSc with FEniCS project libraries to solve a nonlinear
> problem. I am using PETSc Krylov solver with the following configuration
>
> pc = PETScPreconditioner("petsc_amg")
> PETScOptions.set("mg_levels_ksp_type", "chebyshev")
> PETScOptions.set("mg_levels_pc_type", "jacobi")
> PETScOptions.set("mg_levels_esteig_ksp_type", "cg")
> PETScOptions.set("mg_levels_ksp_chebyshev_esteig_steps", 50) solver_u =
> PETScKrylovSolver("cg", pc)
>
> I am encountering this error sometimes during the solution of the linear
> system:
> Error: Unable to successfully call PETSc function 'KSPSolve'. *** Reason:
> PETSc error code is: 77 (Petsc has generated inconsistent data). *** Where:
> This error was encountered inside
> /tmp/dolfin/dolfin/la/PETScKrylovSolver.cpp.
>
> *** Process: 130
>
> Can anybody help me in understanding the possible reasons for this error
> code? Or refer me to any available documentation? It will be really
> helpful.
>
> Also, I will like to know if there is a way to prevent the code from
> stopping due to such PETSc errors, so that I can tweak some parameters to
> hopefully make it progress.
>
> Thanks and Regards,
> Aditya
>
>


Re: [petsc-users] Meaning of PETSc error code 77

2019-02-08 Thread Jed Brown via petsc-users
Can you run in a debugger to get a stack trace?  I believe Dolfin
swallows the stack trace to obstruct efforts to remove bugs; probably
paid off by the bug lobby.

aditya kumar via petsc-users  writes:

> Hello,
>
> I am using PETSc with FEniCS project libraries to solve a nonlinear
> problem. I am using PETSc Krylov solver with the following configuration
>
> pc = PETScPreconditioner("petsc_amg")
> PETScOptions.set("mg_levels_ksp_type", "chebyshev")
> PETScOptions.set("mg_levels_pc_type", "jacobi")
> PETScOptions.set("mg_levels_esteig_ksp_type", "cg")
> PETScOptions.set("mg_levels_ksp_chebyshev_esteig_steps", 50) solver_u =
> PETScKrylovSolver("cg", pc)
>
> I am encountering this error sometimes during the solution of the linear
> system:
> Error: Unable to successfully call PETSc function 'KSPSolve'. *** Reason:
> PETSc error code is: 77 (Petsc has generated inconsistent data). *** Where:
> This error was encountered inside
> /tmp/dolfin/dolfin/la/PETScKrylovSolver.cpp.
>
> *** Process: 130
>
> Can anybody help me in understanding the possible reasons for this error
> code? Or refer me to any available documentation? It will be really
> helpful.
>
> Also, I will like to know if there is a way to prevent the code from
> stopping due to such PETSc errors, so that I can tweak some parameters to
> hopefully make it progress.
>
> Thanks and Regards,
> Aditya


[petsc-users] Meaning of PETSc error code 77

2019-02-08 Thread aditya kumar via petsc-users
Hello,

I am using PETSc with FEniCS project libraries to solve a nonlinear
problem. I am using PETSc Krylov solver with the following configuration

pc = PETScPreconditioner("petsc_amg")
PETScOptions.set("mg_levels_ksp_type", "chebyshev")
PETScOptions.set("mg_levels_pc_type", "jacobi")
PETScOptions.set("mg_levels_esteig_ksp_type", "cg")
PETScOptions.set("mg_levels_ksp_chebyshev_esteig_steps", 50) solver_u =
PETScKrylovSolver("cg", pc)

I am encountering this error sometimes during the solution of the linear
system:
Error: Unable to successfully call PETSc function 'KSPSolve'. *** Reason:
PETSc error code is: 77 (Petsc has generated inconsistent data). *** Where:
This error was encountered inside
/tmp/dolfin/dolfin/la/PETScKrylovSolver.cpp.

*** Process: 130

Can anybody help me in understanding the possible reasons for this error
code? Or refer me to any available documentation? It will be really
helpful.

Also, I will like to know if there is a way to prevent the code from
stopping due to such PETSc errors, so that I can tweak some parameters to
hopefully make it progress.

Thanks and Regards,
Aditya