[Scip] Assertion failed: branchcand->pseudocands[var->pseudocandindex] == var, file src\scip\branch.c, line 928
Sebastian Ruther
Sebastian.Ruther at uon.edu.au
Tue Apr 19 05:28:38 MEST 2011
Actually, the assert happens not only on Windows but also on Linux if
I use OPT=dbg. Below I used OPT=noblkmem.
Again the assertion happens only if I add
SCIP_CALL( SCIPprintBestSol(scip, file, FALSE) );
or
SCIP_CALL( SCIPprintTransProblem(scip, file, NULL, FALSE) );
or both. Otherwise I get the 'LP of current node is invalid' followed by
'node limit reached'
Sebastian
On 19/04/2011 12:09 AM, Sebastian Ruther wrote:
> Hello again,
>
> so I got it all running in Linux and used Valgrind. It comes up with
> some "Conditional jump or move depends on uninitialised values" and
> has lot's of lost memory, which is expected as I haven't coded
> anything that frees memory yet. See attached file.
> However, memory leak shouldn't be the issue.
> So that leads me back to my earlier question: Why is the LP invalid? I
> investigated some more when this problem occurs and got some strange
> behavior. But first let me repeat what I'm actually doing.
>
> I'm implementing a branch and price algorithm and so far I implemented
> a reader and a pricer, but (at least in this version) no branching
> rule or constraint handler (for the branching). I do have multiple
> subproblems that all get called in one iteration of a pricer. However,
> in the following I deactivate all but one subproblem.
> I load the default plugins and then for the master problem
> SCIP_CALL( SCIPsetIntParam(scip,"presolving/maxrestarts",0) );
> SCIP_CALL( SCIPsetIntParam(scip, "presolving/maxrounds", 0) );
> SCIP_CALL( SCIPsetIntParam(scip, "propagating/maxrounds", 0) );
> SCIP_CALL( SCIPsetIntParam(scip, "propagating/maxroundsroot", 0) );
> And for the subproblem
> SCIP_CALL( SCIPsetIntParam(subscip, "presolving/maxrounds", 0)
> ); disabling the presolver is quicker.
> SCIP_CALL( SCIPsetIntParam(subscip, "presolving/maxrestarts",
> 0) );
> SCIP_CALL( SCIPsetRealParam(subscip, "limits/gap", 0.01) );
>
> First, if I don't inlcude SCIP_CALL(
> SCIPsetLongintParam(scip,"limits/nodes", 1) ); then everything is
> fine, so from now on this option is always included.
>
> Then, in the beginning of pricer::scip_redcost I call
> SCIP_CALL(SCIPprintStatistics(scip, file)); (if I
> deactivate this I don't have any problems)
>
> And this causes problems. After the pricing round but before I enter
> scip again I get:
> [src/scip/solve.c:1341] Warning: pricing has been interrupted -- LP of
> current node is invalid
> 6.7s| 1 | 0 | 2 | - | 0 | 0 | - | 152 | 259 |
> 152 | 259 | 0 | 0 | 0 | -- | 1.270000e+04 | Inf
> 6.8s| 1 | 2 | 2 | - | 0 | 0 | 0 | 152 | 259 |
> 152 | 259 | 0 | 0 | 0 | -- | 1.270000e+04 | Inf
>
> SCIP Status : solving was interrupted [node limit reached]
> Solving Time (sec) : 6.78
> Solving Nodes : 1
> Primal Bound : +1.27000000000000e+04 (4 solutions)
> Dual Bound : -1.00000000000000e+20
> Gap : infinite
>
> this is on a linux machine. I attached the valgrind output.
>
> On a windows machine I get the same problem. However, if I add either
> SCIP_CALL( SCIPprintBestSol(scip, file, FALSE) );
> or
> SCIP_CALL( SCIPprintTransProblem(scip, file, NULL, FALSE) );
> or both I now get an assert:
>
> time | node | left |LP iter|LP it/n| mem |mdpt |frac |vars |cons
> |cols |rows |cuts |confs|strbr| dualbound | primalbound | gap
> t 2.9s| 1 | 0 | 6 | - | 652k| 0 | 0 | 159 | 259 |
> 159 | 259 | 0 | 0 | 0 | -- |1.500000e+004 | Inf
> [src\scip\solve.c:1312] Warning: pricing has been interrupted -- LP of
> current node is invalid
> 2.9s| 1 | 0 | 6 | - | 652k| 0 | 0 | 159 | 259 |
> 159 | 259 | 0 | 0 | 0 | -- |1.500000e+004 | Inf
> * 2.9s| 1 | 0 | 6 | - | 654k| 0 | - | 159 | 259 |
> 159 | 259 | 0 | 0 | 0 | -- |1.270000e+004 | Inf
> Assertion failed: SCIPlpGetSolstat(lp) == SCIP_LPSOLSTAT_OPTIMAL ||
> SCIPlpGetSolstat(lp) == SCIP_LPSOLSTAT_UNBOUNDEDRAY, file
> src\scip\branch.c, line 200
>
> The call stack is
>
>> msvcr100d.dll!_NMSG_WRITE(int rterrnum=10) Line 217
> msvcr100d.dll!abort() Line 71
> msvcr100d.dll!_wassert(const wchar_t * expr=0x000000014021a4b0,
> const wchar_t * filename=0x000000014021a488, unsigned int lineno=200)
> Line 153
>
> binscip.exe!branchcandCalcLPCands(std::basic_ostream<char,std::char_traits<char>
> > & (char) branchcand=0x000000000013f010) Line 200 + 0x3e bytes
> binscip.exe!SCIPbranchcandGetLPCands() Line 344 + 0x19 bytes
> binscip.exe!solveNode() Line 2849 + 0x56 bytes
> binscip.exe!SCIPsolveCIP() Line 3264 + 0x101 bytes
> binscip.exe!SCIPsolve() Line 6827 + 0x11f bytes
> binscip.exe!runSCIP(int argc=1, char * *
> argv=0x00000000004776f0) Line 181 + 0xa bytes
> binscip.exe!main(int argc=1, char * * argv=0x00000000004776f0)
> Line 238 + 0xe bytes
> binscip.exe!__tmainCRTStartup() Line 555 + 0x19 bytes
> binscip.exe!mainCRTStartup() Line 371
> kernel32.dll!0000000076e3f56d()
> [Frames below may be incorrect and/or missing, no symbols loaded
> for kernel32.dll]
> ntdll.dll!0000000076f72cc1()
>
> so none of the calls I mentioned above are used.
>
> Any help is appreciated.
>
> Sebastian
>
>
>
>
>
>
> On 7/04/2011 7:42 PM, Sebastian Ruther wrote:
>> Hello,
>>
>> I went back to an early version of my code to see if this indeed has
>> something to do with the branching rule and the constraint handler. So
>> this version does not include them at all, instead uses the default
>> plugins. When I set the node limit to 1 I get the following error after
>> the first round of pricing. Note it should have executed 110 iterations
>> in the root node. So this is the output for the master problem after
>> iteration 1:
>>
>> time | node | left |LP iter|LP it/n| mem |mdpt |frac |vars |cons
>> |cols |rows |cuts |confs|strbr| dualbound | primalbound | gap
>> t 2.9s| 1 | 0 | 6 | - | 652k| 0 | 0 | 159 | 259 |
>> 159 | 259 | 0 | 0 | 0 | -- |1.500000e+004 | Inf
>> [src\scip\solve.c:1312] Warning: pricing has been interrupted -- LP of
>> current node is invalid
>> 2.9s| 1 | 0 | 6 | - | 652k| 0 | 0 | 159 | 259 |
>> 159 | 259 | 0 | 0 | 0 | -- |1.500000e+004 | Inf
>> * 2.9s| 1 | 0 | 6 | - | 654k| 0 | - | 159 | 259 |
>> 159 | 259 | 0 | 0 | 0 | -- |1.270000e+004 | Inf
>> Assertion failed: SCIPlpGetSolstat(lp) == SCIP_LPSOLSTAT_OPTIMAL ||
>> SCIPlpGetSolstat(lp) == SCIP_LPSOLSTAT_UNBOUNDEDRAY, file
>> src\scip\branch.c, line 200
>>
>> I don't know if this is a different problem or if whatever causes the
>> other problem causes this one as well. Why is the LP invalid? I don't
>> have Valgrind as I run Windows 7. Is there anything else I can do before
>> trying to set up something for Valgrind? What other information do
>> you need?
>>
>> Thanks
>> Sebastian
>>
>> On 6/04/2011 10:57 PM, Stefan Vigerske wrote:
>>> Hi,
>>>
>>>> The call stack reads
>>>> SCIPsolve
>>>> SCIPsolveCIP scip.c line 3229
>>>> SCIPnodeFocus(...) solve.c line 3229
>>>> treeSwitchPath(tree, blkmem, set, stat, prob, primal, lp,
>>>> branchcand, conflict, eventfilter, eventqueue, fork, *node, cutoff)
>>>> tree.c line 3984
>>>> SCIPeventqueueProcess(eventqueue, blkmem, set, primal, lp,
>>>> branchcand, eventfilter) tree.c line 2768
>>>> SCIPeventProcess(event, set, primal, lp, branchcand, eventfilter)
>>>> event.c line 2174
>>>> SCIPbranchcandUpdateVar(branchcand, set, var) event.c line 1390
>>>> SCIPbranchcandRemoveVar(branchcand, var) branch.c line 1053
>>>> branchcandRemovePseudoCand(branchcand, var) branch.c line 1012
>>>> assert(branchcand->pseudocands[branchcand->npseudocands-1] !=
>>>> NULL); branch.c line 928
>>>>
>>>> I've isolated the problem somewhat. However, whether these actions
>>>> cause or just trigger detection of the problem I don't know:
>>>> The way I implemented the branching is that the scip_activate of
>>>> the constraint handler removes some arcs (i.e. variables) from the
>>>> sub problem. For this it sets the upper bound to 0 by calling
>>>> SCIPchgVarUbNode. I got an error here before saying ERROR: original
>>>> variable has no transformed variable attached. I guess that's
>>>> because no transformed sub problem exists at this point.
>>> If there is no transformed problem, then SCIPchgVarUbNode is not the
>>> function to call. Probably you want to use SCIPchgVarUb.
>>>
>>> Also try running your code through valgrind.
>>>
>>> Stefan
>>>
>>>> The pricing problems are generated in the Objpricer::init_sol and I
>>>> only update the cost coefficients in the scip_redcost function.
>>>> What happens is that the scip_redcost destroys the transformed
>>>> problem after it's finished. So every time scip_redcost is executed
>>>> it needs to transform the original problem. Because the constraint
>>>> handler is called before scip_redcost I call SCIPtransformProb in
>>>> the constraint handler. Probably not the most elegant
>>>> implementation but apart from that, is there any problem with
>>>> calling it here?
>>>>
>>>> Cheers,
>>>> Sebastian
>>>> ________________________________________
>>>> From: Stefan Vigerske [stefan at math.hu-berlin.de]
>>>> Sent: 04 April 2011 21:10
>>>> To: Sebastian Ruther
>>>> Cc: scip at zib.de
>>>> Subject: Re: [Scip] Assertion failed:
>>>> branchcand->pseudocands[var->pseudocandindex] == var, file
>>>> src\scip\branch.c, line 928
>>>>
>>>> Hi,
>>>>
>>>>> Hello,
>>>>>
>>>>> I'm currently implementing a follow-on branching rule and I get the
>>>>> following error:
>>>>> Assertion failed: branchcand->pseudocands[var->pseudocandindex] ==
>>>>> var,
>>>>> file src\scip\branch.c, line 928
>>>>> What does this error mean? What are these pseudocands?
>>>> Die pseudocands are branching candidates for pseudo branching, in
>>>> principle the binary or integer variables that are not fixed in the
>>>> current node.
>>>> If you get this assertion, then I guess some datastructures have been
>>>> corrupted.
>>>>
>>>>> The error occurs after i execute the ObjConshdlr::scip_activate.
>>>>> I've implemented the ObjBranchrule::scip_execlp. I have not
>>>>> imlemented
>>>>> the ObjBranchrule::scip_execps but it looks like it is not entered. I
>>>>> think the error is because of something in the constraint handler I
>>>>> implemented because when I comment out those calls I don't get any
>>>>> errors.
>>>> To give some helpful comments, it would be useful to get more
>>>> information about what you are doing and when this problem exactly
>>>> happens.
>>>> Can you provide a backtrace from running in a debugger?
>>>> Which SCIP functions does your code call?
>>>>
>>>> Stefan
>>>>
>>>>> Thanks
>>>>> Sebastian
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Scip mailing list
>>>>> Scip at zib.de
>>>>> http://listserv.zib.de/mailman/listinfo/scip
>>>>>
>>>> --
>>>> Stefan Vigerske
>>>> Humboldt University Berlin, Numerical Mathematics
>>>> http://www.math.hu-berlin.de/~stefan
>>>>
>>> .
>>>
>> _______________________________________________
>> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.zib.de/mailman/private/scip/attachments/20110419/4f0bde76/attachment.html
More information about the Scip
mailing list