Hi guys,<div><br></div><div>I got a dead lock by doing something like this :</div><div><br></div><div>Vec a;</div><div>[...]</div><div>PetscInt n;</div><div>VecNorm(a, NORM_INFINITY, &n);</div><div><br></div><div>PetscScalar* b;</div>
<div>Proc 0 -> VecGetArray(a, &b); [...] VecRestoreArray(a, b);</div><div>Proc 1 -> nothing</div><div><br></div><div>VecNorm(a, NORM_INFINITY, n);<br></div><div><br></div><div>Into VecNorm,<br></div><div>proc 0 stall in MPI_Allreduce</div>
<div>while proc 1 just took the norm into its cache.</div><div><br></div><div>What I understand is that PetscObjectStateIncrease has being called only for proc 0 so that proc 1 doesn't know that the norm must be recalculated.</div>
<div><br></div><div>Should any function that call PetscObjectStateIncrease be consider logically collective?</div><div><br></div><div>I have corrected my own code to use Vec(Get/Restore)Array collectively.</div><div><br></div>
<div>Patrick Lacasse</div><div><br></div><div><br></div>