[ADOL-C] Incorrect calculus of hessian

Andrea Walther andrea.walther at uni-paderborn.de
Tue Jul 5 08:34:33 EDT 2011


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


	options[1] = 0;  // meaning direct recovery

    works OK

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.

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

Prof. Dr. Andrea Walther
Lehrstuhl fuer Mathematik und ihre Anwendungen
Institut fuer Mathematik
Universitaet Paderborn
Warburger Str. 100
33098 Paderborn

Email: andrea.walther at uni-paderborn.de
Phone: ++49 5251 602721
Fax:   ++49 5251 603728


More information about the ADOL-C mailing list