<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><br class=""></div> Sam,<div class=""><br class=""></div><div class=""> You can pass a simple C function to PetscPushErrorHandler() that prints the top message and then immediately aborts to get the effect you want. But I agree with Dave you lose a lot of useful information by producing such a simple error message.</div><div class=""><br class=""></div><div class=""> Barry<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 16, 2021, at 5:43 PM, Dave May <<a href="mailto:dave.mayhem23@gmail.com" class="">dave.mayhem23@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><br class=""></div><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 16 Mar 2021 at 19:50, Sam Guo <<a href="mailto:sam.guo@cd-adapco.com" target="_blank" class="">sam.guo@cd-adapco.com</a>> wrote:<br class=""></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" class="">Dear PETSc dev team,<div class=""> When there is an PETSc error, I go following overly verbose error message. Is it possible to get a simple error message like "Initial vector is zero or belongs to the deflection space"?</div><div class=""><br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">When an error occurs and the execution is halted, a verbose and informative error message is shown.</div><div class="">I would argue this is useful (very useful), and should never ever be shortened or truncated.<br class=""></div><div class=""><br class=""></div><div class="">This error thrown by PETSc gives you a stack trace. You can see where the error occurred, and the calling code which resulted in the error. In anything but a trivial code, this information is incredibly useful to isolate and fix the problem. I also think it's neat that you see the stack without having to even use a debugger.<br class=""></div><div class=""><br class=""></div><div class="">Currently if your code does not produce errors, no message is displayed. <br class=""></div><div class="">However, when an error occurs, a loud, long and informative message is displayed - and the code stops. <br class=""></div><div class="">What is the use case which would cause / require you to change the current behaviour?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Dave<br class=""></div><div class=""><br class=""></div><div class=""> </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" class=""><div class=""></div><div class="">Thanks,</div><div class="">Sam</div><div class=""><br class=""></div><div class=""><pre bgcolor="#f4f5f7" style="white-space:pre-wrap;color:rgb(23,43,77);font-size:14px;background-color:rgb(244,245,247);border:1px solid rgb(223,225,230);border-radius:3px;line-height:20px;margin-top:10px;margin-bottom:0px;padding:6px 10px" class=""><code bgcolor="#f4f5f7" style="border-radius:3px;line-height:20px;background-color:transparent;border:0px none;display:inline;margin:0px;padding:0px" class="">[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: Initial vector is zero or belongs to the deflation space
[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank" class="">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.11.3, Jun, 26, 2019
[0]PETSC ERROR: Unknown Name on a arch-starccmplus_serial_real named <a href="http://pl2denbg0033pc.net.plm.eds.com/" target="_blank" class="">pl2denbg0033pc.net.plm.eds.com</a> by cd3ppw Tue Mar 16 16:19:28 2021
[0]PETSC ERROR: Configure options --with-x=0 --with-fc=0 --with-debugging=0 --with-blaslapack-dir=/usr/local/jenkins/dev1/mkl/2017.2-cda-001/linux/lib/intel64/../.. --with-mpi=0 -CFLAGS=-O3 -CXXFLAGS=-O3 --with-clean=1 --force --with-scalar-type=real
[0]PETSC ERROR: <a href="https://stash.cd-adapco.com/projects/UPS/repos/star/pull-requests/1" title="Feature/fixversion" style="color:rgb(0,82,204);text-decoration-line:none" target="_blank" class="">#1</a> EPSGetStartVector() line 806 in ../../../slepc/src/eps/interface/epssolve.c
[0]PETSC ERROR: <a href="https://stash.cd-adapco.com/projects/UPS/repos/star/pull-requests/2" title="Feature/CCMP-69574/test unit facetree" style="color:rgb(0,82,204);text-decoration-line:none" target="_blank" class="">#2</a> EPSSolve_KrylovSchur_Default() line 259 in ../../../slepc/src/eps/impls/krylov/krylovschur/krylovschur.c
[0]PETSC ERROR: <a href="https://stash.cd-adapco.com/projects/UPS/repos/star/pull-requests/3" title="Feature/BDS-1490/table curve interpolation" style="color:rgb(0,82,204);text-decoration-line:none" target="_blank" class="">#3</a> EPSSolve() line 149 in ../../../slepc/src/eps/interface/epssolve.c</code></pre></div></div>
</blockquote></div></div>
</div></blockquote></div><br class=""></div></body></html>