[petsc-users] DMDAVecGetArray

anton popov at uni-mainz.de
Thu Apr 23 08:41:37 CDT 2015


On 04/23/2015 01:36 PM, Matthew Knepley wrote:
> On Thu, Apr 23, 2015 at 6:28 AM, anton <popov at uni-mainz.de 
> <mailto:popov at uni-mainz.de>> wrote:
>
>     Hi,
>
>     I'm currently calling DMDAVecGet(Restore)Array on a subset of
>     processors. It seems to work correctly. So why does documentation
>     say they are collective on Vec? Are they really? Unlike VecNorm,
>     for example, it's not really clear why DMDAVecGetArray should be
>     collective.
>
>
> The documentation should be fixed. Its "logically collective" just 
> like VecGetArray(), and unlike VecGetArrayRead().
>
>     Am I still on a safe side, or I'm seriously violating something
>     that's not immediately obvious.
>
>
> You are violating something that is not obvious. GetArray() will 
> increment the status marker on the Vec since you
> could have changed something, but then you will get inconsistency 
> across processes in this marker, so you could
> make different decisions about whether to recompute norms, etc. Hard 
> to debug errors.
>

OK, thanks Matt, I'll simply add dummy calls on those processes where I 
don't need the data.

Anton

>   Thanks,
>
>      Matt
>
>     Thanks,
>     Anton
>
>
>
>
> -- 
> 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/20150423/1ddfef73/attachment.html>


More information about the petsc-users mailing list