<div dir="ltr"><div dir="ltr">On Tue, Feb 23, 2021 at 3:54 AM Francesco Brarda <<a href="mailto:brardafrancesco@gmail.com">brardafrancesco@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 style="overflow-wrap: break-word;">Hi!<br><br>I am very new to the PETSc world. I am working with a GitHub repo that uses PETSc together with Stan (a statistics open source software), <a href="https://discourse.mc-stan.org/t/using-petsc-library-together-with-stan/17550" target="_blank">here</a> you can find the discussion. <br>It has been defined a <a href="https://github.com/IvanYashchuk/stan-math-petsc/blob/stan-petsc/stan/math/prim/fun/stan_petsc_interface.hpp" target="_blank">functor</a> to convert EigenVector to PetscVec and viceversa, both sequentially and in parallel. <br>The <a href="https://github.com/IvanYashchuk/stan-math-petsc/blob/stan-petsc/stan/math/rev/functor/petsc_functor.hpp" target="_blank">file</a> using these functions does the conversions with the sequential setting. I changed to those using MPI, that is from EigenVectorToPetscVecSeq to EigenVectorToPetscVecMPI and so on because I want to evaluate the scaling.<br>Running the example with <font face="Menlo" size="1">mpirun -n 5 examples/rosenbrock/rosenbrock optimize</font> in the debug mode I get the error <font face="Menlo" size="1">Caught signal number 11 SEGV</font>. I therefore used the option <font face="Menlo"><font size="1">-start_in_debugger</font> </font>and I get the following:</div></blockquote><div><br></div><div>For some reason, the -start_in_debuggger option is not being seen. Are you showing all the output? Once the debugger is attached,</div><div>you run the program (conr) and then when you hit the SEGV you get a stack trace (where).</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 style="overflow-wrap: break-word;"><div><span><font face="Menlo" size="1">[2]PETSC ERROR: ------------------------------------------------------------------------<br>[2]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range<br>[2]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger<br>[2]PETSC ERROR: or see <a href="https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind" target="_blank">https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind</a><br>[2]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>[2]PETSC ERROR: likely location of problem given in stack below<br>[2]PETSC ERROR: ---------------------  Stack Frames ------------------------------------<br>[2]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,<br>[2]PETSC ERROR:       INSTEAD the line number of the start of the function<br>[2]PETSC ERROR:       is given.<br>[3]PETSC ERROR: ------------------------------------------------------------------------<br>[3]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range<br>[3]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger<br>[3]PETSC ERROR: or see <a href="https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind" target="_blank">https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind</a><br>[3]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>[3]PETSC ERROR: likely location of problem given in stack below<br>[3]PETSC ERROR: ---------------------  Stack Frames ------------------------------------<br>[3]PETSC ERROR: Note: The EXACT line numbers in the stack are not available,<br>[3]PETSC ERROR:       INSTEAD the line number of the start of the function<br>[3]PETSC ERROR:       is given.<br>[3]PETSC ERROR: PetscAbortErrorHandler: User provided function() line 0 in  unknown file (null)<br>  To prevent termination, change the error handler using PetscPushErrorHandler()<br>[2]PETSC ERROR: PetscAbortErrorHandler: User provided function() line 0 in  unknown file (null)<br>  To prevent termination, change the error handler using PetscPushErrorHandler()<br><br>===================================================================================<br>=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES<br>=   PID 22939 RUNNING AT srvulx13<br>=   EXIT CODE: 134<br>=   CLEANING UP REMAINING PROCESSES<br>=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES<br>===================================================================================<br>YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Aborted (signal 6)<br>This typically refers to a problem with your application.<br>Please see the FAQ page for debugging suggestions</font></span><div><span><font face="Menlo" size="1"><br></font></span></div><div><span>I read the documentation regarding the PetscAbortErrorHandler, but I do not know where should I use it. How can I solve the problem? </span></div><div><span>I hope I have been clear enough.</span></div><div><span>Attached you can find also my configure.log and make.log files.</span></div><div><span><br></span></div><div><span>Best,</span></div><div><span>Francesco</span></div><div><span><br></span></div><div></div></div></div><div style="overflow-wrap: break-word;"><div><div></div></div></div><div style="overflow-wrap: break-word;"><div><div><span><br></span><span><br></span></div></div></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>