Hey Satish,<br><br>So I'm having an issue with this function: <br><br><pre width="80"><a name="137f0dc3f84a4269_137f0d945cee9910_line559"></a><b><font color="#228B22">#define <a href="http://www.mcs.anl.gov/petsc/petsc-current/include/petsc-private/docs/manualpages/Sys/PetscObjectComposedDataGetReal.html#PetscObjectComposedDataGetReal" target="_blank">PetscObjectComposedDataGetReal</a>(obj,id,data,flag) \</font></b>
<a name="137f0dc3f84a4269_137f0d945cee9910_line560"></a><b><font color="#228B22">((((obj)->realcomposedstate && ((obj)->realcomposedstate[id] == (obj)->state))? \</font></b>
<a name="137f0dc3f84a4269_137f0d945cee9910_line561"></a><b><font color="#228B22">(data = (obj)->realcomposeddata[id],flag = <a href="http://www.mcs.anl.gov/petsc/petsc-current/include/petsc-private/docs/manualpages/Sys/PETSC_TRUE.html#PETSC_TRUE" target="_blank">PETSC_TRUE</a>) : (flag = <a href="http://www.mcs.anl.gov/petsc/petsc-current/include/petsc-private/docs/manualpages/Sys/PETSC_FALSE.html#PETSC_FALSE" target="_blank">PETSC_FALSE</a>)),0)</font></b></pre>
<br>Called from VecNorm which is called from SNESLineSearchApply_BT<br><br>I
have two examples running one is the vanilla ex14 using my GPU vector
and matrix type. The other example is a variant of ex14test where I am
implementing GPU formfunction and formjacobian.<br>
ex14 vanilla runs through correctly, however ex14test diverges in the logic within VecNorm, specifically line 164:<br> /*<br> * Cached data?<br> */<br> if (type!=NORM_1_AND_2) {<br> ierr = PetscObjectComposedDataGetReal<div id=":2su">
((PetscObject)x,NormIds[type],*val,flg);CHKERRQ(ierr);<br>
if (flg) PetscFunctionReturn(0);<br> }<br><br>The ex14 detects there is a "real" part, however the ex14test does not and VecNorm returns. <br><br>"val" in VecNorm is PetscReal gnorm = fnorm defined in SNESLineSearchApply_BT. <br>
For ex14: val[0]=3.44e-317, val[1]: 0.580<br>For ex14test: val[0]=3.44e-317, val[1]: 0.029<br><br><br>This difference makes SNESLineSearchApply_BT branch into different execution paths.<br><br>I'm not sure where the issue could have come from. Any ideas?</div>
<br clear="all"><br>-- <br>Daniel Lowell<br><br>