Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Option to compile against IDAES Ipopt? #277

Open
Robbybp opened this issue Nov 12, 2024 · 2 comments
Open

[ENH] Option to compile against IDAES Ipopt? #277

Robbybp opened this issue Nov 12, 2024 · 2 comments

Comments

@Robbybp
Copy link
Contributor

Robbybp commented Nov 12, 2024

IDAES distributes Ipopt binaries compiled with HSL. (Binaries can be found here. They can do this because they pay for an HSL distribution license.) I would like to use CyIpopt with this version of Ipopt. Right now, this is fairly easy except on Windows. I can do this on Windows with the idaes-ipopt branch of CyIpopt, which patches handle_ext_modules_win_32_other_ipopt to use the libraries IDAES distributes rather than those in the official Ipopt Windows binaries.

I am wondering if CyIpopt can be configured to use a "custom Ipopt" on Windows? Assuming this is not currently possible, I could see a couple of ways to do what I want:

  1. Add a handle_ext_modules_win_32_idaes_ipopt function that gets called if IPOPTWINDIR is something like USE_IDAES_IPOPT. This would have to track changes in IDAES's Ipopt distribution if e.g. the name of a library changes.
  2. Allow IPOPT_INCLUDE_DIRS, IPOPT_LIBS, IPOPT_LIB_DIRS, and DATA_FILES to be configured using environment variables. We would still probably need something like IPOPTWINDIR=USE_CUSTOM_IPOPT to know to do this instead of just assuming we're using the official Windows binaries.

Would you accept a patch to CyIpopt to do either of the above? (Or let me know if it is already possible to use a "custom Ipopt" on Windows.)

@moorepants
Copy link
Collaborator

Yes, in short. If you want to make it more flexible to build against different ipopt binaries on Windows that's fine. Maybe suggestion 2. is best so we don't have to track IDAE's code.

@moorepants
Copy link
Collaborator

Another possible option is that the pkg_config command could be used on Windows. I noticed that it is available on conda forge for windows, but I don't know how easy it is to install in general on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants