<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="font-size: 12pt;">Hi,</p>
<p style="font-size: 12pt;"><br>
</p>
<p style="font-size: 12pt;">I have a PETSc code which works in some cases circumstances whereas in others it gives me the error message below.</p>
<p style="font-size: 12pt;"><span style="font-size: 12pt;">The code works </span><span style="font-size: 12pt;">on my machine</span><span style="font-size: 12pt;"> </span><span style="font-size: 12pt;">when I compile PETS</span><span style="font-size: 12pt;">c</span><span style="font-size: 12pt;"> with
debug flag on:</span></p>
<p style="margin-right: 0px; margin-left: 0px; caret-color: rgb(33, 33, 33); color: rgb(33, 33, 33); font-size: 11px; line-height: normal; font-family: Menlo;">
<span style="font-family: Menlo, serif, EmojiFont;">./configure PETSC_DIR=/Users/zjorti/software/petsc-3.14.5 PETSC_ARCH=macx --with-fc=0 --with-mpi-dir=$HOME/.brew --download-hypre --with-debugging=1 --with-cxx-dialect=C++11</span></p>
<p style="font-size: 12pt;"><span style="font-size: 12pt;"> </span><br>
</p>
<p style="font-size: 12pt;">It does not work however when I compile Petsc with debug flag off: </p>
<p style="margin-right: 0px; margin-left: 0px; caret-color: rgb(33, 33, 33); color: rgb(33, 33, 33); font-size: 11px; line-height: normal; font-family: Menlo;">
<span style="font-family: Menlo, serif, EmojiFont;">./configure PETSC_DIR=/Users/zjorti/software/petsc-3.14.5 PETSC_ARCH=macx --with-fc=0 --with-mpi-dir=$HOME/.brew --download-hypre --with-debugging=0 --with-cxx-dialect=C++11</span></p>
<p style="font-size: 12pt;"> </p>
<p style="font-size: 12pt;">I asked a colleague to test this same code. </p>
<p style="font-size: 12pt;">He compiles PETSc with debug flag off, runs the code and it works for him. He has an older machine but we both use the same version PETSc version which is 3.14.5. </p>
<p style="font-size: 12pt;"><br>
</p>
<p style="margin-right: 0px; margin-left: 0px; caret-color: rgb(33, 33, 33); color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px; line-height: normal;">
<font size="3" style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;">As I do not have any </span></font><font style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;">debugger</span></font><font size="3" style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;"> I
could not identify the cause of this runtime error. </span></font></p>
<p style="margin-right: 0px; margin-left: 0px; caret-color: rgb(33, 33, 33); color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px; line-height: normal;">
<font size="3" style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;">One more thing: We did not run the code in parallel. </span></font></p>
<p style="margin-right: 0px; margin-left: 0px; caret-color: rgb(33, 33, 33); color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px; line-height: normal;">
<font size="3" style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;">Is this a hardware related issue or is it something else?</span></font></p>
<p style="margin-right: 0px; margin-left: 0px; caret-color: rgb(33, 33, 33); color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px; line-height: normal;">
<font size="3" style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;">Thanks,</span></font></p>
<p style="margin-right: 0px; margin-left: 0px; caret-color: rgb(33, 33, 33); color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px; line-height: normal;">
<font size="3" style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont;"><br>
</font></p>
<p style="margin-right: 0px; margin-left: 0px; caret-color: rgb(33, 33, 33); color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px; line-height: normal;">
<font size="3" style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;">Zakariae</span></font></p>
<p style="font-size: 12pt;"><br>
</p>
<p style="font-size: 12pt;"><br>
</p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">[0]PETSC ERROR: ------------------------------------------------------------------------</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">[0]PETSC ERROR: or see https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">[0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run </span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">[0]PETSC ERROR: to get more information on the crash.</span></p>
<p style="margin-right: 0px; margin-left: 0px; color: rgb(180, 36, 25); font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;"><b>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</b></span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">[0]PETSC ERROR: Signal received</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">[0]PETSC ERROR: See https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">[0]PETSC ERROR: Petsc Release Version 3.14.5, Mar 03, 2021 </span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">[0]PETSC ERROR: ./mimeticcurleuler2 on a macx named pn2032683.lanl.gov by zjorti Fri Mar 19 16:07:03 2021</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">[0]PETSC ERROR: Configure options PETSC_DIR=/Users/zjorti/software/petsc-3.14.5 PETSC_ARCH=macx --with-fc=0 --with-mpi-dir=/Users/zjorti/.brew --download-hypre --with-debugging=0 --with-cxx-dialect=C++11</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">[0]PETSC ERROR: #1 User provided function() line 0 in unknown file</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">[0]PETSC ERROR: Run with -malloc_debug to check if memory corruption is causing the crash.</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">--------------------------------------------------------------------------</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">with errorcode 50176059.</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal; min-height: 13px;">
<span style="font-family: Menlo, serif, EmojiFont;"></span><br>
</p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">You may or may not see output from other processes, depending on</span></p>
<p style="margin-right: 0px; margin-left: 0px; font-family: Menlo; font-size: 11px; line-height: normal;">
<span style="font-family: Menlo, serif, EmojiFont;">exactly when Open MPI kills them.</span></p>
</div>
</body>
</html>