So, I'm solving an LP problem but am using the barrier method. I'm finding a few issues with the consistency between explicitly calling presolve and/or letting optimize() call presolve() (I'll open a new thread for that though). I'm also seeing a mem consumption issue. If you look at the plot below, it appears that mem is not being discarded as you have stated. Everything post the black verticle line is either a call to Model.optimize() or Model.presolve(). Evering to the left is building and adding the constraints to the model.
It looks to me like presolve isn't the 1st thing done by optimize(), might this be yield better consistency?
### Presolve called only by optimize
```
presolve: 1549467495.668863
optimize: 1549467495.69171
Optimize a model with 34256 rows, 1264 columns and 40106720 nonzeros
Presolve removed 0 rows and 18392 columns (presolve time = 6s) ...
Presolve removed 0 rows and 18392 columns (presolve time = 10s) ...
Presolve removed 0 rows and 18392 columns
Presolve time: 11.99s
Presolved: 1264 rows, 17128 columns, 20053360 nonzeros
```
### Explicit presolve and also by optimize
```
presolve: 1549463229.307963
Presolve removed 18392 rows and 0 columns (presolve time = 5s) ...
Presolve removed 18392 rows and 0 columns
optimize: 1549463239.7434938
Optimize a model with 15864 rows, 1264 columns and 20052096 nonzeros
...
Presolve removed 0 rows and 0 columns (presolve time = 5s) ...
Presolve time: 6.45s
Presolved: 1264 rows, 17128 columns, 20053360 nonzeros
```
### Explicit presolve, not by optimize
```
presolve: 1549469150.320121
Presolve removed 18392 rows and 0 columns (presolve time = 6s) ...
Presolve removed 18392 rows and 0 columns (presolve time = 10s) ...
Presolve removed 18392 rows and 0 columns
optimize: 1549469161.0602088
Optimize a model with 15864 rows, 1264 columns and 20052096 nonzeros
```
I'm I even right in thinking that presolve returns the presolved AND remaining unsolved parts of the model, and not just the presolved soln? The doc just states that it returns the presolved version of the model.
When I run a much larger version (I'll add the number of NZs later) I get the following error from calling m.presolve()
But when I don't explicitly call presolve and just call m.optimize() it runs (for too long so I end up killing it) but passes the presolve stage.
There seem to be a few issues at hand here.