[ADOL-C] Mismatched free() / delete / delete [] in documentation examples..

Antonello Lobianco antonello at lobianco.org
Thu Aug 30 04:20:04 EDT 2012

Hello, sorry to bother the list again.
 I am trying to run adol-c together with IPOPT (upstream) and ColPack
(downstream) in order to run an economic model.
I am now using ADOL-C 2.3.0 and ColPack 1.0.8 and I am taking the
LuksanVlcek1_sparse as example for my model (from folder
As suggested by Assefaw Gebremedhin (ColPack, thank you) I slightly
modified the code in order to run it several times placing in function
generate_tapes() this->jacval=NULL and this->hessval=NULL instead of
However this doesn't seems to be the cause of the problem, as I run
valgrind with and without it and the mismatch errors are the same.
You can find the complete example with the modified source code and the
valgrind output here:
The title is "working" because... both the example code and my real-case
model in Linux despite the mismatch errors they works. However as I moved
to Windows I started to get a segfault on my real-case model depending on
the amount of input data (number of variables in the model to optimise).
And then I noticed that increasing HPOFF (defined in ADOL-C_sparseNLP.hpp)
from 30 to 60 I was ok.

So, basically what is HPOFF ? is there a way to get it automatically size
depending on the dimensions of the problem, so it never crash whatever the
data ?
Pierre, for bocop did you use the examples in the ADOL-C repository as
starting point or did you develop your code from scratch ?


Antonello Lobianco
INRA, Laboratoire d'Economie Forestière
14 Rue Girardet - 54000 Nancy, France
Tel: +33.652392310
Email: antonello.lobianco at nancy-engref.inra.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/adol-c/attachments/20120830/2ebf6971/attachment.html>

More information about the ADOL-C mailing list