[petsc-users] Vec entries altered incorrectly
Matthew Knepley
knepley at gmail.com
Mon Dec 19 13:26:42 CST 2011
On Mon, Dec 19, 2011 at 1:18 PM, Juha Jäykkä <juhaj at iki.fi> wrote:
> > I guarantee you this is not a bug. This stuff is used by thousands of
> > people every day.
>
> That's what I thought, too.
>
> > 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.
>
> Stripping it down will take a while, it is a relatively long piece, but I
> did
> notice something that strikes me as odd:
>
> What is the correct Fields.hdr.state at the point before calling
> DAGlobalToLocalBegin()? My two vectors have a different value there and I
> suspect that might be the reason. (The other vec has state 4, the other has
>
I assume you mean the 'state' field for the 'hdr' struct. This is just a
counter
that gets incremented when something changes, so cached values can be
recomputed.
Matt
> If that is so, how can that happen? I have checked quite a few times that
> all
> DAGlobalToLocalBegin's have the corresponding End-call, that I pair every
> DAVecGetArray with DAVecRestoreArray, and every DAGetLocalVector with
> DARestoreLocalVector. Does the order in which I process the vectors matter
> here? The order of DAGetLocalVector, DAGlobalToLocalBegin/End, and
> DAVecGetArray for each vector obviously matters.
>
> 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/20111219/eba6f74e/attachment-0001.htm>
More information about the petsc-users
mailing list