Originally posted by: dparaskevop
Hi Daniel,
Great thanks for your reply!!!
> Is it possible that you are running out of memory? Can you monitor memory consumption in the task manager or some other tool? If the access violation occurs, are you close to the memory limit?
I have the task manager open, while running, and when the access violation occurs, the algorithm has used up to 100 MB. My system has available 16GB of RAM. The weird thing is that there is memory leak. At each iteration there are about 10 MB that are added to the memory usage. And it is only by baropt there aren't any other functions or data structures created. The whole code is given below:
#define ILO_MSVC
#include <C:\ILOG\CPLEX121\include\ilcplex\cplex.h>
#include <iostream>
using namespace std;
void main()
{
int status=0;
CPXENVptr env;
CPXLPptr lp;
for(int u=0;u<1000;u++)
{
lp=NULL;
env = CPXopenCPLEX (&status);
lp = CPXcreateprob (env, &status, "model.lp");
status = CPXsetintparam (env, CPX_PARAM_SCRIND, CPX_OFF);
status = CPXreadcopyprob (env, lp, "model.lp", NULL);
status = CPXbaropt (env, lp);
status=CPXgetstat (env, lp);
cout<<status<< " "<<endl;
status = CPXfreeprob (env, &lp);
status = CPXcloseCPLEX(&env);
}
}
The model.lp is a particular problem that is fed at each iteration and solved by baropt. The same lp is solved for about 15 times and then the access violation occurs.
>>2. can you check if the problem persists if you use only one thread?
I am running it right now I 'll let you know.
>>What version of CPLEX are you using?
12.1. I am trying to install the 12.4 but the installation process sticks in the beginning...I am working on it.
>>Do I understand correctly that your code is in C++ but you do not use the C++-Concert classes of CPLEX?
Yes. But I have no experience in concert technology, should I use the concert classes then?
All the very best!
#DecisionOptimization#MathematicalProgramming-General