[Ipopt] Compiling test programs in Visual Studio.
Krish Krishnan
rkrishnan8216 at yahoo.com
Thu Jun 5 21:45:44 EDT 2008
Thanks Stefan! You put me in the right direction. I added back libcmt.lib and took out msvcrt.lib and it worked.
Thanks again.
Krish
----- Original Message ----
From: "ipopt-request at list.coin-or.org" <ipopt-request at list.coin-or.org>
To: ipopt at list.coin-or.org
Sent: Thursday, June 5, 2008 9:30:02 PM
Subject: Ipopt Digest, Vol 42, Issue 4
Send Ipopt mailing list submissions to
ipopt at list.coin-or.org
To subscribe or unsubscribe via the World Wide Web, visit
http://list.coin-or.org/mailman/listinfo/ipopt
or, via email, send a message with subject or body 'help' to
ipopt-request at list.coin-or.org
You can reach the person managing the list at
ipopt-owner at list.coin-or.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Ipopt digest..."
Today's Topics:
1. Bound-constrained solution worst than initial guess
(Rafael de Pelegrini Soares)
2. Compiling test programs in Visual Studio 2005 (Krish Krishnan)
3. Re: Compiling test programs in Visual Studio 2005
(Stefan Vigerske)
----------------------------------------------------------------------
Message: 1
Date: Wed, 04 Jun 2008 17:20:31 -0300
From: Rafael de Pelegrini Soares <rafael at vrtech.com.br>
Subject: [Ipopt] Bound-constrained solution worst than initial guess
To: ipopt at list.coin-or.org
Message-ID: <1212610831.9536.8.camel at malory.enq.ufrgs.br>
Content-Type: text/plain; charset=UTF-8
Dear all,
I'm trying to solve a small bound-constrained problem with Ipopt. I'm
giving the analytic first-order derivatives and no hessian information.
The problem is, I have a very good initial estimation of the optimum.
With my initial estimative, the objective function evaluates to
-2.6903480e+01. My initial estimate is feasible with respect to the
bounds and there is no additional constraints. My doubt is: how can
Ipopt find a solution which is worst ?(-2.6826471985692432e+01) than my
initial guess, if the initial guess is a feasible solution? Is that
something related with the tolerances or options?
Thank you in advance.
By the way, the derivative checker cannot find any errors on my
derivatives.
It follows the output for the problem:
******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear
optimization.
Ipopt is released as open source code under the Common Public License
(CPL).
For more information visit http://projects.coin-or.org/Ipopt
******************************************************************************
NOTE: You are using Ipopt by default with the MUMPS linear solver.
Other linear solvers might be more efficient (see Ipopt
documentation).
This is Ipopt version 3.4trunk, running with linear solver mumps.
Number of nonzeros in equality constraint Jacobian...: 0
Number of nonzeros in inequality constraint Jacobian.: 0
Number of nonzeros in Lagrangian Hessian.............: 0
Total number of variables............................: 6
variables with only lower bounds: 0
variables with lower and upper bounds: 6
variables with only upper bounds: 0
Total number of equality constraints.................: 0
Total number of inequality constraints...............: 0
inequality constraints with only lower bounds: 0
inequality constraints with lower and upper bounds: 0
inequality constraints with only upper bounds: 0
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du
alpha_pr ls
0 -2.6903480e+01 0.00e+00 1.23e+00 0.0 0.00e+00 - 0.00e+00
0.00e+00 0
1 -2.6773883e+01 0.00e+00 1.25e+00 -0.8 1.58e-01 - 9.66e-01
1.00e+00f 1
2 -2.6762138e+01 0.00e+00 5.53e-01 -0.8 4.36e-01 - 1.00e+00
1.00e+00f 1
3 -2.6765537e+01 0.00e+00 2.97e-02 -1.5 2.85e-02 - 1.00e+00
1.00e+00f 1
4 -2.6782839e+01 0.00e+00 1.26e-01 -2.3 5.76e-02 - 1.00e+00
1.00e+00f 1
5 -2.6813428e+01 0.00e+00 9.97e-02 -2.3 1.12e-01 - 1.00e+00
1.00e+00f 1
6 -2.6818494e+01 0.00e+00 8.18e-02 -2.3 6.85e-02 - 1.00e+00
1.00e+00f 1
7 -2.6823893e+01 0.00e+00 3.77e-02 -2.3 5.74e-02 - 1.00e+00
1.00e+00f 1
8 -2.6826132e+01 0.00e+00 3.05e-02 -3.4 9.18e-02 - 9.46e-01
1.00e+00f 1
9 -2.6826319e+01 0.00e+00 1.36e-02 -3.4 2.51e-02 - 1.00e+00
1.00e+00f 1
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du
alpha_pr ls
10 -2.6826439e+01 0.00e+00 2.99e-02 -3.4 1.12e-02 - 1.00e+00
1.00e+00f 1
11 -2.6826454e+01 0.00e+00 8.72e-03 -3.4 9.73e-03 - 1.00e+00
5.00e-01f 2
12 -2.6826465e+01 0.00e+00 6.14e-04 -3.4 2.86e-03 - 1.00e+00
1.00e+00f 1
13 -2.6826472e+01 0.00e+00 3.36e-04 -5.2 2.59e-03 - 1.00e+00
1.00e+00f 1
14 -2.6826472e+01 0.00e+00 2.78e-04 -5.2 3.43e-04 - 1.00e+00
1.00e+00f 1
15 -2.6826472e+01 0.00e+00 3.52e-04 -5.2 3.10e-04 - 1.00e+00
1.00e+00f 1
16 -2.6826472e+01 0.00e+00 9.92e-06 -5.2 1.90e-04 - 1.00e+00
1.00e+00f 1
17 -2.6826472e+01 0.00e+00 2.95e-06 -7.0 6.05e-05 - 1.00e+00
1.00e+00f 1
18 -2.6826472e+01 0.00e+00 4.87e-06 -7.0 5.56e-06 - 1.00e+00
1.00e+00f 1
19 -2.6826472e+01 0.00e+00 4.47e-06 -7.0 3.50e-06 - 1.00e+00
1.00e+00f 1
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du
alpha_pr ls
20 -2.6826472e+01 0.00e+00 1.98e-06 -7.0 2.45e-06 - 1.00e+00
2.50e-01f 3
21 -2.6826472e+01 0.00e+00 7.27e-08 -7.0 6.95e-07 - 1.00e+00
1.00e+00f 1
Number of Iterations....: 21
(scaled) (unscaled)
Objective...............: -2.6826471985692432e+01
-2.6826471985692432e+01
Dual infeasibility......: 7.2654462898683632e-08
7.2654462898683632e-08
Constraint violation....: 0.0000000000000000e+00
0.0000000000000000e+00
Complementarity.........: 9.0909090910064460e-08
9.0909090910064460e-08
Overall NLP error.......: 9.0909090910064460e-08
9.0909090910064460e-08
Number of objective function evaluations = 33
Number of objective gradient evaluations = 22
Number of equality constraint evaluations = 0
Number of inequality constraint evaluations = 0
Number of equality constraint Jacobian evaluations = 0
Number of inequality constraint Jacobian evaluations = 0
Number of Lagrangian Hessian evaluations = 0
Total CPU secs in IPOPT (w/o function evaluations) = 0.676
Total CPU secs in NLP function evaluations = 0.000
EXIT: Optimal Solution Found.
Final g:-26.826471985692432
------------------------------
Message: 2
Date: Thu, 5 Jun 2008 08:09:24 -0700 (PDT)
From: Krish Krishnan <rkrishnan8216 at yahoo.com>
Subject: [Ipopt] Compiling test programs in Visual Studio 2005
To: ipopt at list.coin-or.org
Message-ID: <714380.49836.qm at web65504.mail.ac4.yahoo.com>
Content-Type: text/plain; charset="us-ascii"
Hi All:
I successfully compiled the IPOPT library in MINGW using the Intel Fortran Compiler and Visual Studio 2005. This was done in "release" mode. I next tried to compile the test program hs071_c.c as a console application in Visual Studio 2005 and statically linked it to the libipopt.lib that I had created with the earlier step. I had to disable libcmt.lib to take care of some conflicts (redefinitions). But after all of this I still get the following errors:
1>libifcoremt.lib(for_diags_intel.obj) : error LNK2001: unresolved external symbol __iob
1>libifcoremt.lib(for_nt_open_proc.obj) : error LNK2001: unresolved external symbol __iob
1>libmmt.lib(libm_error.obj) : error LNK2001: unresolved external symbol __iob
1>libifcoremt.lib(for_init.obj) : error LNK2001: unresolved external symbol ___argv
1>libifcoremt.lib(for_init.obj) : error LNK2001: unresolved external symbol ___argc
1>C:\Users\krishnan\Documents\projects\Testipopt\Release\Testipopt.exe : fatal error LNK1120: 3 unresolved externals
These are obviously coming from the Intel side. This is maddening since I had successfully done something similar in the past. Any clues on where I am goofing up?
Much appreciate all the help.
Thanks guys
Krish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/ipopt/attachments/20080605/a50d758b/attachment-0001.html
------------------------------
Message: 3
Date: Thu, 05 Jun 2008 17:44:48 +0200
From: Stefan Vigerske <stefan at math.hu-berlin.de>
Subject: Re: [Ipopt] Compiling test programs in Visual Studio 2005
To: Krish Krishnan <rkrishnan8216 at yahoo.com>
Cc: ipopt at list.coin-or.org
Message-ID: <484809F0.30808 at math.hu-berlin.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi,
> I successfully compiled the IPOPT library in MINGW using the Intel Fortran
> Compiler and Visual Studio 2005. This was done in "release" mode. I next tried
> to compile the test program hs071_c.c as a console application in Visual Studio
> 2005 and statically linked it to the libipopt.lib that I had created with the
> earlier step. I had to disable libcmt.lib to take care of some conflicts
> (redefinitions). But after all of this I still get the following errors:
>
> 1>libifcoremt.lib(for_diags_intel.obj) : error LNK2001: unresolved external
> symbol __iob
> 1>libifcoremt.lib(for_nt_open_proc.obj) : error LNK2001: unresolved external
> symbol __iob
> 1>libmmt.lib(libm_error.obj) : error LNK2001: unresolved external symbol __iob
> 1>libifcoremt.lib(for_init.obj) : error LNK2001: unresolved external symbol ___argv
> 1>libifcoremt.lib(for_init.obj) : error LNK2001: unresolved external symbol ___argc
> 1>C:\Users\krishnan\Documents\projects\Testipopt\Release\Testipopt.exe : fatal
> error LNK1120: 3 unresolved externals
>
> These are obviously coming from the Intel side. This is maddening since I had
> successfully done something similar in the past. Any clues on where I am
> goofing up?
I wouldn't be so sure that this is from the intel side.
Checking a fairly old VS2003, __iob and __argv are defined in the libc
derivates (libc, libcmt, libcd, ...), but in none of the Intel Fortran
10 compiler libraries.
Maybe you can try to take libcmt or libc in again, or msvcrt.lib seem to
define these too.
Hope this helps,
Stefan
--
Stefan Vigerske
Humboldt University Berlin, Numerical Mathematics
http://www.math.hu-berlin.de/~stefan
------------------------------
_______________________________________________
Ipopt mailing list
Ipopt at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/ipopt
End of Ipopt Digest, Vol 42, Issue 4
************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/ipopt/attachments/20080605/1f649809/attachment-0001.html
More information about the Ipopt
mailing list