I'm using CPLEX 12.4 academic version (no license requirement) with MATLAB2010a on a Linux 32bit PC. I get the memory leak problem.
I found the following related thread:
It seems that the memory leak problem was a known issue for CPLEX academic versions.
Does CPLEX 12.4 academic version still have this problem???
Pinned topic CPLEX 12.4 Memory Leak, a Known issue???
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-01-08T23:48:11Z at 2013-01-08T23:48:11Z by SystemAdmin
Re: CPLEX 12.4 Memory Leak, a Known issue???2012-05-13T13:27:30ZThis is the accepted answer. This is the accepted answer.The memory leak described in the thread you quoted (and which could be worked around by setting environment variable MKL_DISABLE_FAST_MM to 1) is fixed in CPLEX 12.4.
If you still observe a memory leak then this is something different. I guess it does not help to set MKL_DISABLE_FAST_MM, right?
Could you give us more details about the leak you observe? Maybe even post some code here that reproduces the leak? Or send such code to me: daniel(dot)junglas(at)de(dot)ibm(dot)com.
Re: CPLEX 12.4 Memory Leak, a Known issue???2012-05-13T19:07:22ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
However, I cannot post my program here because it requires supporting data and files to run.
You are right. Setting MKL_DISABLE_FAST_MM to 1 does not help. Even setting the number of threads to 1 does not help.
In my program, I need to solve a SOCP many times in a for-loop in MATLAB. I creat one global Cplex object and modify the model and call cplex.solve() in each iteration.
For my understanding, the memory used by CPLEX is not freed after solving a SOCP in each iteration. As a result, the memory used by MATLAB is accumulating and growing, which eventually leads to "out of memory" error.
I also tried CPLEX MATLAB toolbox functions. I got the same memory leak problem.
I use CPLEX 12.4 academic version, without license requirement. I try it on Win7 64-bit, Vista 32-bit, and Linux 32-bit systems. I got the memory leak problem for all the cases.
Re: CPLEX 12.4 Memory Leak, a Known issue???2012-05-13T20:08:26ZThis is the accepted answer. This is the accepted answer.
- YongCheng@TUDarmstadt 270004952S
Could you give us more details about the model you start with and the way in which you modify it in each loop?
The model you start with is a pure SOCP, correct?
What modifications do you perform in the loop? Do you add constraints, change variable bounds, change coefficients in constraints? Is the problem still an SOCP after your modifications? What are the matlab statements you use to modify the problem?
Would it be easy to change your code so that it creates the model from scratch in each iteration? If that is easy to do, could you give that a try and see if you are still leaking memory?
Re: CPLEX 12.4 Memory Leak, a Known issue???2012-05-14T07:40:39ZThis is the accepted answer. This is the accepted answer.
Yes, I always have pure SOCP in each iteration. And in each iteration, I need to change the constraints, and change the bounds, etc.
I also tried building the model from scratch in each iteration. However, it does not help.
I will build a toy example from my codes and send it to you by email.
By the way, it seems that solving MI-SOCP does not lead to memory leak issue. Anyway, I will play with my codes more and provide you with more details.
Once again, thank you very much for your attention.
Re: CPLEX 12.4 Memory Leak, a Known issue???2012-05-15T10:26:52ZThis is the accepted answer. This is the accepted answer.
One more piece of information:
I create a global CPLEX object in MATLAB. When I try to change cplex.Model in different sub-programs with different problem sizes, I get the error:
??? Error using ==> cplexlink124
length not equal
In short, when I have one global CPLEX object, I cannot use it to model and solve a problem with 200 variables and another problem with 300 variables, even if I clear everying except the global CPLEX object after each modeling.
It seems to me that there is aways a copy of the CPLEX object inside. And you can not change cplex.Model to model different problems (e.g., adding more variables to the model) with one global CPLEX object. I think this is related to Memory leak.