Solved

Terminated by The Solver


Badge +1

Hi,

I am solving a huge MIP (4446310 integer variables). I set the relative gap to 0% from CPLEX MIP settings. After 69532.16 sec (19.3 hours), the model stops running and the solver status says 'Terminated by solver' while the gap is 0.14%. Why does this happen? What are the possible causes? Thank you.

 

Best regards,

Wanie Saidi

 

icon

Best answer by Marcel Hunting 26 April 2024, 11:09

View original

10 replies

Userlevel 5
Badge +4

HI @Wanie Saidi. Probably CPLEX ran out of memory. I strongly recommend to print the CPLEX status file by setting the following options:

  • Solvers General option 'Solver listing messages' to 'All'
  • CPLEX option 'MIP display' to 'Nth node + info on node cuts'
  • CPLEX option 'Parameter display' to 'Yes'

The CPLEX status file will be printed in the log folder. It contains useful information about the solving process. See also this topic.

Badge +1

Thank you @Marcel Hunting for the recommendations. I’d like to understand if this issue is solely due to CPLEX running out of memory, or if there might be other factors contributing to the problem. Could you provide further insights into possible alternative causes that could lead to the issues?

Best regards,
Wanie Saidi

Userlevel 5
Badge +4

Hi @Wanie Saidi. The only realistic possible cause that I see is lack of memory (or lack of disk space, if the node file is written on disk). The CPLEX status file should tell you more.

Badge +1

Where is the option to open the log folder in AIMMS?

Userlevel 5
Badge +4

Hi @Wanie Saidi. You can open the log folder using the File Explorer. It is a sub-folder inside the folder with the AIMMS project. The CPLEX status file can be opened with a text editor like Notepad.

Note that you can open the CPLEX status file inside AIMMS by selecting File - Open - Text File, select All Files instead of Text Files (bottom-right), browse to the log folder, and select, e.g., 'CPLEX 22.1.sta'.

Badge +1

Is it this folder?

 

Userlevel 5
Badge +4

That is the correct folder. Please note that the CPLEX status file will be emptied if you re-open the AIMMS project, so you might want to copy it after the solve.

Badge +1

This is the CPLEX status file that I got after the model stopped running. Solver status shows ‘Terminated by Solver’ with the gap 0.15%. It seems that it is because there is not enough memory from the CPLEX status file. Can you give a detailed explanation about the other information in this status file?

 

Badge +1

 

Userlevel 5
Badge +4

The CPLEX status file indeed shows that CPLEX ran out of memory.

The status file shows the type of cutting planes (cuts) that were added while solving the model. The warning about MIP starts not constructed seems incorrect because MIP starts are used (if enabled) at the beginning of the solve when CPLEX should still have sufficient memory.

You did not show the beginning of the CPLEX status file while it contains very useful information about the CPLEX presolver, e.g., the model size after presolving the model.

There are some ways to reduce the memory usage by CPLEX:

  1. Enabling the AIMMS Presolver, by switching on the Solvers General option ‘Linear presolve’, sometimes helps to (drastically) reduce the memory usage by CPLEX. For this you need AIMMS 4.89 or newer. Preferably AIMMS 4.96 or newer because there have been some improvements for the AIMMS Presolver between AIMMS 4.89 and 4.96.
  2. Set the CPLEX option ‘Node file’ to 'On disk and compressed'. However, your hard disk should then have sufficient free space; at least 70 Gb but more preferably.
  3. Reduce the number of threads used by CPLEX by setting the CPLEX option ‘Global thread limit’ to 16. However, this likely will increase the solving time.
  4. Make the model formulation more tight such that CPLEX needs less nodes to solve the model. But this is not easy. See the paper Practical guidelines for solving difficult mixed integer linear programs by Ed Klotz and Alexandra M.Newman (2013) for more information.

Enabling the AIMMS Presolver would only be useful if the CPLEX status file shows that the CPLEX presolver drastically reduced the model size.

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator