On Fri, Aug 5, 2011 at 2:33 AM, Debao Shao <span dir="ltr"><<a href="mailto:Debao.Shao@brion.com">Debao.Shao@brion.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>
<div lang="ZH-CN" link="blue" vlink="blue">
<div>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">So the real problem is the wrong usage of “</span></font><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">PetscInitialize(0,
0, 0, 0 )</span></font><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">”, but I do have many successive runs before with this setting.</span></font></p></div>
</div></blockquote><div><br></div><div>Any kind of memory overwrite gives an SEGV. So other code, making a different error will give that too.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="ZH-CN" link="blue" vlink="blue"><div><p class="MsoNormal"><span class="Apple-style-span" style="color: rgb(0, 0, 128); font-family: Arial; font-size: 12px; "> </span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">Thanks,<u></u><u></u></span></font></p>
<p class="MsoNormal"><u></u><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">De</span></font><u></u><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">bao<u></u><u></u></span></font></p>
<div>
<div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt">
<hr size="2" width="100%" align="center">
</span></font></div>
<p class="MsoNormal"><b><font size="2" face="Tahoma"><span lang="EN-US" style="font-size:10.0pt;font-family:Tahoma;font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span lang="EN-US" style="font-size:10.0pt;font-family:Tahoma"> <a href="mailto:petsc-users-bounces@mcs.anl.gov" target="_blank">petsc-users-bounces@mcs.anl.gov</a>
[mailto:<a href="mailto:petsc-users-bounces@mcs.anl.gov" target="_blank">petsc-users-bounces@mcs.anl.gov</a>] <b><span style="font-weight:bold">On Behalf Of
</span></b>Matthew Knepley<br>
<b><span style="font-weight:bold">Sent:</span></b> Friday, August 05, 2011 10:25 AM<br>
<b><span style="font-weight:bold">To:</span></b> <u></u>PETSc users list<u></u><br>
<b><span style="font-weight:bold">Subject:</span></b> Re: [petsc-users] PETSC ERROR: Caught signal number 15 Terminate</span></font><span lang="EN-US"><u></u><u></u></span></p>
</div><div><div></div><div class="h5">
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"><u></u> <u></u></span></font></p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt">On Fri, Aug 5, 2011 at 2:20 AM,
<u></u>De<u></u>bao Shao <<a href="mailto:Debao.Shao@brion.com" target="_blank">Debao.Shao@brion.com</a>> wrote:<u></u><u></u></span></font></p>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div link="blue" vlink="blue">
<div>
<div>
<div>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">DA:
</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy"> </span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">Sometimes I may encounter crashing when using PETSc, it doesn’t
happen always. </span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy"> </span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: ------------------------------------------------------------------------</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: Caught
</span></font><font size="1" color="red" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:red">signal number 15</span></font><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">
Terminate: Somet process (or the batch system) has told this process to end</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: or see
<a href="http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC" target="_blank">
http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#Signal[0]PETSC</a> ERROR: or try
<a href="http://valgrind.org" target="_blank">http://valgrind.org</a> on GNU/linux</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">and Apple Mac OS X to find memory corruption errors</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: configure using --with-debugging=yes, recompile,
link, and run</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: to get more information on the crash.</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: --------------------- Error Message ------------------------------------</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: Signal received!</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: ------------------------------------------------------------------------</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: Petsc Release Version 3.1.0, Patch 8, Thu Mar
17 13:37:48 CDT 2011</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: See docs/changes/index.html for recent updates.</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: See docs/index.html for manual pages.</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: ------------------------------------------------------------------------</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: Unknown Name on a linux-gnu named r0leaf17 by
tachyon Thu Aug 4 04:04:19 2011</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: Libraries linked from /home/dshao/dev_t2k/third_party/OOQP/OOQP-0.99.19/extras/petsc-3.1-p8/linux-gnu-c-debug/lib</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: Configure run at Thu Apr 21 18:09:19 2011</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: Configure options --with-mpi=0 --with-debugging=0
-with-log=0 -with-info=0</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: ------------------------------------------------------------------------</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">[0]PETSC ERROR: User provided function() line 0 in unknown directory
unknown file</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy"> </span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">Do you happen to know the possible cause?</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy"> </span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">I also have a question about the usage of “PetscInitialize” &
“PetscFinalize”. I can’t totally understand them from the manual. </span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy"> </span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">Now, I wrote it as:
</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">Int main(int argc, char **argv)</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">{</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy"> PetscInitialize(0, 0, 0, 0 );</span></font><span lang="EN-US"><u></u><u></u></span></p>
</div>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"><u></u> <u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt">This is not a valid call. Try<u></u><u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"><u></u> <u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"> PetscInitialize(&argc, &argv, 0, 0);<u></u><u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"><u></u> <u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt">Signal 15 is a segmentation fault, which means an illegal memory read or write.<u></u><u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"><u></u> <u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"> Matt<u></u><u></u></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"> <u></u><u></u></span></font></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div link="blue" vlink="blue">
<div>
<div>
<div>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy"> </span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy"> VerifyApp app(argc, argv);</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy"> app.Initialize();</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy"> app.Run();</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy"> </span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy"> PetscFinalize();</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy"> return 0;</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">}</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy"> </span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">Then, built a binary, say “verify”, and executed “verify” on a
server first, then, started another “verify” on client by server. </span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">The program ran at client side can be multiple processes and multiple
threads.</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy"> </span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">Is my usage correct?
</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">Your answer is appreciated.
</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy"> </span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">Thanks,</span></font><span lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><u></u><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">De</span></font><u></u><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">bao</span></font><span lang="EN-US"><u></u><u></u></span></p>
</div>
</div>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"><u></u> <u></u></span></font></p>
<div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt">
<hr size="2" width="100%" align="center">
</span></font></div>
<p class="MsoNormal"><font size="1" color="gray" face="Arial"><span lang="EN-US" style="font-size:7.5pt;font-family:Arial;color:gray">-- The information contained in this communication and any attachments is confidential and may be privileged, and is for the
sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS
basis without any express or implied warranties or liabilities. To the extent you are relying on this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and
destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.</span></font><span lang="EN-US"><u></u><u></u></span></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"><br>
<br clear="all">
<br>
-- <br>
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<u></u><u></u></span></font></p>
</div></div></div><div><div></div><div class="h5">
<br>
<hr>
<font face="Arial" color="Gray" size="1">-- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution
is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities. To the extent you are relying on
this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and
complete transmission of the information contained in this communication, nor for any delay in its receipt.<br>
</font>
</div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>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<br>