[ADOL-C] Branch switch when using same inputs as taping

Noam Gat noam.gat at mail.huji.ac.il
Mon Jun 20 08:35:32 EDT 2011


I have a strange problem when using adol-c to create a gradient.
Before I try to prevent re-taping, I am currently retaping before each
gradient evaluation.

The general structure of the code is :

    for (int i=0; i<N; i++)
        rawGradParams[i] <<= X[i];
    adouble result = objective(rawGradParams);
    double retVal;
    result >>= retVal;

    int gradientRetVal = gradient(0,N,X,G);

And I get -1 as the retVal, with the error being

"ADOL-C Warning: Branch switch detected in comparison "
                                "(operator eq_zero).\n"
                                "Forward sweep aborted! Retaping

Seeing as retaping won't do anything, I don't know how to attack this
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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/adol-c/attachments/20110620/e2690e41/attachment.html 

More information about the ADOL-C mailing list