Originally posted by: EdKlotz
Can you elaborate on what you mean when you say memory usage shot up drastically? How much memory was
in use before the problematic call to your validate() function, and by how much did it increase? Also,
what did you use to monitor memory usage on X64 Windows? Task Manager? And, how big was
your master problem?
Also, I have attached a modified version of the ilomipex2.cpp that tries to mimic the operations that
you have described. It essentially solves a master problem, then calls a subproblem routine that
just creates and destroys an IloEnv and IloCplex object. So, unlike true decomposition, the
master problem remains unchanged from one pass through the loop to the next. I tried to reproduce the behavior you
reported on both x64 Windows and Linux, but in both cases I could not. I see no significant increase in memory during the first or any other call to the subproblem routine. Furthermore, running the program under Valgrind indicates no memory leakage at all.
Now, this program is probably simpler than yours in that the "master" problem remains unchanged from
one pass in the loop; it just requires an MPS, LP or SAV file of a model to solve and the number of times to loop between solving the "master" problem and calling the subproblem routine. But,
perhaps you can use this program as a starting point, then incrementally modify it so it
performs some of the additional tasks in your own program. Or, move in the other direction,
systematically commenting out more and more of your own program until it resembles this program.
Hopefully this will enable you to isolate the specific part in your program that results in
the spike in memory usage. Perhaps you can start by running the attached program as is on a SAV file
exported via IloCplex::exportModel from your program.
Ed
#CPLEXOptimizers#DecisionOptimization