[ADOL-C] Incorrect calculus of hessian

Christian ChristianLupus at gmx.de
Tue Jul 5 14:23:25 EDT 2011


Hello,

vom Tuesday 05 July 2011 14:34:33:
> Hi,
> 
> two points lead to the wrong derivatives found by the
> derivative checker:
> 
> 1) the recovery algorithm used for the sparse Hessian
> 
>     you used in line 114/115
> 
> 	options[0] = 0;
> 	options[1] = 1;  // meaning indirect recovery
> 
>     the indirect recovery has the advantage that the number of
>     derivative compuations is smaller compared to the direct recovery.
>     However, there seems to be a bug in the recovery algorithm.
>     Since this is due to the ColPack I would like to report them on this
>     problem. Would it be OK for you if I send them your code as
>     example?
> 
>     Using
> 
> 	options[1] = 0;  // meaning direct recovery
> 
>     works OK

You mean the other way around, don't you? If I use options[1]=0 I get the 
error with 1 I do not get it.

But thanks for that hint. The derivative checker work now fine.

As I posted the code online I have already published it. So there is not 
problem if you would send the code to the ColPack mantainers.

> 
> 2) Unfortunately, ADOL-C is not consistent with handling symmetry.
>    The sparsity pattern returned by sparse_hessian provides information
>    for the upper half instead of the lower half as provided by the
>    hessian driver
> 
>    Hence changing line 138  to
> 
>           if(rindHess[i] < n && cindHess[i] >= rindHess[i]){
> 
>    using >= instead of <= and line 545 to
> 
>           if(rindHess[i] < n && cindHess[i] >= rindHess[i]){
> 
>    again using >= instead of <=
> 
> should do the job.

I think you have done some smaller changes. I get a malloc memory corruption 
when I change these two lines.
Would it be possible, if you send me your modified code so can make a diff on it 
versus my local version (maybe I have made a small change and forgotten)?

> 
> At least on my computer the derivative checker does not report
> any error when incorporating these changes. I hope this is the
> same on yours.
> 
> Best regards,
> 
> Andrea Walther

Thanks a lot for that

Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://list.coin-or.org/pipermail/adol-c/attachments/20110705/e1b15f05/attachment.bin 


More information about the ADOL-C mailing list