Topic
  • 4 replies
  • Latest Post - ‏2013-01-08T23:47:08Z by SystemAdmin
SystemAdmin
SystemAdmin
7929 Posts

Pinned topic Memory leak in Matlab interface

‏2012-09-22T05:33:03Z |
I think this is an issue reported by other user, see
http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14824041

The problem can be reproduced by calling cplexlp within a for-loop or parfor loop.

1. using for loop, the memory consumed by MATLAB continuously increases.
2. using parfor loop, memory of each worker of MATLAB continuously increases.
3. using linprog instead of cplexlp, no such memory leak.
I cleared all unnecessary data at the end of each loop.

Any advice will be greatly appreciated!
Updated on 2013-01-08T23:47:08Z at 2013-01-08T23:47:08Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    7929 Posts

    Re: Memory leak in Matlab interface

    ‏2012-09-22T05:44:06Z  
    I'm sorry I forgot to mention the environmet:
    win7 64 bit, MATLAB 2012a 64bit, CPLEX 12.4.1

    Thanks in advance!
  • SystemAdmin
    SystemAdmin
    7929 Posts

    Re: Memory leak in Matlab interface

    ‏2012-09-25T06:21:09Z  
    I also tried to use the cplex class object instead of cplexlp function. If I reuse the object as much as possible in the for-loop, the memory usage looks fine. But when using parfor-loop, I have to create the objects within each loop since MATLAB think this object can't be sliced. The memory increases a lot in the parfor case.

    For the performance, using class object seems to be much slower than calling cplexlp in each case. Could someone please explain this difference?

    I hope some one can help me with the memory issue. Right now, I have to restart MATLAB after a while, it's really annoying.....
  • RWunderling
    RWunderling
    121 Posts

    Re: Memory leak in Matlab interface

    ‏2012-10-16T10:00:41Z  
    I also tried to use the cplex class object instead of cplexlp function. If I reuse the object as much as possible in the for-loop, the memory usage looks fine. But when using parfor-loop, I have to create the objects within each loop since MATLAB think this object can't be sliced. The memory increases a lot in the parfor case.

    For the performance, using class object seems to be much slower than calling cplexlp in each case. Could someone please explain this difference?

    I hope some one can help me with the memory issue. Right now, I have to restart MATLAB after a while, it's really annoying.....
    Thank you for pointing out this problem. We are working on a fix.
    In the mean time, I understand you are in direct contact with the CPLEX dev team
    for working on a workaround.

    Roland
  • SystemAdmin
    SystemAdmin
    7929 Posts

    Re: Memory leak in Matlab interface

    ‏2013-01-08T23:47:08Z  
    Thank you for pointing out this problem. We are working on a fix.
    In the mean time, I understand you are in direct contact with the CPLEX dev team
    for working on a workaround.

    Roland
    I'm having the same problem. Is there a fix or work around for this issue? I've updated to the latest version 12.4.0.1 but am still experiencing the same problem.