[ADOL-C] hessian and tensor_eval speed issues

Giacomo Perantoni giacomo.perantoni at new.ox.ac.uk
Fri Oct 28 04:31:08 EDT 2011


Hello,

I tried to compute the hessian for the Speelpenning problem
both using the function hessian() and tensor_eval(),
and it happens that the second is much slower for an increasing number of independent variables (do not know for a small number).

Does anybody know the reason of this?

Then I also tried to implement a version of hessian() for a vector valued function (7 dependent, ~30 dependent variables) in order to compare it to tensor_eval() in computation speed.
I checked that the hessian evaluation is correct and the speed is the same as hessian() in a scalar case.
The function in question represents the equations of motion for a mechanical system and is computed through the generation of approx. 1000 intermediate variables with trigonometric and polynomial functions (honestly I did not check the function evaluation time).
The hessian matrix happens to be sparse with a 2% of non-zero elements (this might be relevant for the question).

The tensor_eval() performed better than the vectorial version of hessian() this time, and just reading the online manual I cannot really figure out the reason.

What could be the reason of this "inconsistency"?
(does tensor_eval() exploit sparsity?)

Thank you,
Giacomo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/adol-c/attachments/20111028/c6b5d5eb/attachment.html>


More information about the ADOL-C mailing list