[petsc-users] Optimized run crashes on one machine but not another

Jed Brown jedbrown at mcs.anl.gov
Wed Aug 28 08:38:11 CDT 2013


Garnet Vaz <garnet.vaz at gmail.com> writes:

> Hi,
>
> I just rebuilt PETSc on both my laptop and my desktop.
> On both machines the output of >grep GIT configure.log
>         Defined "VERSION_GIT" to
> ""d8f7425765acda418e23a679c25fd616d9da8153""
>         Defined "VERSION_DATE_GIT" to ""2013-08-27 10:05:35 -0500""

Thanks for the report.  Matt just merged a bunch of DMPlex-related
branches (about 60 commits in total).  Can you 'git pull && make' to let
us know if the problem is still there?  (It may not fix the issue, but
at least we'll be debugging current code.)

When dealing with debug vs. optimized issues, it's useful to configure
--with-debugging=0 COPTFLAGS='-O2 -g'.  This allows valgrind to include
line numbers, but it (usually!) does not affect whether the error
occurs.

> My code runs on both machines in the debug build without causing
> any problems. When I try to run the optimized build, the code crashes
> with a SEGV fault on my laptop but not on the desktop. I have built
> PETSc using the same configure options.
>
> I have attached the outputs of valgrind for both my laptop/desktop for
> both the debug/opt builds. How can I figure out what differences are
> causing the errors in one case and not the other?

It looks like an uninitialized variable.  Debug mode often ends up
initializing local variables where as optimized leaves junk in them.
Stack allocation alignment/padding is also often different.
Unfortunately, valgrind is less powerful for debugging stack corruption,
so the uninitialized warning is usually the best you get.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130828/5afd08fb/attachment.pgp>


More information about the petsc-users mailing list