Q:GAMS/OSL runs my MIP problem for a while. But once the branch and bound search has gone on for a while, GAMS/OSL suddenly crashes and GAMS cannot recover the solution. What can I do ?
The most likely cause of the GAMS/OSL crash is due to its memory estimate being wrong. In such a case, you will probably find lines in the log similar to the following:
**** Severe problem in OSL. Check the listing file. Terminating...
The listing file contains a message similar to,
EKK3010W There is not enough storage to extend buffers for EKKMSLV EKK7052S There is an I/O error on direct access file 82 at record 846905452 **** Severe problem in OSL. Check the listing file. Terminating...
The reason for this error is as follows: Fortran based codes like OSL cannot make multiple memory calls to the system. Instead, they initially make a very conservative estimate of the amount of memory needed to solve the problem based on its size. Sometimes, especially for MIP models where the size of the branch and bound tree becomes very large, even this conservative estimate is not enough, and OSL runs out of memory while solving the problem and crashes. OSL reports its memory estimate both in the listing file and the log. It looks as follows:
Work space allocated: 0.80 MB
This means that OSL estimated that 0.8 MB of memory was needed to solve this problem. The user can force OSL to override this memory estimate with the user's estimate. In the example above, if 0.80 MB made OSL crash, you can force OSL to use more memory (say 30 MB) by using the following command:
mymodel.workspace = 30 ;
where mymodel is the name of the model as specified by the model statement. The .workspace assignment should come between the model and solve statements.