Decision Optimization

Decision Optimization

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

 View Only
  • 1.  cplexmilp sometimes cause matlab to crash

    Posted Thu June 15, 2017 05:26 AM

    Originally posted by: BeWater22


    Hi all,

     

    I have been using cplex with Matlab API for a while now, cplexmilp have been the only command that I use. I have encountered the exact same problem as described in the post below:

    https://www.ibm.com/developerworks/community/forums/html/topic?id=ad54f4b4-e18e-4e7d-b073-0073380d07f9&ps=25

    when cplexmilp is called, matlab will sometimes crash and show the exact error window attached the the above post, other times it works fine.

    I have set up a loop to run cplexmilp with different input variables, approximately 20% of the cplexmilps will end in a crash, meaning that every time I run the script, matlab crashes after around 5 iterations in the loop.

     

    This has been a consistent phenomenon in 3 PCs I have used to run the code.

    1. Windows 10 / Cplex 12.7 / Matlab 2017a

    2. Windows 7 / Cplex 12.7 / Matlab 2016b

    3. Windows 7/ Cplex 12.7 / Matlab 2017a

     

    I have tried sending the error message to Mathworks and got the following response:

    Thank you for sending us information about your recent MATLAB crash.
    An initial investigation leads us to believe the crash you experienced may be the result of an issue in a custom MEX function.  

    Then I was directed to a MEX function troubleshooting page. However since I am not the author of the MEX function there was really much I could do. The last part of the troubleshooting said:

    *You are not the author of the MEX function: *In this case, the best option is to contact the author of the MEX function as they would have both the knowledge and the source code of the MEX function to debug the crash further.

     

    If anyone could shed some light on this issue that would be much appreciated.

     

    Kind Regards,

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: cplexmilp sometimes cause matlab to crash

    Posted Thu June 15, 2017 11:27 AM

    The detailed system requirements for CPLEX list matlab 2016a as the newest matlab version supported by CPLEX 12.7.

    Can you upgrade to CPLEX 12.7.1 and see whether the problems persist?


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: cplexmilp sometimes cause matlab to crash

    Posted Wed June 21, 2017 08:33 PM

    Originally posted by: BeWater22


    Hi, I have upgraded to 12.7.1 and the problem persists, tested over the past few days on two different machines. below is the copy paste of a typical error log

     

    ------------------------------------------------------------------------

              Access violation detected at Thu Jun 22 10:26:56 2017
    ------------------------------------------------------------------------

    Configuration:
      Crash Decoding      : Disabled - No sandbox or build area path
      Crash Mode          : continue (default)
      Current Graphics Driver: Microsoft Corporation GDI Generic Version 1.1.0
      Default Encoding    : windows-1252
      Deployed            : false
      Graphics card 1     : NVIDIA ( 0x10de ) NVIDIA Quadro 600 Version 9.18.13.1090
      Host Name           : storage1-WS
      MATLAB Architecture : win64
      MATLAB Entitlement ID: 1025765
      MATLAB Root         : C:\Program Files\MATLAB\R2016b
      MATLAB Version      : 9.1.0.441655 (R2016b)
      OpenGL              : software
      Operating System    : Microsoft Windows 7 Professional 
      Processor ID        : x86 Family 6 Model 58 Stepping 9, GenuineIntel
      Virtual Machine     : Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
      Window System       : Version 6.1 (Build 7601: Service Pack 1)

    Fault Count: 1


    Abnormal termination:
    Access violation

    Register State (from fault):
      RAX = 000000005a72a6a0  RBX = 000000005a7297c0
      RCX = 000000005a72a6a0  RDX = 0000000000000000
      RSP = 000000000402a920  RBP = 000000000402bce0
      RSI = 000000000402bc00  RDI = 000000000cee9d40
     
       R8 = 000000001153bc80   R9 = 000000005a72b970
      R10 = 000000005a728000  R11 = 000007fef49a9f10
      R12 = 000000000402bce8  R13 = 0000000000000000
      R14 = 0000000000000000  R15 = 000000000402bce0
     
      RIP = 000007feefa72d5e  EFL = 00010202
     
       CS = 0033   FS = 0053   GS = 002b

    Stack Trace (from fault):
    [  0] 0x000007feefa72d5e C:\Program Files\IBM\ILOG\CPLEX_Studio1271\cplex\matlab\x64_win64\cplexlink1271.mexw64+00011614 mexFunction+00000910
    [  1] 0x00000000fc5fc5d1 C:\Program Files\MATLAB\R2016b\bin\win64\libmex.dll+00116177 mexRunMexFile+00000129
    [  2] 0x00000000fc5fb2e2 C:\Program Files\MATLAB\R2016b\bin\win64\libmex.dll+00111330 mexFeature_mexver+00001794
    [  3] 0x00000000fc5fa506 C:\Program Files\MATLAB\R2016b\bin\win64\libmex.dll+00107782 mexUnlock+00020182
    [  4] 0x000000000c2546de C:\Program Files\MATLAB\R2016b\bin\win64\m_dispatcher.dll+00018142 Mfh_file::dispatch_fh_impl+00000434
    [  5] 0x000000000c2544b6 C:\Program Files\MATLAB\R2016b\bin\win64\m_dispatcher.dll+00017590 Mfh_file::dispatch_fh+00000062
    [  6] 0x000000000c255827 C:\Program Files\MATLAB\R2016b\bin\win64\m_dispatcher.dll+00022567 Mfunction_handle::dispatch+00001015
    [  7] 0x000000000d288c29 C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00887849 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00798773
    [  8] 0x000000000d288707 C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00886535 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00797459
    [  9] 0x000000000d2874b8 C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00881848 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00792772
    [ 10] 0x000000000d209eab C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00368299 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00279223
    [ 11] 0x000000000d209740 C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00366400 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00277324
    [ 12] 0x000000000d291efe C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00925438 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00836362
    [ 13] 0x000000000d29195a C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00923994 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00834918
    [ 14] 0x000000000d291979 C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00924025 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00834949
    [ 15] 0x000000000c2546de C:\Program Files\MATLAB\R2016b\bin\win64\m_dispatcher.dll+00018142 Mfh_file::dispatch_fh_impl+00000434
    [ 16] 0x000000000c2544b6 C:\Program Files\MATLAB\R2016b\bin\win64\m_dispatcher.dll+00017590 Mfh_file::dispatch_fh+00000062
    [ 17] 0x000000000c255827 C:\Program Files\MATLAB\R2016b\bin\win64\m_dispatcher.dll+00022567 Mfunction_handle::dispatch+00001015
    [ 18] 0x000000000d28bfbd C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00901053 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00811977
    [ 19] 0x000000000d25fbc0 C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00719808 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00630732
    [ 20] 0x000000000d288707 C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00886535 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00797459
    [ 21] 0x000000000d2874b8 C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00881848 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00792772
    [ 22] 0x000000000d209eab C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00368299 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00279223
    [ 23] 0x000000000d209740 C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00366400 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00277324
    [ 24] 0x000000000d203f8f C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00343951 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00254875
    [ 25] 0x000000000d203aa1 C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00342689 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00253613
    [ 26] 0x000000000d203991 C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00342417 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00253341
    [ 27] 0x000000000d3903e9 C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+01967081 boost::serialization::singleton<boost::archive::detail::oserializer<boost::archive::polymorphic_oarchive,foundation::msg_svc::eventmgr::BaseEvent> >::get_instance+00003353
    [ 28] 0x000000000d390372 C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+01966962 boost::serialization::singleton<boost::archive::detail::oserializer<boost::archive::polymorphic_oarchive,foundation::msg_svc::eventmgr::BaseEvent> >::get_instance+00003234
    [ 29] 0x000000000d252a61 C:\Program Files\MATLAB\R2016b\bin\win64\m_lxe.dll+00666209 boost::serialization::singleton<boost::archive::detail::iserializer<boost::archive::binaryTerm_iarchive,ir::IrTree> >::get_instance+00577133
    [ 30] 0x000000000c4bb3bd C:\Program Files\MATLAB\R2016b\bin\win64\m_interpreter.dll+00504765 inEvalCmdWithLocalReturn+00000065
    [ 31] 0x00000000fb608ced C:\Program Files\MATLAB\R2016b\bin\win64\libmwbridge.dll+00101613 mnGetPrompt+00012957
    [ 32] 0x00000000fb609ba3 C:\Program Files\MATLAB\R2016b\bin\win64\libmwbridge.dll+00105379 mnParser+00001091
    [ 33] 0x000000000cfc6841   C:\Program Files\MATLAB\R2016b\bin\win64\mcr.dll+00223297 mcr::runtime::setInterpreterThreadToCurrent+00025585
    [ 34] 0x000000000cfc57d7   C:\Program Files\MATLAB\R2016b\bin\win64\mcr.dll+00219095 mcr::runtime::setInterpreterThreadToCurrent+00021383
    [ 35] 0x000000000cfc5853   C:\Program Files\MATLAB\R2016b\bin\win64\mcr.dll+00219219 mcr::runtime::setInterpreterThreadToCurrent+00021507
    [ 36] 0x000000000cfc6141   C:\Program Files\MATLAB\R2016b\bin\win64\mcr.dll+00221505 mcr::runtime::setInterpreterThreadToCurrent+00023793
    [ 37] 0x00000000fd01d347   C:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00578375 iqm::UserEvalPlugin::pre+00030679
    [ 38] 0x00000000fd029e7c   C:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00630396 iqm::UserEvalPlugin::pre+00082700
    [ 39] 0x00000000fd017480   C:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00554112 iqm::UserEvalPlugin::pre+00006416
    [ 40] 0x00000000fd02c99a   C:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00641434 iqm::UserEvalPlugin::pre+00093738
    [ 41] 0x00000000fcff9a37   C:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00432695 iqm::PackagedTaskPlugin::PackagedTaskPlugin+00000727
    [ 42] 0x00000000fcffa08f   C:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00434319 iqm::PackagedTaskPlugin::execute+00000575
    [ 43] 0x00000000fcff9aa9   C:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00432809 iqm::PackagedTaskPlugin::PackagedTaskPlugin+00000841
    [ 44] 0x00000000fcff9f04   C:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00433924 iqm::PackagedTaskPlugin::execute+00000180
    [ 45] 0x00000000fcfd42fa   C:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00279290 iqm::Iqm::setupIqmFcnPtrs+00071530
    [ 46] 0x00000000fcfd41d3   C:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00278995 iqm::Iqm::setupIqmFcnPtrs+00071235
    [ 47] 0x00000000fcfb9e5a   C:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00171610 iqm::Iqm::deliver+00003274
    [ 48] 0x00000000fcfbad2f   C:\Program Files\MATLAB\R2016b\bin\win64\iqm.dll+00175407 iqm::Iqm::deliver+00007071
    [ 49] 0x0000000004488173 C:\Program Files\MATLAB\R2016b\bin\win64\libmwservices.dll+01147251 services::system_events::PpeDispatchHook::dispatchOne+00019059
    [ 50] 0x000000000448c3a3 C:\Program Files\MATLAB\R2016b\bin\win64\libmwservices.dll+01164195 sysq::addProcessPendingEventsUnitTestHook+00001923
    [ 51] 0x000000000448c580 C:\Program Files\MATLAB\R2016b\bin\win64\libmwservices.dll+01164672 sysq::addProcessPendingEventsUnitTestHook+00002400
    [ 52] 0x000000000448d685 C:\Program Files\MATLAB\R2016b\bin\win64\libmwservices.dll+01169029 sysq::getCondition+00002917
    [ 53] 0x000000000448e4b2 C:\Program Files\MATLAB\R2016b\bin\win64\libmwservices.dll+01172658 svWS_ProcessPendingEvents+00000162
    [ 54] 0x000000000cfc6b7d   C:\Program Files\MATLAB\R2016b\bin\win64\mcr.dll+00224125 mcr::runtime::setInterpreterThreadToCurrent+00026413
    [ 55] 0x000000000cfc726a   C:\Program Files\MATLAB\R2016b\bin\win64\mcr.dll+00225898 mcr::runtime::setInterpreterThreadToCurrent+00028186
    [ 56] 0x000000000cfbe385   C:\Program Files\MATLAB\R2016b\bin\win64\mcr.dll+00189317 mcr_process_events+00010293
    [ 57] 0x000000000cfc02d2   C:\Program Files\MATLAB\R2016b\bin\win64\mcr.dll+00197330 mcr_process_events+00018306
    [ 58] 0x000000000c1cbd0e C:\Program Files\MATLAB\R2016b\bin\win64\MVMLocal.dll+00245006 mvm_server::inproc::LocalFactory::terminate+00070846
    [ 59] 0x00000000fa942cd9   C:\Program Files\MATLAB\R2016b\bin\win64\mvm.dll+01125593 mvm::detail::initLocalMvmHack+00000521
    [ 60] 0x00000000fa9432a5   C:\Program Files\MATLAB\R2016b\bin\win64\mvm.dll+01127077 mvm::detail::SessionImpl::privateSession+00000373
    [ 61] 0x00000000fa9434b1   C:\Program Files\MATLAB\R2016b\bin\win64\mvm.dll+01127601 mvm::detail::SessionImpl::privateSession+00000897
    [ 62] 0x0000000140006fd5 C:\Program Files\MATLAB\R2016b\bin\win64\MATLAB.exe+00028629
    [ 63] 0x0000000140007661 C:\Program Files\MATLAB\R2016b\bin\win64\MATLAB.exe+00030305
    [ 64] 0x0000000076ee59cd                   C:\Windows\system32\kernel32.dll+00088525 BaseThreadInitThunk+00000013
    [ 65] 0x000000007711a561                      C:\Windows\SYSTEM32\ntdll.dll+00173409 RtlUserThreadStart+00000033


    This error was detected while a MEX-file was running. If the MEX-file
    is not an official MathWorks function, please examine its source code
    for errors. Please consult the External Interfaces Guide for information
    on debugging MEX-files.

    If this problem is reproducible, please submit a Service Request via:
        http://www.mathworks.com/support/contact_us/

    A technical support engineer might contact you with further information.

    Thank you for your help.


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: cplexmilp sometimes cause matlab to crash

    Posted Mon July 03, 2017 12:32 PM

    That is bad. Could you provide a small program that reliably reproduces the crash?


    #CPLEXOptimizers
    #DecisionOptimization