<div dir="ltr">Hi,<br><br>I have a strange problem when using adol-c to create a gradient.<br>Before I try to prevent re-taping, I am currently retaping before each gradient evaluation.<br><br>The general structure of the code is :<br>
<br> trace_on(0);<br> for (int i=0; i<N; i++)<br> {<br> rawGradParams[i] <<= X[i];<br> }<br> adouble result = objective(rawGradParams);<br> double retVal;<br> result >>= retVal;<br>
trace_off(0);<br><br> int gradientRetVal = gradient(0,N,X,G);<br><br>And I get -1 as the retVal, with the error being<br><br>"ADOL-C Warning: Branch switch detected in comparison "<br> "(operator eq_zero).\n"<br>
"Forward sweep aborted! Retaping recommended!\n");<br><br>Seeing as retaping won't do anything, I don't know how to attack this problem.<br>The code of the objective function is rather long and sadly I can't post it. Does anyone have any general ideas on how to attack this problem?<br>
<br><br><br><br></div>