Error: Matrix is missing diagonal entry 8

389 views
Skip to first unread message

marco.delchini

unread,
Sep 4, 2016, 11:59:02 PM9/4/16
to moose-users
Hello,

I am getting the following PETSC error message when running my input file:

Matrix is missing diagonal entry 8

This error message only occurs whenever I run my input file with two or more Variables that are solution of ODEs. If I run the same input file with one Variable solution of an ODE, the codes runs fine.

My input file solves both for PDEs and ODEs.

Any help, comments would be appreciated.

Thanks,
Marco

Marco Delchini

unread,
Sep 5, 2016, 3:41:30 PM9/5/16
to moose-users
I was able to reproduce the same error message by using the input file 'constant_rate.i' from the moose/test/ directory. I added a second ODE for a variable 'nodal_one2'. The input file is attached.

Marco

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/8fec6269-e5a4-4704-bff9-10aa5ed75296%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Marc-Olivier Delchini
Postdoctoral Fellow
Nuclear Reactor and System Division
Oak Ridge National Laboratory
constant_rate.i
Message has been deleted
Message has been deleted

Marco Delchini

unread,
Sep 6, 2016, 2:02:10 PM9/6/16
to moose-users
When I run the above input file with the following options:

  petsc_options_iname = '-pc_type -pc_hypre_type'

  petsc_options_value = 'hypre boomerang'


the code runs but does not converge. 


Is it a PETSC version issue?


Thanks,

Marco



Kong (Non-US), Fande

unread,
Sep 6, 2016, 3:02:28 PM9/6/16
to moose...@googlegroups.com
Hi Marco,

Do you have a saddle-point matrix? If not, possibly you do something wrong when you form the matrix. The (incomplete) factorization algorithm do not allow any zero diagonal element. There is  a zero entry on the diagonal of the matrix formed by you.

This might not be an issue in PETSc.

Fande,

Marco Delchini

unread,
Sep 6, 2016, 3:13:41 PM9/6/16
to moose-users
Fade,

the input file I am using is from the Moose test repo in 'moose/test/tests/nodalkernels/constant_rate'. It solves for a two Variables. One is solution of a PDE and the other one of ODE. I modified the input file by adding a third Variable and a second ODE that is identical to the original ODE (the third variable is then solution of the second ODE). The kernels and nodal kernels used in the input files come with Moose. I did not modify any of the Moose source files besides the input file.

Again, the input file runs fine when not modified. I am not sure whether or not the modifications I made yield a saddle-point matrix. 

Thanks for you help,
Marco


For more options, visit https://groups.google.com/d/optout.

Daniel Schwen

unread,
Sep 6, 2016, 3:28:58 PM9/6/16
to moose-users
If you have a saddle point matrix a pc factor shift may help ¯\_(ツ)_/¯

  petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
  petsc_options_value = ' lu       NONZERO               1e-10'


To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
--
Marc-Olivier Delchini
Postdoctoral Fellow
Nuclear Reactor and System Division
Oak Ridge National Laboratory



--
Marc-Olivier Delchini
Postdoctoral Fellow
Nuclear Reactor and System Division
Oak Ridge National Laboratory

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.



--
Marc-Olivier Delchini
Postdoctoral Fellow
Nuclear Reactor and System Division
Oak Ridge National Laboratory

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.

Marco Delchini

unread,
Sep 6, 2016, 3:39:26 PM9/6/16
to moose-users
Daniel,

I still get the same error message when running the input file with your petsc option:

