mdolab / pyoptsparse

pyOptSparse is an object-oriented framework for formulating and solving nonlinear constrained optimization problems in an efficient, reusable, and portable manner.
https://mdolab-pyoptsparse.readthedocs-hosted.com/en/latest/
GNU Lesser General Public License v3.0
228 stars 109 forks source link

More flexible configurations for building IPOPT #262

Closed ewu63 closed 3 years ago

ewu63 commented 3 years ago

Description of feature

Right now, we hard-code the libraries when building IPOPT: libraries=["ipopt", "coinmumps", "coinmetis", "dl", "m", "blas", "lapack"] but the user may wish to use other linear solvers for example.

Potential solution

We could rely on certain environment variables that are set at build time to change these flags without having to modify setup.py. I don't have a good idea on what the naming scheme should be, though.

whophil commented 3 years ago

I believe only ipopt is required (assuming ipopt is compiled as a shared lib), as none of the pyIPOPT source files directly depend on methods from these libraries.

This issue is related: https://github.com/xuy/pyipopt/issues/39

This has implications for the pyoptsparse conda package as well. If the ipopt conda package can be built with variants of linear solvers (e.g. MKL PARDISO) then pyoptsparse will support it without modification.