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

CPLEX 1001: Out of memory and MOI.MEMORY_LIMIT #361

Closed
henriquebecker91 opened this issue Mar 9, 2021 · 3 comments
Closed

CPLEX 1001: Out of memory and MOI.MEMORY_LIMIT #361

henriquebecker91 opened this issue Mar 9, 2021 · 3 comments
Labels
enhancement Wrapper: MathOptInterface Relates to the MathOptInterface API

Comments

@henriquebecker91
Copy link
Contributor

I recently opened an issue in Gurobi (issue 397) because Gurobi has no configurable memory limits but auto-detect memory exhaustion and throws an exception. The solution (PR 398) was to capture the exception and treat it as the solver has stopped the optimization with a MOI.MEMORY_LIMIT status.

CPLEX has at least two configurable memory limits. CPXPARAM_MIP_Limits_TreeMemory and CPXPARAM_WorkMem. The relationship between these limits is not crystal clear: the tree memory limit default is set to an "infinite" value but working memory default is set to 2048MiB, so the tree memory is separate of the working memory. None of these seem to include, for example, the memory needed for solving the root node relaxation in a MIP, because setting the tree limit to lower does not avoid CPLEX throwing CPLEX Error 1001: Out of memory. and, at least for me, I often solve problems node relaxations larger than the working memory default (2048MiB). In fact, albeit CPLEX has a interface to query the status of a finished optimization (like Gurobi), it does not seem to be a code for each of the two memory limits but only for the tree memory limit: CPXMIP_MEM_LIM_FEAS (for solution available, despite the memory problem) and CPXMIP_MEM_LIM_INFEAS (for no solution available). There is also CPX_STAT_CONFLICT_ABORT_MEM_LIM that seems an odd duck: there is no way to configure its memory limit (is it the working memory?) but it also does not throw an error if it goes out of memory.

My question is: should CPLEX ERROR 1001 be treated as Gurobi ERROR 10001? It seems like even with careful consideration of the practitioner, CPLEX may exhaust memory in subroutine that has no configurable limits, and the handling will need to be different because of that.

@odow
Copy link
Member

odow commented Mar 9, 2021

should CPLEX ERROR 1001 be treated as Gurobi ERROR 10001?

Yes, if it is just a matter of checking the return code from the solve. Make a PR.

@henriquebecker91
Copy link
Contributor Author

Done: #362.

@odow
Copy link
Member

odow commented Mar 10, 2021

Closed by #362

@odow odow closed this as completed Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Wrapper: MathOptInterface Relates to the MathOptInterface API
Development

No branches or pull requests

2 participants