[Ipopt] IPOPT uses incorrect number of variables

Seth Watts watts2 at illinois.edu
Mon Jun 18 14:11:04 EDT 2012


Hello all -

I have written a NLP class that uses code I have written using C++ and the
Petsc library to evaluate the objective and constraint functions, their
derivatives, etc. The number of parameters is set at run-time by reading in
a value from an input file. Although I have confirmed that this value (128)
is read in correctly and passed to my class file correctly, IPOPT appears
to act as though there is only one variable. That is the number displayed
in the summary table (Total number of
variables............................:        1) and when I have the
parameters sent to the screen, only the first value changes - the others
remain zero (or at least on the order of 1e-310).  Additionally, despite
setting number of constraint functions to 5 and number of nonzeros in jac_g
as 5*n = 640, the summary table shows only 5 nonzeros in jac_g. However,
the value of 'n' in each of the class methods is the correct value of 128.

I can't reproduce this problem with simple toy problems; that is, if I make
a simple MyNLP class file for which n is set to 128, m to 5, and nnz_jac_g
to 640, IPOPT runs correctly, the right values appear in the summary table,
and so on. This leads me to suspect the problem is in something I have done
in my class definition, but I don't know what it could be. In the
get_starting_point method, the values returned to x are as I intend, but
the next time a new_x flag is true and I print out the parameters, all but
the first value have been set to near-zero values.

I am running IPOPT version 3.10, checked out via subversion last week. I am
using MUMPS as my linear solver. I am using the quasi-Newton option so that
I do not supply the Hessian matrix (as it is both dense and expensive to
compute). I am running Ubuntu 12.04 64-bit.

Thanks in advance for any suggestions you might have.

- Seth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20120618/134f0720/attachment.html>


More information about the Ipopt mailing list