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

Matthew Knepley knepley at gmail.com
Mon Sep 25 06:48:53 CDT 2023


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
>

1) Use PetscCall() to check all PETSc calls

2) Send the entire error output

  Thanks,

     Matt


> I wonder how this comes out and how the local size could be -1?
>
> Thanks
> Qiyue Lu
>
>
>

-- 
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

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230925/18e77436/attachment.html>


More information about the petsc-users mailing list