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

Fast(er) direct solver interfaces #1160

Closed
whart222 opened this issue Nov 7, 2019 · 8 comments
Closed

Fast(er) direct solver interfaces #1160

whart222 opened this issue Nov 7, 2019 · 8 comments

Comments

@whart222
Copy link
Member

whart222 commented Nov 7, 2019

I think users would generally expect direct solver interfaces to be faster, since we're avoiding file I/O. However, I think this is not always the case. For example, see #515

We need to critique our direct solver interfaces and assess whether we can setup/analyze problems more effectively. This activity could involve:

  1. Identifying bottlenecks in existing solver interfaces
  2. Exploring strategies for avoiding canonicalization in Pyomo (e.g. directly generating solver expressions from Pyomo expression trees)
  3. Interfacing with POEK/COEK to see if their interfaces can resolve known bottlenecks.

NOTE: Aside from #51 and #1169, I only have anecdotal evidence that direct solver interfaces aren't faster. I would recommend confirming that they are faster before closing this issue.

@emma58
Copy link
Contributor

emma58 commented Nov 7, 2019

I'm not sure whether @michaelbynum's recent enhancements change this, but the other thing that can make the persistent interface slower is hacking around functionality that's not yet in the persistent interface. The obvious one is changing the right-hand side of a constraint: The only way I know how to do this now is to remove and add the constraint, but I've never found this strategy to be worth the time. I just point this out because I wonder if there aren't other cases where the potential performance enhancements might be in what is not there rather than what is.

@qtothec
Copy link
Contributor

qtothec commented Nov 7, 2019

I have been talking to Steve about making the GAMS direct "solver" faster by constructing in-memory GMO objects rather than writing a file, as well.

@qtothec
Copy link
Contributor

qtothec commented Nov 17, 2019

As a follow-up to this, Steve Dirkse sent me an example for building up and solving an NLP using in-memory GMO and GEV.

@carldlaird
Copy link
Member

I am not sure that #515 is the correct issue to reference. Does anyone know the issue number that shows a case where the direct solvers are slower than the indirect solvers?

@qtothec
Copy link
Contributor

qtothec commented Nov 18, 2019

Well, for the GAMS case, I have this: #215 (comment)

I don't know about the MIP solver cases.

@whart222
Copy link
Member Author

@carldlaird I updated the references to related issues. Both of these concern the CPLEX python solver interface.

@jsiirola
Copy link
Member

jsiirola commented May 8, 2020

Archived on the master Performance Proposals Issue (#1430). Closing this performance proposal until active development has begun.

@jsiirola jsiirola closed this as completed May 8, 2020
@staadecker
Copy link
Contributor

Fyi I know that for the large models I'm working with the direct gurobi solver interfaces is slower than the IO gurobi solver interface

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

No branches or pull requests

6 participants