[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: Object is in wrong state
[0]PETSC ERROR: Matrix is missing diagonal entry 1
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.6.3, Dec, 03, 2015
[0]PETSC ERROR: ./../oneDSemEvm-opt on a arch-darwin-c-opt named mac0104637 by mxd Tue Sep  6 15:36:40 2016
[0]PETSC ERROR: Configure options --prefix=/opt/moose/petsc/mpich_petsc-3.6.3/clang-opt-superlu --download-hypre=1 --with-ssl=0 --with-debugging=no --with-pic=1 --with-shared-libraries=1 --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpif90 --download-fblaslapack=1 --download-metis=1 --download-parmetis=1 --download-superlu_dist=1 --download-mumps=1 --download-scalapack=1 CC=mpicc CXX=mpicxx FC=mpif90 F77=mpif77 F90=mpif90 CFLAGS="-fPIC -fopenmp" CXXFLAGS="-fPIC -fopenmp" FFLAGS="-fPIC -fopenmp" FCFLAGS="-fPIC -fopenmp" F90FLAGS="-fPIC -fopenmp" F77FLAGS="-fPIC -fopenmp"
[0]PETSC ERROR: #1 MatLUFactorSymbolic_SeqAIJ() line 298 in /private/tmp/src_temp_petsc-3.6.3-mpich-clang.fpy31F/petsc-3.6.3/src/mat/impls/aij/seq/aijfact.c
[0]PETSC ERROR: #2 MatLUFactorSymbolic() line 2894 in /private/tmp/src_temp_petsc-3.6.3-mpich-clang.fpy31F/petsc-3.6.3/src/mat/interface/matrix.c
[0]PETSC ERROR: #3 PCSetUp_LU() line 127 in /private/tmp/src_temp_petsc-3.6.3-mpich-clang.fpy31F/petsc-3.6.3/src/ksp/pc/impls/factor/lu/lu.c
[0]PETSC ERROR: #4 PCSetUp() line 983 in /private/tmp/src_temp_petsc-3.6.3-mpich-clang.fpy31F/petsc-3.6.3/src/ksp/pc/interface/precon.c
[0]PETSC ERROR: #5 KSPSetUp() line 332 in /private/tmp/src_temp_petsc-3.6.3-mpich-clang.fpy31F/petsc-3.6.3/src/ksp/ksp/interface/itfunc.c
[0]PETSC ERROR: #6 KSPSolve() line 546 in /private/tmp/src_temp_petsc-3.6.3-mpich-clang.fpy31F/petsc-3.6.3/src/ksp/ksp/interface/itfunc.c
[0]PETSC ERROR: #7 SNESSolve_NEWTONLS() line 233 in /private/tmp/src_temp_petsc-3.6.3-mpich-clang.fpy31F/petsc-3.6.3/src/snes/impls/ls/ls.c
[0]PETSC ERROR: #8 SNESSolve() line 3906 in /private/tmp/src_temp_petsc-3.6.3-mpich-clang.fpy31F/petsc-3.6.3/src/snes/interface/snes.c
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0

Thanks,
Marco

To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
--
Marc-Olivier Delchini
Postdoctoral Fellow
Nuclear Reactor and System Division
Oak Ridge National Laboratory



--
Marc-Olivier Delchini
Postdoctoral Fellow
Nuclear Reactor and System Division
Oak Ridge National Laboratory

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.



--
Marc-Olivier Delchini
Postdoctoral Fellow
Nuclear Reactor and System Division
Oak Ridge National Laboratory

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Kong (Non-US), Fande

unread,
Sep 6, 2016, 3:42:12 PM9/6/16
to moose...@googlegroups.com
There are many rows containing zero entries only when using "-mat_view" to print the information. The matrix formed is singular. There is no way to solve it. Unfortunately, I do not know much on how to formulate an ODE.

Fande,

To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
--
Marc-Olivier Delchini
Postdoctoral Fellow
Nuclear Reactor and System Division
Oak Ridge National Laboratory



--
Marc-Olivier Delchini
Postdoctoral Fellow
Nuclear Reactor and System Division
Oak Ridge National Laboratory

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.



--
Marc-Olivier Delchini
Postdoctoral Fellow
Nuclear Reactor and System Division
Oak Ridge National Laboratory

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.

Marco Delchini

unread,
Sep 6, 2016, 3:45:56 PM9/6/16
to moose-users
Fande,

did you run the input file I attached?

Marco


For more options, visit https://groups.google.com/d/optout.

Kong (Non-US), Fande

unread,
Sep 6, 2016, 3:52:26 PM9/6/16
to moose...@googlegroups.com
On Tue, Sep 6, 2016 at 1:45 PM, Marco Delchini <marco.d...@gmail.com> wrote:
Fande,

did you run the input file I attached?

 I did. I run the file attached by you with one more option "-mat_view". There are many zero rows in your matrix.  If you get different things, please let me know.

Fande,

Wang, Yaqi

unread,
Sep 6, 2016, 4:14:49 PM9/6/16
to moose-users
It looks like a bug. If you comment out the second nodal variable and its kernels, the input runs fine. Somehow the time derivative kernel of the second nodal var is never called.

On Tue, Sep 6, 2016 at 8:52 AM, SudiptaBiswas <sudipt...@gmail.com> wrote:
Hi Marco,

This error means you are missing diagonal entries in your jacobian matrix. My guess is either your computeJacobian method is giving zero at some diagonal position or you are missing proper coupling in preconditioner block. Try adding a preconditioner to your input file first, if that does not help, then check your jacobian entries.

Thanks!
Sudipta 

On Monday, 5 September 2016 13:41:30 UTC-6, marco.delchini wrote:
I was able to reproduce the same error message by using the input file 'constant_rate.i' from the moose/test/ directory. I added a second ODE for a variable 'nodal_one2'. The input file is attached.

Marco
On Sun, Sep 4, 2016 at 11:59 PM, marco.delchini <marco.d...@gmail.com> wrote:
Hello,

I am getting the following PETSC error message when running my input file:

Matrix is missing diagonal entry 8

This error message only occurs whenever I run my input file with two or more Variables that are solution of ODEs. If I run the same input file with one Variable solution of an ODE, the codes runs fine.

My input file solves both for PDEs and ODEs.

Any help, comments would be appreciated.

Thanks,
Marco

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.



--
Marc-Olivier Delchini
Postdoctoral Fellow
Nuclear Reactor and System Division
Oak Ridge National Laboratory

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.

Marco Delchini

unread,
Sep 6, 2016, 4:21:18 PM9/6/16
to moose-users
Sudipta,

I tried to add a preconditioner block but still get the same error message.

Yaqi,

I think you are seeing the same problem as me.

Marco 


For more options, visit https://groups.google.com/d/optout.

Marco Delchini

unread,
Sep 6, 2016, 5:58:18 PM9/6/16
to moose-users
To be more specific, if the variable 'nodal_ode_2' and the associated nodal kernels are commented out, the input file runs fine. Once again, the nodal kernels used in the input files come with Moose and are part of the tests.

Is there anything else I can do to figure out why I am getting this error message?

Thanks,
Marco

Marco Delchini

unread,
Sep 7, 2016, 12:31:42 PM9/7/16
to moose-users
I start to think there is a bug in Moose when solving for two ODEs. Has anybody else experienced this problem with Moose when solving two ODEs?

Thanks,
Marco

Wang, Yaqi

unread,
Sep 7, 2016, 12:48:13 PM9/7/16
to moose-users
Marco,

You probably want to create a moose issue on github and start the conversation there.

-Yaqi

Peterson, JW

unread,
Sep 7, 2016, 12:48:43 PM9/7/16
to moose-users
On Wed, Sep 7, 2016 at 10:31 AM, Marco Delchini <marco.d...@gmail.com> wrote:
I start to think there is a bug in Moose when solving for two ODEs. Has anybody else experienced this problem with Moose when solving two ODEs?

This works fine.  See:

test/tests/time_integrators/scalar/stiff.i
test/tests/kernels/ode/parsedode_sys_impl_test.i
examples/ex18_scalar_kernel/ex18.i

--
John

Marco Delchini

unread,
Sep 7, 2016, 1:08:34 PM9/7/16
to moose-users
John,

those are for ScalarKernels and I am having issues with NodalKernels. 

Marco

--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.

For more options, visit https://groups.google.com/d/optout.

Marco Delchini

unread,
Sep 7, 2016, 4:03:31 PM9/7/16
to moose-users
I created a Moose issue on github.

Marco
Reply all
Reply to author
Forward
0 new messages