<div dir="ltr">On Wed, Aug 28, 2013 at 3:04 PM, Garnet Vaz <span dir="ltr"><<a href="mailto:garnet.vaz@gmail.com" target="_blank">garnet.vaz@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Matt,<br></div><div><br>I just built the 3.4.2 release in the hope that it will work. It was working fine for the 'next'<br>
</div>branch until a recent update last night. I updated my laptop/desktop with a 1/2 hour<br>
</div><div>gap which caused crashes in one build but not in the other. Hence, I moved to the<br></div><div>3.4.2 release.<br></div><div><br>I will rebuild using the current 'next' and let you know if there are any problems.</div>
</div></div></blockquote><div><br></div><div>Can you send configure.log? I built against OpenMPI and it looks like a get a similar error</div><div>which is not there with MPICH. Trying to confirm now.</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 dir="ltr"><div>Thanks.<br><br>-<br></div>Garnet <br><div><div><div><div><br></div></div>
</div></div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Wed, Aug 28, 2013 at 12:51 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>On Wed, Aug 28, 2013 at 1:58 PM, Garnet Vaz <span dir="ltr"><<a href="mailto:garnet.vaz@gmail.com" target="_blank">garnet.vaz@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Matt,<br><br></div>Attached is a folder containing the code and a sample mesh.<br></div></div>
</blockquote><div><br></div></div><div>I have built and run it here with the 'next' branch from today, and it does not crash.</div><div>What branch are you using?</div><div><br></div><div> Matt</div><div><div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div></div><div><div>Thanks for the help.<br></div><div><br>-<br></div>Garnet<br></div></div><div class="gmail_extra"><div><div><br><br>
<div class="gmail_quote">On Wed, Aug 28, 2013 at 11:43 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>On Wed, Aug 28, 2013 at 12:52 PM, Garnet Vaz <span dir="ltr"><<a href="mailto:garnet.vaz@gmail.com" target="_blank">garnet.vaz@gmail.com</a>></span> wrote:<br></div><div class="gmail_extra">
<div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Thanks Jed. I did as you told and the code finally crashes on both<br></div>builds. I installed the 3.4.2 release now.<br>
<br></div><div>The problem now seems to come from DMPlexDistribute(). I have two<br>
versions to load the mesh. One creates a mesh using Triangle<br>from PETSc and the other loads a mesh using DMPlexCreateFromCellList().<br><br></div><div>Is the following piece of code for creating a mesh using Triangle right?<br>
</div></div></blockquote><div><br></div></div><div>Okay, something is really very wrong here. It is calling EnlargePartition(), but for</div><div>that path to be taken, you have to trip and earlier exception. It should not be possible</div>
<div>to call it. So I think you have memory corruption somewhere.</div><div><br></div><div>Can you send a sample code we can run?</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div><div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div></div><div> ierr = DMPlexCreateBoxMesh(comm,2,interpolate,&user->dm);CHKERRQ(ierr);<br> if (user->dm) {<br> DM refinedMesh = NULL;<br> DM distributedMesh = NULL;<br>
ierr = DMPlexSetRefinementLimit(user->dm,refinementLimit);CHKERRQ(ierr);<br>
ierr = DMRefine(user->dm,PETSC_COMM_WORLD,&refinedMesh);CHKERRQ(ierr);<br> if (refinedMesh) {<br> ierr = DMDestroy(&user->dm);CHKERRQ(ierr);<br> user->dm = refinedMesh;<br> }<br> ierr = DMPlexDistribute(user->dm,"chaco",1,&distributedMesh);CHKERRQ(ierr);<br>
if (distributedMesh) {<br> ierr = DMDestroy(&user->dm);CHKERRQ(ierr);<br> user->dm = distributedMesh;<br> }<br> }<br><br></div><div>Using gdb, the code gives a SEGV during distribution. The backtrace when the fault<br>
</div><div>occurs points to an invalid pointer for ISGetIndices(). Attached is a screenshot of the<br>gdb backtrace. <br>Do I need to set up some index set here?<br></div><div><br></div><div>The same error occurs when trying to distribute a mesh using DMPlexCreateFromCellList().<br>
<br></div><div>Thanks for the help.<br></div><div><br><br>-<br></div><div>Garnet<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 28, 2013 at 6:38 AM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Garnet Vaz <<a href="mailto:garnet.vaz@gmail.com" target="_blank">garnet.vaz@gmail.com</a>> writes:<br>
<br>
> Hi,<br>
><br>
> I just rebuilt PETSc on both my laptop and my desktop.<br>
> On both machines the output of >grep GIT configure.log<br>
> Defined "VERSION_GIT" to<br>
> ""d8f7425765acda418e23a679c25fd616d9da8153""<br>
> Defined "VERSION_DATE_GIT" to ""2013-08-27 10:05:35 -0500""<br>
<br>
</div>Thanks for the report. Matt just merged a bunch of DMPlex-related<br>
branches (about 60 commits in total). Can you 'git pull && make' to let<br>
us know if the problem is still there? (It may not fix the issue, but<br>
at least we'll be debugging current code.)<br>
<br>
When dealing with debug vs. optimized issues, it's useful to configure<br>
--with-debugging=0 COPTFLAGS='-O2 -g'. This allows valgrind to include<br>
line numbers, but it (usually!) does not affect whether the error<br>
occurs.<br>
<div><br>
> My code runs on both machines in the debug build without causing<br>
> any problems. When I try to run the optimized build, the code crashes<br>
> with a SEGV fault on my laptop but not on the desktop. I have built<br>
> PETSc using the same configure options.<br>
><br>
> I have attached the outputs of valgrind for both my laptop/desktop for<br>
> both the debug/opt builds. How can I figure out what differences are<br>
> causing the errors in one case and not the other?<br>
<br>
</div>It looks like an uninitialized variable. Debug mode often ends up<br>
initializing local variables where as optimized leaves junk in them.<br>
Stack allocation alignment/padding is also often different.<br>
Unfortunately, valgrind is less powerful for debugging stack corruption,<br>
so the uninitialized warning is usually the best you get.<span><font color="#888888"><br>
</font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><br>-- <br>Regards,<div>Garnet</div>
</font></span></div>
</blockquote></div></div></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <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
</font></span></div></div>
</blockquote></div><br><br clear="all"><br></div></div><span><font color="#888888">-- <br>Regards,<div>Garnet</div>
</font></span></div>
</blockquote></div></div></div><div><div><br><br clear="all"><div><br></div>-- <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
</div></div></div></div>
</blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><font color="#888888">-- <br>Regards,<div>Garnet</div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <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
</div></div>