Skip to content

Better error reporting when solver is killed or cannot be found #1088

Open
@danergy

Description

When running with a timeout, pyomo is expecting the glpk (for example) to terminate itself. It allows 1 second for this or 1% of the timeout, whichever is longer. If the machine is stressed though then this allowance can be exceeded. The resulting error is misleading:

Solver (glpk) returned non-zero return code (-1)
Solver (glpk) did not exit normally

The return code though comes from pyomo itself and is what pyomo generates when it kills glpk. Positive return codes come from glpk etc and should be reported in this way. Negative return codes which come from pyomo should come with an appropriate message such as for -1:

Solver (glpk) killed after timeout allowance exceeded

and for -2 (from my memory):

Solver (glpk) cannot be found

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions