Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

random matlab crashes at win7 x64 using cplex 12.5

  • 1.  random matlab crashes at win7 x64 using cplex 12.5

    Posted Thu February 13, 2014 02:11 PM

    Originally posted by: C1GP_Reinhold_Bertram


    Hello,

    I experience frequently random matlab crashes. I attached a matlab crash dump file. It seems to be the mex interface which crashes the program.

    I cannot exactly tell which call breaks, because I use the yalmip toolbox. But I guess it is something related to the solver caching.

    On Linux platform with 12.5.1 this is not an issue. Same code runs without errors.

    Was this a known issue to 12.5?

    Best regards

    Reinhold


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: random matlab crashes at win7 x64 using cplex 12.5

    Posted Thu February 13, 2014 03:12 PM

    Originally posted by: JohanLöfberg


    The data sent by YALMIP to CPLEX can be extracted if you use set the option 'savedebug'  to 1 in sdpsettings. The data will then be saved in a struct in a file called cplexdebug.mat in your current directory

    The data can then be extracted

    H = model.H;
    f = model.f;
    Aineq = model.Aineq;
    bineq = model.bineq;
    Aeq = model.Aeq;
    beq = model.beq;
    lb = model.lb;
    ub = model.ub;
    x0 = model.x0;
    options.cplex = model.options;
    options.verbose = model.verbose;
    integer_variables = model.integer_variables;
    binary_variables = model.binary_variables;
    semicont_variables = model.semicont_variables;
    ctype = model.ctype;
    K = model.K;
    

    and you can make a call to cplex (depending on LP or QP and whether you have integer variables or not, YALMIP would make some of these calls

     

    [x,fval,exitflag,output,lambda] = cplexlp(f,Aineq,bineq,Aeq,beq,lb,ub,x0,options.cplex);
    
    [x,fval,exitflag,output,lambda] = cplexqp(H,f,Aineq,bineq,Aeq,beq,lb,ub,x0,options.cplex);
    
    [x,fval,exitflag,output] = cplexmilp(f,Aineq,bineq,Aeq,beq,K.sos.type,K.sos.variables,K.sos.weight,lb,ub,ctype',x0,options.cplex);
    
    [x,fval,exitflag,output] = cplexmiqp(H,f,Aineq,bineq,Aeq,beq,K.sos.type,K.sos.variables,K.sos.weight,lb,ub,ctype',x0,options.cplex);
    

     

     

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: random matlab crashes at win7 x64 using cplex 12.5

    Posted Thu February 13, 2014 04:50 PM

    Originally posted by: C1GP_Reinhold_Bertram


    The strange thing is, that it may even crash when I don't try to actually solve anything. I just use a class-file for storing some options. And one property is the result of sdpsettings.

    As far as I can see the only call to something related to cplex is cplexoptimset('cplex'). Which is according to the dump files the reason for the crash (mentioning Segmentation violation).

    Please make cplex matlab api more robust. It really makes developing and testing a model a pain.


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: random matlab crashes at win7 x64 using cplex 12.5

    Posted Fri April 25, 2014 10:18 AM

    Originally posted by: OlivierMegel


    Hi,

    I had a similar issue (win7 64 bits, cplex, yalmip, matlab) and I found a workaround: Use CPLEX 12.5.1 and matlab R2012a.

    When using a newer version of matlab (R2013a or R2013b) I obtained random segmentation violations (every few hundreds or every thousand calls to cplex). CPLEX 12.4 and different matlab versions were also behaving poorly. 

    It is still unclear to me whether or not yalmip is involved in this, or if it is purely an incompatibility between cplex and matlab (which sounds unlikely). 

    I saved the problems that yalmip was sending to cplex (which would lead to a crash in the long run) and tried to run them directly on cplex (using cplexqp(H,f,Aineq,bineq,Aeq,beq,lb,ub,x0,options.cplex) ) without using yalmip: it did not crash after more than 100 000 calls. So it looks like yalmip is somehow involved. 

    Of course it is hard to analyze in details, since the segmentation violations happen randomly. Anyway, the combination of CPLEX 12.5.1 and matlab R2012a seems to be the way to go (a colleague of mine also faced a similar issue).

     

    Best,

    Olivier

     


    #CPLEXOptimizers
    #DecisionOptimization