<div dir="ltr"><div>Hi</div><div> </div><div>I am a rookie to PETSc, and I am wondering about whether I should call MPI_Barrier to explicitly synchronize processes between PETSc calls.</div><div>For example, a piece of code like below</div>
<div><div><br></div><div>  ierr = MatMult(A,x,Ax); CHKERRQ(ierr);</div><div>  ierr = VecWAXPY(r, neg_one, Ax, b);CHKERRQ(ierr);</div></div><div><br></div><div>Should I add MPI_Barrier inbetween MatMult call and VecWAXPY call ?</div>
<div><br></div><div>My guess is that it is unnecessary. However, I am not so confident in this guess, for I don't have much experience on using PETSc.</div><div><br></div><div>Thanks in advance.</div><div><br></div><div>
Cong Li</div></div>