how to reduce memory use of cplex

Solver related questions
Post Reply
mchen
User
User
Posts: 4
Joined: 7 years ago

how to reduce memory use of cplex

Post by mchen »

I have a model and use cplex to solve. I already set nodefileind to 3 in the opt file, which means the nodefile will be store in hard disk. However, the program still use a lot of memory, up to 13GB. Is there other ways to further reduce the memory? The version of GAMS I am using is 24.8.3
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: how to reduce memory use of cplex

Post by bussieck »

Hi,

The documentation has a few hints: http://support.gams.com/solver:error_1001_out_of_memory

But I fear that most of these really won't make much of a difference if the tree gets that large (13GB!) . The options that will make a difference (e.g. nodsel/varsel) will most likely compromise the performance of the solver, i.e. you end up in the same time with a weaker solution and/or bound.

-Michael
akerdeth
User
User
Posts: 4
Joined: 6 years ago

Re: how to reduce memory use of cplex

Post by akerdeth »

Hi,
I tried to these options in my program, but still get the out of memory error like shown in below. How can i solve this problem? Any suggestions?

--- Starting execution: elapsed 0:00:00.626
--- pscc_microgridsce_pf.gms(675) 36 Mb
--- Generating MIP model pscc_microgridsce_pf
--- pscc_microgridsce_pf.gms(439) 11054 Mb 785 secs
--- pscc_microgridsce_pf.gms(443) 13450 Mb 210 secs
*** Out of memory
*** Out of Memory while executing line 443
*** HeapLimit = 1E299 MB HeapSize = 13449.9 MB
--- Job pscc_microgridsce_pf.gms Stop 10/17/17 11:49:37 elapsed 0:16:47.464
Exit code = 10
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: how to reduce memory use of cplex

Post by bussieck »

It is not Cplex that runs out of memory, it is GAMS. You can try to clear some unset large parameters (option clear=sym;) but Cplex will most likely require a multiple of the memory used by GAMS. So rent a bigger machine. There are plenty of cloud offering that give you access to machines with plenty of memory for little money (e.g. https://aws.amazon.com/ec2/instance-types/).

-Michael
Post Reply