[SCIP] Copy arrays to probdata memory problem
Gerald Gamrath
gamrath at zib.de
Mon Jul 23 20:25:38 CEST 2018
Dear André,
> I'm dealing with a problem with a huge number of binary variables and
> I am having some memory management problems.
what size does your problem have?
> I was wondering, it is really necessary to copy the variable and
> constraint arrays to probdata struct?
Do you do this? Then, I can't say if it is necessary. SCIP does not fill
the probdata struct itself. But of course, SCIP needs to store the
variables in its internal data structures.
> When I run my problem I get memory access violation probably because
> down there in SCIP, SCIPconsGetNVars copies an array for which there
> is no memory available or maybe an available array was overwritten due
> to memory insufficiency and thus couldn't be accessed correctly.
What error do you get? If there is not enough memory for SCIP to
allocate an array, SCIP should stop with an error code and print an
error message that insufficient memory was available for allocating x bytes.
I would suggest you compile in debug mode and perhaps also disable
buffer and block memory (OPT=dbg NOBLKBUFMEM=true when compiling with
make, -DCMAKE_BUILD_TYPE=Debug -DNOBLKBUFMEM=on for CMake) and then run
your code with valgrind to find out where something breaks.
Best,
Gerald
More information about the Scip
mailing list