[SCIP] Copy arrays to probdata memory problem
André Filipe Lanca Serrano
andre.serrano at tuhh.de
Tue Jul 24 10:54:02 CEST 2018
Dear Gerald,
My problem has around 1.4 million binary variables.
Yes I do that because the variables and constraints arrays are not
available in the heuristic callback. That heuristic was implemented by
me.
I get the error code -1. And when I try to duplicate the vars memory I
get memory access violation errors.
Kind regards,
André Serrano
Quoting Gerald Gamrath <gamrath at zib.de>:
> 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