<div dir="ltr"><div dir="ltr">On Thu, Oct 22, 2020 at 3:13 PM baikadi pranay <<a href="mailto:pranayreddy865@gmail.com">pranayreddy865@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<br><br>I am trying to find the condition number of the A matrix for a linear system I am solving. I have used the following commands.<br><b>./a.out -ksp_monitor_singular_value -ksp_type gmres -ksp_gmres_restart 1000 -pc_type none<br></b>However, the execution comes to a halt after a few iterations with the following error.<br>[0]PETSC ERROR: ------------------------------------------------------------------------<br>[0]PETSC ERROR: Caught signal number 8 FPE: Floating Point Exception,probably divide by zero<br>[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger<br>[0]PETSC ERROR: or see <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind</a><br>[0]PETSC ERROR: or try <a href="http://valgrind.org" target="_blank">http://valgrind.org</a> on GNU/linux and Apple Mac OS X to find memory corruption errors<br>[0]PETSC ERROR: likely location of problem given in stack below<br>[0]PETSC ERROR: ---------------------  Stack Frames ------------------------------------<br>[0]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,<br>[0]PETSC ERROR:       INSTEAD the line number of the start of the function<br>[0]PETSC ERROR:       is given.<br>[0]PETSC ERROR: [0] LAPACKgesvd line 40 /packages/7x/petsc/3.11.1/petsc-3.11.1/src/ksp/ksp/impls/gmres/gmreig.c<br>[0]PETSC ERROR: [0] KSPComputeExtremeSingularValues_GMRES line 22 /packages/7x/petsc/3.11.1/petsc-3.11.1/src/ksp/ksp/impls/gmres/gmreig.c<br>[0]PETSC ERROR: [0] KSPComputeExtremeSingularValues line 59 /packages/7x/petsc/3.11.1/petsc-3.11.1/src/ksp/ksp/interface/itfunc.c<br>[0]PETSC ERROR: [0] KSPMonitorSingularValue line 130 /packages/7x/petsc/3.11.1/petsc-3.11.1/src/ksp/ksp/interface/iterativ.c<br>[0]PETSC ERROR: [0] KSPMonitor line 1765 /packages/7x/petsc/3.11.1/petsc-3.11.1/src/ksp/ksp/interface/itfunc.c<br>[0]PETSC ERROR: [0] KSPGMRESCycle line 122 /packages/7x/petsc/3.11.1/petsc-3.11.1/src/ksp/ksp/impls/gmres/gmres.c<br>[0]PETSC ERROR: [0] KSPSolve_GMRES line 225 /packages/7x/petsc/3.11.1/petsc-3.11.1/src/ksp/ksp/impls/gmres/gmres.c<br>[0]PETSC ERROR: [0] KSPSolve line 678 /packages/7x/petsc/3.11.1/petsc-3.11.1/src/ksp/ksp/interface/itfunc.c<br>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>[0]PETSC ERROR: Signal received<br>[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.<br>[0]PETSC ERROR: Petsc Release Version 3.11.1, Apr, 12, 2019 <br>[0]PETSC ERROR: ./a.out on a linux-gnu-c-debug named <a href="http://cg17-9.agave.rc.asu.edu" target="_blank">cg17-9.agave.rc.asu.edu</a> by pbaikadi Thu Oct 22 12:07:11 2020<br>[0]PETSC ERROR: Configure options <br>[0]PETSC ERROR: #1 User provided function() line 0 in  unknown file<br>--------------------------------------------------------------------------<br>MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD<br>with errorcode 59.<br><br>NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.<br>You may or may not see output from other processes, depending on<br>exactly when Open MPI kills them.<br>--------------------------------------------------------------------------<br>Is the error because the A matrix is singular (causing the max/min to be undefined)? Please let me know.<br></div></blockquote><div><br></div><div>No. It is more likely that there is an invalid value, like an Inf or NaN.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thank you,<br>Sincerely,<br>Pranay.</div><div hspace="streak-pt-mark" style="max-height:1px"><img alt="" style="width: 0px; max-height: 0px; overflow: hidden;" src="https://mailfoogae.appspot.com/t?sender=acHJhbmF5cmVkZHk4NjVAZ21haWwuY29t&type=zerocontent&guid=33fb9da7-dac7-45e1-b238-96ec42a38e02"><font color="#ffffff" size="1">ᐧ</font></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>