`SNESMSStep_3Sstar()` Invalid Use Of `VecMAXPY()`
SNESMSStep_3Sstar()
calls VecMAXPY(Vec y, ..., Vec x[])
where y
is in x[]
. As per VecMAXPY()
documentation:
Notes:
y cannot be any of the x vectors
Indeed one finds (starting at src/snes/impls/ms/ms.c:247
):
Vec Ss[4];
// ...
Ss[0] = S1;
// ...
PetscCall(VecMAXPY(S1,4,scoeff,Ss));
// ^^~~~~~~~~~~^^ S1 = Ss[0], not allowed!
As per
$ git blame -L:SNESMSStep_3Sstar --ignore-rev 9566063d113 --ignore-rev 5f80ce2ab25 -- ${PETSC_DIR}/src/snes/impls/ms/ms.c
(9566063d113
and 5f80ce2ab25
were the big CHKERRQ()
and PetscCall()
commits) this was introduced in 37e1895a, with the note on not allowing overlap introduced in 31f78ffa.
So which is right?