[petsc-users] Vec entries altered incorrectly

Matthew Knepley knepley at gmail.com
Sat Dec 17 17:18:45 CST 2011


On Sat, Dec 17, 2011 at 4:55 PM, Juha Jäykkä <juhaj at iki.fi> wrote:

> > This is memory overwriting. Use valgrind to find it.
>
> Valgrind gives it a clean bill of health:
>
> ==30174== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 153 from 1)
> ==30174== malloc/free: in use at exit: 0 bytes in 0 blocks.
> ==30174== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
> ==30174== For counts of detected errors, rerun with: -v
> ==30174== All heap blocks were freed -- no leaks are possible.
>
> What am I actually even looking for? Myself overwriting stuff or a PETSc
> bug?
> I do not quite understand how PETSc even could manage to overwrite
> unrelated
> vectors. Or do you suspect I overwrite the vector structure at somepoint
> and
> that confuses PETSc later on?
>

I guarantee you this is not a bug. This stuff is used by thousands of
people every day.
Its very simple and old code. There is a misunderstanding somewhere in your
code
about how this mechanism works. I suggest stripping down the code until
there are
just two vectors and you alter one. If you send me that, I will go through
it to figure
out what is happening.

    Matt


> Cheers,
> Juha
>
> --
>                 -----------------------------------------------
>                | Juha Jäykkä, juhaj at iki.fi                     |
>                | http://www.maths.leeds.ac.uk/~juhaj           |
>                 -----------------------------------------------
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111217/5a23d79e/attachment.htm>


More information about the petsc-users mailing list