Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
Expand all | Collapse all

Cplex Matlab problem

  • 1.  Cplex Matlab problem

    Posted Thu February 19, 2015 04:46 AM

    Originally posted by: Emmanouil


    Hello everyone,

    I am trying to use Cplex with Matlab and I am encountering a strange problem. I am executing a big piece of code in Matlab, which, at a certain point, calls Cplex. Sometimes this call is succesfull, while other times, the cplex functions cause Matlab to crash, giving the message shown in the attached png file. If I press "Attempt to continue", I get the error shown in the attached txt file.

    - There is no certain pattent that causes this crash. The error is usually caused when calling the function cplexoptimset('cplex') but other functions can cause that too, it is totally random.
    -The strange thing is that if i open matlab and run cplexoptimset('cplex') in an empty workspace, it works fine every time. The problem shows up when it is embedded in my main code.

    This error happens with any Cplex Optimization studio version (I have tried 12.6.1, 12.6 and 12.5 provided through the academic initiative)  and in any pc I have tried.
    I am using Windows 7 64bit and Matlab 2014a.

    Any ideas ?

    (I think other users reported the same problem but no answer was given so far)
     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Cplex Matlab problem

    Posted Wed February 25, 2015 01:37 AM

    Could this be related to out-of-memory conditions? Are you close to memory exhaustion when that problem occurs?


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Cplex Matlab problem

    Posted Wed February 25, 2015 05:45 AM

    Originally posted by: Emmanouil


    No, it has nothing to do with memory conditions. 
    I made some additional investigation with the CPLEX API and i found out that my code calling Cplex API works fine in Matlab 2011a but crashes in Matlab 2014a. I am almost sure, now,  that the Cplex m and mex files were generated in older Matlab versions and they are not compatible with newer Matlab versions.
     
    I believe that IBM developers should elaborate on this.
     
    *I forgot to mention in my first post that I am using the Cplex Optimization Studio provided through the academic initiative (I have just edited my first post)

    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Cplex Matlab problem

    Posted Wed February 25, 2015 06:11 AM

    If you look at the list of supported software in the detailed system requirements for 12.6.1 then you will find that the latest matlab version that is officially supported by CPLEX is R2013a 8.1. So it can very well be that 2014a does not work :-(


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Cplex Matlab problem

    Posted Wed February 25, 2015 06:27 AM

    Originally posted by: Emmanouil


    Daniel, I had no idea! Thank you for your help.


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Cplex Matlab problem

    Posted Wed February 25, 2015 08:00 AM

    Originally posted by: Emmanouil


    Daniel, I tried Matlab 2013a with Cplex 12.6.1 and the problem is there. So even if Matlab 2013a is officially supported, technically it is not. 


    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: Cplex Matlab problem

    Posted Wed February 25, 2015 08:36 AM

    OK, that is a problem then. Do you have any way to reliably reproduce the problem? Can you send us a (preferably short) code that triggers the problem, so that we can investigate what is going wrong?


    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: Cplex Matlab problem

    Posted Wed February 25, 2015 01:11 PM

    Originally posted by: Emmanouil


    Dear Daniel,
     
    I have prepared a piece of code that triggers the problem. Unfortunately I cannot upload the rar file here, probably due to its size which is around 18MB. Is there any way that I can send it to you, via email for example ?

    (The size is big because the code loads a mat file which is around 23MB)

    #CPLEXOptimizers
    #DecisionOptimization


  • 9.  Re: Cplex Matlab problem

    Posted Tue March 03, 2015 02:00 AM

    Sorry for the delay. Can you please try to send this to daniel(dot)junglas(at)de(dot)ibm(dot)com? I am not sure whether attachments of this size are allowed. If it gets rejected we can figure out another way. Thanks a lot.


    #CPLEXOptimizers
    #DecisionOptimization


  • 10.  Re: Cplex Matlab problem

    Posted Tue March 03, 2015 05:27 AM

    Originally posted by: Emmanouil


    Daniel,

    I sent you mail but it got rejected. The attached file is 18MB. Any other ideas?

    Thanks


    #CPLEXOptimizers
    #DecisionOptimization


  • 11.  Re: Cplex Matlab problem

    Posted Fri March 06, 2015 01:32 AM

    Can you please just send me a message at daniel(dot)junglas(at)de(dot)ibm(dot)com? I can then point you to an FTP site at which you can upload the data.


    #CPLEXOptimizers
    #DecisionOptimization