[SCIP] about providing the solution at SCIP_STAGE_PROBLEM
Gerald Gamrath
gamrath at zib.de
Fri Apr 29 15:09:41 CEST 2016
Dear Feng,
as Jakob already pointed out, please use a debugger, e.g., gdb, and
analyze how it comes to a NULL pointer being given to SCIPcreateCons.
The call could be 'gdb --args <your scip call>'. There are other
methods, like SCIPcreateConsLinear() which themselves call
SCIPcreateCons() and perhaps you give a NULL pointer to one of those.
In general, your issues seems to be quite basic C programming issues and
the SCIP mailing list with its well over 300 members might not be the
place to discuss them.
Best,
Gerald
Am 29.04.2016 um 11:57 schrieb Feng Gao:
> Hi Jacob,
>
> Thank you for your direction. I tried the debug mode. However before I
> tried in debug mode, I revised the code. Now the error disappear. I
> cannot remember what I did. But I think it relates to the
> initialization of Bool* stored.
>
> In debug mode, now I got a assertion "SCIPcreateCons: Assertion `name
> != ((void *)0)' failed." However I checked all the places I call
> SCIPcreateCons(...), the name are all assigned a specific char* or
> char[]. I do not know why this assertion appears. Certainly, it is
> another question which is not suitable to discuss under this topic.
> But any help with this problem is also appreciated.
>
> Best,
>
> Feng
>
> On 04/29/2016 03:03 AM, Jakob Witzig wrote:
>> Hi Feng Gao,
>>
>> please compile SCIP in debug mode with 'make OPT=dbg' and run your
>> code again. In debug mode all assertions are enabled and you can see
>> which assertion fail before the segfault happens. If no assertion
>> fails, please have a look into the code where the segfault comes
>> from. For this you can use a debugger like gdb: 'gdb --args <your
>> scip call>'.
>>
>> Cheers,
>> Jakob
>>
>> Am 29.04.2016 um 04:18 schrieb Feng Gao:
>>> Hi All,
>>>
>>> I am trying to provide the solution at SCIP_STAGE_PROBLEM, i.e., before
>>> I call SCIPsolve(scip).
>>> The problem is after I call SCIPcreateSol(...) and SCIPsetSolVal(...),
>>> the program gives "Segmentation fault" when I call SCIPaddSol(...),
>>> SCIPcheckSol(...), SCIPcheckSolOrig(...), SCIPtrySol(...), or
>>> SCIPtrySolFree(...).
>>>
>>> I am quite sure that the solution I provide is feasible. However,
>>> when I
>>> call these functions, they all give me only "Segmentation fault" but
>>> nothing else.
>>>
>>> What could go wrong when I set the solution? I would be very
>>> appreciated
>>> if anyone could give me a clue.
>>>
>>> Best,
>>>
>>> Feng Gao
>>> _______________________________________________
>>> Scip mailing list
>>> Scip at zib.de
>>> http://listserv.zib.de/mailman/listinfo/scip
>>
>>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
More information about the Scip
mailing list