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 <qiyue...@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
>
>
>

Reply via email to