[petsc-users] VecScale failed because the local size mismatch

Mark Adams mfadams at lbl.gov
Mon Sep 25 06:15:20 CDT 2023


That is strange.

Do you have the error handling code in VecSet that you are just not showing
here?

This error comes from VecSetSizes.

Mark


On Sun, Sep 24, 2023 at 3:49 PM Qiyue Lu <qiyuelu1 at gmail.com> wrote:

> Hello,
> I have a vector (petsc_temp2) with size 1182 on my laptop without MPI.
> However, when I tried to call
> VecScale(petsc_temp2,  1.0/2.0);
> It failed with
> Cannot change/reset vector sizes to -1 local 1182 global after previously
> setting them to 1182 local 1182 global
>
> I wonder how this comes out and how the local size could be -1?
>
> Thanks
> Qiyue Lu
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230925/148a2689/attachment.html>


More information about the petsc-users mailing list