简体   繁体   中英

Cplex Java API and 127 error code

I'm using CPLEX through the Java API (that relies on JNI). I have a single application running and solving million problems in sequence. The problem itself is straightforward and it is solved in milliseconds.

I have this setting to avoid using excessive memory

cplex = new IloCplex();
//...model definition
cplex.setParam(IloCplex.IntParam.WorkMem, 512);
cplex.setParam(IloCplex.DoubleParam.TreLim, 1024);
cplex.setParam(IloCplex.IntParam.NodeFileInd, 3);

But trust me, it is so small that I never exceed that amount of memory. The problem arises after hours of runtime. The application exit with 127 error. I'm pretty sure that the CPLEX library is keeping in memory instances of cplex that after million of runs are exhausting my RAM.

What should I do, create a single cplex object and enforce memory deletion of the created model? Is cplex.clearModel(); enough?

我必须调用cplex.end()来释放每次求解公式后创建的所有变量。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM