[SCIP] Why the program cannot work without NOBLKBUFMEM=true

Robert Lion Gottwald robert.gottwald at zib.de
Thu Mar 8 10:38:53 CET 2018


Dear Xiangyong,

First of all this is not specific to SCIP: If you encounter a 
segmentation fault in C/C++ you should use a debugger and valgrind to 
find out where the memory access violation occurs.

In this particular case I guess the problem could be related to the use 
of block memory. Particularly the block memory in SCIP requires to give 
the correct sizes of an allocation when it is freed. E.g. when you do

SCIP_CALL( SCIPallocBlockMemoryArray(scip, &array, N) );

...

SCIPfreeBlockMemoryArray(scip, &array, N);

It is very important that N has the same value in both calls. To debug 
this you can add the preprocessor define CHECKCHKFREE via compiler flags 
or by uncommenting the define in src/blockmemshell/memory.c within SCIP.

Best,

Robert

n 03/08/2018 10:29 AM, lixiangyong at 163.com wrote:
> Dear all,
>
> My program could work when I compiled it with  NOBLKBUFMEM=true.
>
> If I removed NOBLKBUFMEM=true,   the program terminated with error of 
> "segment fault."
>
> What is the problem?
>
>
> Thanks,
>
> Xiangyong
>
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20180308/4df7edb1/attachment.html>


More information about the Scip mailing list