solver:error_1001_out_of_memory

This message indicates that Cplex is running out of memory while solving the model.

The log file will provide more information about the size of the model and where in the solution process the memory message appears:

- during preprocessing of the model and while solving the preprocessed model
- during the branch & bound process
- during the final solve and the calculation of the marginals.

The simplest solution is to decrease the size of the model or add more (physical) memory. Please note that the 32 bit version of the windows operating limits any GAMS or solver process to ~1.7 Gb, hence, consider to use the 64 bit version. Please look here for more information.

One can try to save some memory by:

- Make sure that only the necessary equations get generated (check chapter 11.6 of the GAMS User's Guide or the Mc Carl Expanded GAMS User Guide for more information)
- Use the GAMS option
`model_name.holdfixed 1`

, if there are many fixed variables - Use the GAMS option
`solvelink 0`

(and not 1, 2, 3, 4 or 5) - Save memory by not passing on names to the solver:
`model_name.dictfile=0`

- Use a Cplex option file (see the Cplex Manual, in particular Physical Memory Limitations and Running Out of Memory for MIP Problems for details):
- Do not load GAMS names (
`names no`

) - Do not use multiple threads (
`threads 1`

) - Conserve memory where possible (
`memoryemphasis 1`

) - Use the Simplex algorithm (
`lpmethod 1 or 2`

) instead of the Barrier algorithm (`lpmethod 4`

) - Increase the refactorization frequency (decrease
`reinv`

) - (MIP) Let Cplex store information on disk (
`nodefileind 2 or 3`

/`workmem`

) - (MIP) Do not solve the final LP (
`solvefinal 0`

). Please keep in mind that without solving the final LP, the solution will be primal only - no marginals will be reported. - (MIP) Set option
`nodesel`

to use a best estimate strategy (`nodesel 2`

) or more drastically a depth-first-search (`nodesel 0`

). - (MIP) Set option
`varsel`

to use strong branching (`varsel 3`

). - (MIP) Turn off cut generation (
`cuts -1`

). - (Barrier) Do not do a crossover at the end of the barrier optimization (
`barcrossalg -1`

). In that case the solution will also be primal only - no marginals will be reported.

Of course, conserving memory may impact performance in some models.

solver/error_1001_out_of_memory.txt · Last modified: 2017/09/02 17:35 by support