Decision Optimization

 View Only
Expand all | Collapse all

Profiler complains of missing allocation memory error internal to CPLEX dll

  • 1.  Profiler complains of missing allocation memory error internal to CPLEX dll

    Posted Tue March 12, 2024 06:21 AM

    Hello,

    I do not have a minimum example of this yet that I can share here. On a large project that uses CPLEX 12.10, on Windows, and using the C Callable Library, Intel Inspector profiler (integrated into Visual Studio 2022 IDE) complains that there is a memory error -- missing allocation error and provides the following call stack internal to CPLEX as to where the error occurs.

    cplex12100.dll!CPXEasyncprogressinject
    cplex12100.dll!CPXEinitcomp
    cplex12100.dll!CPXEinitcomp
    cplex12100.dll!CPXEinitcomp
    cplex12100.dll!CPXsiftsetmethod
    cplex12100.dll!CPXsiftsetmethod
    cplex12100.dll!CPXsiftsetmethod
    cplex12100.dll!CPXsiftsetmethod
    cplex12100.dll!CPXsiftsetmethod

    Can CPLEX developers look at this call stack methods and indicate if something seems problematic or if something else is needed to explore this profiler error?

    Running this on Valgrind on Linux, instead of Windows on some instances does not give rise to any Valgrind error. So, it may be something specific to Windows.

    Please let me know if something else is needed to delve into this.

    Thank you.



    ------------------------------
    CPLEX User
    ------------------------------


  • 2.  RE: Profiler complains of missing allocation memory error internal to CPLEX dll

    Posted Wed March 13, 2024 10:41 AM

    Hello,

    can you try with a more recent version of CPLEX? 

    Otherwise, you can send a code reproducing the problem on the support site.



    ------------------------------
    Olivier Lhomme
    ------------------------------



  • 3.  RE: Profiler complains of missing allocation memory error internal to CPLEX dll

    Posted Wed March 13, 2024 11:33 AM

    Hi Olivier,

    https://godbolt.org/z/47rEWsKqq

    This is a small example that creates an LP, solves it, converts it into an IP, solves it, converts it back into an LP and solve it again, iterating in a loop 3 times.

    Some sort of error occurs via Intel Inspector. Intel Inspector has two types of analyses:

    (a)Detect Leaks, (b)Locate memory problems

    I did not get any issues with "Detect Leaks" in the above code. [Although, on my larger code base it is indeed in "Detect Leaks" that the profiler indicates some memory error. That project seems quite difficult to share with you, it has boost library dependencies, and I do a system call to a local executable, etc. Would you be able to build it at your end if I do share my full code base along with the .vcxproj Visual Studio project file via private email?] On choosing Locate memory problems a bunch of issues seem to come up:

    I made a screenshot of the steps I take and the report by Intel Inspector: https://imgur.com/NXcXvzg

    Thank you.



    ------------------------------
    CPLEX User
    ------------------------------