What version of PETSc are you using and are you using the standard precision 
and scalar so that PetscScalar is  double precision?

   Also what Fortran compiler?

   Barry




> On Aug 16, 2019, at 11:21 AM, José Lorenzo via petsc-users 
> <[email protected]> wrote:
> 
> Hello,
> 
> I am struggling with a strange error when using VecAXPY. I have a ghost 
> vector H that needs to be updated as
> 
> H = H + eta * dH - eta_old * dH
> 
> However, for some reason I obtain different results when using 
> 
> call VecAXPY(H, eta - eta_old, dH, ierr)
> 
> instead of
> 
> call VecAXPY(H, - eta_old, dH, ierr)
> 
> call VecAXPY(H, eta, dH, ierr)
> 
> where eta and eta_old are PetscScalars.
> 
> The first option seems to provide a wrong output, but I do not understand 
> what can go wrong in such simple operation.
> 
> Thank you.
> 

Reply via email to