<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang="ZH-CN" link="blue" vlink="blue">
<div class="Section1">
<p class="MsoNormal"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;font-family:Arial;color:navy">(gdb) bt<o:p></o:p></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&nbsp; 0x000000360462e21d in raise () from /lib64/tls/libc.so.6<o:p></o:p></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">#1&nbsp; 0x000000360462fa1e in abort () from /lib64/tls/libc.so.6<o:p></o:p></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">#2&nbsp; 0x0000000002256329 in Petsc_MPI_Abort ()<o:p></o:p></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">#3&nbsp; 0x00000000023fa16b in PetscOptionsInsert ()<o:p></o:p></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">#4&nbsp; 0x00000000023fbe45 in PetscOptionsFindPair_Private ()<o:p></o:p></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">#5&nbsp; 0x00000000023fd5af in PetscOptionsGetString ()<o:p></o:p></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">#6&nbsp; 0x0000000002339d26 in MatMFFDInitializePackage ()<o:p></o:p></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">#7&nbsp; 0x00000000022a2660 in MatInitializePackage ()<o:p></o:p></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">#8&nbsp; 0x0000000002343c4e in MatCreate ()<o:p></o:p></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"><o:p>&nbsp;</o:p></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"><o:p>&nbsp;</o:p></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">1, does petsc support multiple threads, if I compiled libpetsc.a with &#8211;with-mpi=0?<o:p></o:p></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">2, is the following usage right?<o:p></o:p></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">While(1)<o:p></o:p></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">{<o:p></o:p></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">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ReceiveJobfromServer();<o:p></o:p></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">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;
font-family:Arial;color:navy">PetscInitialize();&nbsp; //to avoid a SIGTERM error, I move the call of PetscInitialize into the loop.<o:p></o:p></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">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; handleJob();<o:p></o:p></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">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PetscFinalize();</span></font><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;
font-family:Arial;color:navy"><o:p></o:p></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">}<o:p></o:p></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"><o:p>&nbsp;</o:p></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,<o:p></o:p></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">Debao<o:p></o:p></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" tabindex="-1">
</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"> petsc-users-bounces@mcs.anl.gov
 [mailto:petsc-users-bounces@mcs.anl.gov] <b><span style="font-weight:bold">On Behalf Of
</span></b>Aron Ahmadia<br>
<b><span style="font-weight:bold">Sent:</span></b> Tuesday, August 09, 2011 4:39 PM<br>
<b><span style="font-weight:bold">To:</span></b> PETSc users list<br>
<b><span style="font-weight:bold">Subject:</span></b> Re: [petsc-users] PETSC ERROR: PetscFinalize() line 968 in src/sys/objects/pinit.c</span></font><span lang="EN-US"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"><o:p>&nbsp;</o:p></span></font></p>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt">Debao,<o:p></o:p></span></font></p>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"><o:p>&nbsp;</o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt">What is the complete traceback for this problem? &nbsp;<o:p></o:p></span></font></p>
</div>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"><o:p>&nbsp;</o:p></span></font></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt">A<o:p></o:p></span></font></p>
<div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt">On Tue, Aug 9, 2011 at 11:12 AM, Debao Shao &lt;<a href="mailto:Debao.Shao@brion.com">Debao.Shao@brion.com</a>&gt; wrote:<o:p></o:p></span></font></p>
<div link="blue" vlink="purple">
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="1" color="navy" face="Arial"><span lang="IT" style="font-size:9.0pt;font-family:
Arial;color:navy">DA,
</span></font><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="1" color="navy" face="Arial"><span lang="IT" style="font-size:9.0pt;font-family:
Arial;color:navy">&nbsp;</span></font><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><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 what may cause this error?</span></font><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;
font-family:Arial;color:navy">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;[0]PETSC ERROR: PetscFinalize() line 968 in src/sys/objects/pinit.c&#8221;</span></font><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;
font-family:Arial;color:navy">&nbsp;</span></font><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;
font-family:Arial;color:navy">After reporting this error, the job can run continued, but it
 will aborted when encountering next petsc related features even with calling PetscInitialize() again, and say:</span></font><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;
font-family:Arial;color:navy">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8220;Options have not been enabled.</span></font><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;
font-family:Arial;color:navy">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; You might have forgotten to call PetscInitialize().&#8221;</span></font><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;
font-family:Arial;color:navy">&nbsp;</span></font><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;
font-family:Arial;color:navy">Here is line 968:</span></font><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="1" color="navy" face="Arial"><span lang="EN-US" style="font-size:9.0pt;
font-family:Arial;color:navy">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></font><font size="1" color="blue" face="Arial"><span lang="IT" style="font-size:9.0pt;font-family:
Arial;color:blue">ierr = MPI_Finalize();CHKERRQ(ierr);</span></font><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="1" color="navy" face="Arial"><span lang="IT" style="font-size:9.0pt;font-family:
Arial;color:navy">&nbsp;</span></font><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="1" color="navy" face="Arial"><span lang="IT" style="font-size:9.0pt;font-family:
Arial;color:navy">Thanks,</span></font><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><font size="1" color="navy" face="Arial"><span lang="IT" style="font-size:9.0pt;font-family:
Arial;color:navy">Debao</span></font><span lang="EN-US"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"><o:p>&nbsp;</o:p></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"><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span lang="EN-US" style="font-size:12.0pt"><o:p>&nbsp;</o:p></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>
</body>
</html>