Ipopt .dll for VS2010, x64 or win32

281 views
Skip to first unread message

akevan

unread,
Aug 8, 2011, 1:32:28 PM8/8/11
to csi...@googlegroups.com
Hi all, the distributed binaries for Ipopt don't work with an app built with VS2010 for various reasons.

I'm wondering if anyone has built a .dll that works with a VS2010? I've tried to build it myself but finding it very painful... registering on websites to download code, converting Fortran to C, the list goes on...

Hopefully someone is using csipopt in VS2010 and can help me out! Many thanks,

akevan

Anders Gustafsson, Cureos AB

unread,
Aug 8, 2011, 2:01:24 PM8/8/11
to csi...@googlegroups.com
Dear Akevan,

many thanks for your interest in csipopt. I am sorry to hear that you can't make it work for VS2010.
This sounds strange to me though, I have been able to successfully use the most recent Ipopt binaries (3.9.2) in VS2010 myself. Could you give more details what problems you have been facing? Which Ipopt binary do you use? Which csipopt version? On which platform, 32- or 64-bit? What error message do you receive when trying to invoke the Ipopt DLL?

Best regards,
Anders

akevan

unread,
Aug 8, 2011, 3:16:00 PM8/8/11
to csi...@googlegroups.com
Ack, I just realized my configuration was not set to "x64" for my project. Changed it and it works now!

My next questions, although I don't think they're csipopt specific:

1. I don't know the objective gradient for a specific parameter set (my objective function is non-linear - my parameters are passed into an external app that spits out a result). Can I use NULL or for the EvaluateObjectiveGradientDelegate(), or implement it and return false? Is this acceptable?

2. I have only variable bounds for my parameters. I.e. -1 <= param1 <= 1. I have no constraints as they are defined in the docs. Do I still have to implement the Jacobian and Hessian callbacks and matrices?

Thanks again for your fast response...
Alex

Anders Gustafsson, Cureos AB

unread,
Aug 8, 2011, 4:44:47 PM8/8/11
to csi...@googlegroups.com
Hi again Alex,

I have been there myself, forgetting to set build target to x64 :-) Glad to hear that it works now.
To simplify usage, I am preparing a simple VS 2010 project, that I intend to upload to the Github repository once it is ready. I am struggling a little with the x86 builds right now, but eventually I should be able to upload something.

While doing this, I actually stumbled upon problems trying to invoke the 3.9.2 binaries, and the README file attached with the binaries also state that the DLL:s do not work for VS 2010. So I must was apparently mistaken when claiming I had been able to use the 3.9.2 binaries. Anyway, I have tested with the 3.9.1 binaries, and they seem to be invokable from VS 2010 apps.

Regarding your questions, you might be able to get more expert advice from the main Ipopt mailing list, but I think:

1. No. You at least need to provide the first derivative always. There is support for approximating the Hessian (by setting the "hessian_approximation" option to "limited-memory", but there is no first derivative approximation support in Ipopt. If your objective is not too complex, you might be able to use automatic differentiation. According to Wikipedia there are at least to C# AD libraries, but I have tried neither. Alternatively you should be able to revert to finite differences, although I am not sure how efficient that would be.

2. If I am not mistaken, you still need to make dummy implementations of the callbacks. I think it will suffice to leave everything unchanged and return true.

Actually, if you only have variable bounds in your problem, there might be other optimization codes that are more efficient than Ipopt. I think I recall a recent discussion on the mailing list indicating that Ipopt is not particularly suited for bounds-only NLPs. I might be mistaken, though.

I hope this response has been of help to you. Good luck with your future use of (cs)ipopt!

Best regards,
Anders

Anders Gustafsson, Cureos AB

unread,
Aug 8, 2011, 4:53:01 PM8/8/11
to csi...@googlegroups.com
Alex,

have a look at the FuncLib AD and optimization library on CodePlex, http://funclib.codeplex.com/. I just stumbled on this library when further examining the AD story. Apparently this library is even making use of csipopt for non-linear optimization, and it also provides a bounds-only optimizer, LBFGS-B.

Best regards,
Anders

akevan

unread,
Aug 8, 2011, 4:59:04 PM8/8/11
to csi...@googlegroups.com
Thanks Anders... very helpful!

This lib on codeplex looks like it might be more suitable for my problem. I'm going to check it out right now :) I'll let you know how it goes.

thanks again,
Alex
Reply all
Reply to author
Forward
0 new messages