<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="ltr">Usually due to uninitialized variables. You can try valgrind. Read tutorial from page 3 of <a href="https://www.mcs.anl.gov/petsc/petsc-20/tutorial/PETSc1.pdf">https://www.mcs.anl.gov/petsc/petsc-20/tutorial/PETSc1.pdf</a><br clear="all">
<div>
<div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">--Junchao Zhang</div>
</div>
</div>
<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Oct 18, 2019 at 6:23 AM Shidi Yan via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br>
</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;">Dear developers,
<div><br>
</div>
<div>I am using ParMETIS to do dynamic load balancing for the mesh.</div>
<div>If my code is compiled with optimiser options (e.g., -O2 -O3), I have</div>
<div>the following errors when the code calls function from ParMETIS:</div>
<div>
<pre style="white-space:pre-wrap">***ASSERTION failed on line 176 of file</pre>
<div>
<pre style="white-space:pre-wrap">externalpackages/git.parmetis/libparmetis/comm.c: j == nnbrs</pre>
</div>
<pre style="white-space:pre-wrap">externalpackages/git.parmetis/libparmetis/comm.c:176: libparmetis__CommSetup: Assertion `j == nnbrs' failed.</pre>
<div>However, if the code is compiled with debugging mode ( -g), I do</div>
</div>
<div>not have any errors. </div>
<div><br>
</div>
<div>I am wondering is it the bug from my part.</div>
<div><br>
</div>
<div>Thank you very much for your time.</div>
<div><br>
</div>
<div>Kind Regards,</div>
<div>Shidi</div>
</div>
</blockquote>
</div>
</body>
</html>