On Fri, Aug 5, 2011 at 2:20 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>
<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:
<u></u><u></u></span></font></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"><u></u> <u></u></span></font></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.
<u></u><u></u></span></font></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"><u></u> <u></u></span></font></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: ------------------------------------------------------------------------<u></u><u></u></span></font></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<u></u><u></u></span></font></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<u></u><u></u></span></font></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<u></u><u></u></span></font></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<u></u><u></u></span></font></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<u></u><u></u></span></font></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.<u></u><u></u></span></font></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 ------------------------------------<u></u><u></u></span></font></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!<u></u><u></u></span></font></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: ------------------------------------------------------------------------<u></u><u></u></span></font></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<u></u><u></u></span></font></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.<u></u><u></u></span></font></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.<u></u><u></u></span></font></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.<u></u><u></u></span></font></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: ------------------------------------------------------------------------<u></u><u></u></span></font></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<u></u><u></u></span></font></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<u></u><u></u></span></font></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<u></u><u></u></span></font></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<u></u><u></u></span></font></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: ------------------------------------------------------------------------<u></u><u></u></span></font></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<u></u><u></u></span></font></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"><u></u> <u></u></span></font></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?<u></u><u></u></span></font></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"><u></u> <u></u></span></font></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.
<u></u><u></u></span></font></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"><u></u> <u></u></span></font></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:
<u></u><u></u></span></font></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)<u></u><u></u></span></font></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">{<u></u><u></u></span></font></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></p></div></div></div></div></blockquote>
<div><br></div><div>This is not a valid call. Try</div><div><br></div><div> PetscInitialize(&argc, &argv, 0, 0);</div><div><br></div><div>Signal 15 is a segmentation fault, which means an illegal memory read or write.</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><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"><u></u><u></u></span></font></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"><u></u> <u></u></span></font></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);<u></u><u></u></span></font></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();<u></u><u></u></span></font></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();<u></u><u></u></span></font></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"><u></u> <u></u></span></font></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();<u></u><u></u></span></font></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;<u></u><u></u></span></font></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">}<u></u><u></u></span></font></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"><u></u> <u></u></span></font></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.
<u></u><u></u></span></font></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.<u></u><u></u></span></font></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"><u></u> <u></u></span></font></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?
<u></u><u></u></span></font></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.
<u></u><u></u></span></font></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"><u></u> <u></u></span></font></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>
</div>
<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>
</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>