[SCIP] locking while separating
Gerald Gamrath
gamrath at zib.de
Mon Mar 7 11:04:02 CET 2016
Hi James,
nice to hear that you figured out what the problem was. It's strange
that the SCIP_CALL seems to mess up your profiling, I did not experience
this before. Did you do the profiling using the OPT=prf option?
Recently, I prefer using valgrind --tool=callgrind. It is quite slow,
but gives you good output, you can even use the opt-mode, but should
compile with USROFLAGS="-g".
Best,
Gerald
On 07.03.2016 10:03, James Cussens wrote:
> Dear Gerald,
>
> I finally got to the bottom of this. Some of the functions my
> "ChordalSeparate" function was calling returned SCIP_RETCODE and were
> wrapped inside a SCIP_CALL. These functions did not appear
> in the output from the profile. I altered them to be 'normal'
> functions and called them without the SCIP_CALL wrapping. After doing
> this they appeared as expected in the profile output and my constraint
> handler's
> lock method ( consLockChordal ) only showed up as being called twice.
> So everything now makes sense.
>
> One thing perhaps noting, my original approach - where the functions
> were wrapped inside a SCIP_CALL - was a bit silly: there was no point
> doing this wrapping and the SCIP* pointer I sent to the functions
> was not even used in them. (An earlier version had done some
> SCIPallocMemoryArray calls but I then removed these.) Perhaps this
> weird code somehow confused the profiling.
>
> James
>
>
>
> On 1 March 2016 at 22:52, Gerald Gamrath <gamrath at zib.de
> <mailto:gamrath at zib.de>> wrote:
>
> Dear James,
>
> this looks unexpected. Your separator adds constraints of your
> constraints handler and no rows? Then, the CONSLOCK callback of
> your constraint handler is called whenever a constraint is added
> to update the rounding locks of variables in the constraint. Could
> there be a performance issue in that CALLBACK implementation?
>
> Best,
> Gerald
>
> Am 28.02.2016 um 17:14 schrieb James Cussens:
>> I have implemented a separator for a constraint handler I have
>> written. When profiling I find that most of the time is spent
>> when my separator calls my constraint hander's lock method:
>>
>> 2 SCIPconsAddLocks <cycle 2> [2184]
>> 257328483 ChordalSeparate <cycle
>> 2> [19]
>> [3] 49.2 27.00 0.64 257328485 consLockChordal <cycle 2> [3]
>> 0.35 0.00 110035069/224944534
>> BMSreallocMemoryArray_call [45]
>> 0.29 0.00 147293414/176070304
>> BMSallocMemoryArray_call [61]
>> 0.00 0.00 1332/12022817 readNextLine [147]
>> 0.00 0.00 1332/262849 get_edge [2084]
>> 498 SCIPaddVarLocks <cycle 2>
>> [2102]
>>
>> I'm not sure why this is happening. Can anyone enlighten me?
>>
>> Thanks,
>>
>> James
>>
>> --
>> James Cussens
>> Dept of Computer Science &
>> York Centre for Complex Systems Analysis
>> Room 326, The Hub, Deramore Lane Tel +44 (0)1904 325371
>> University of York Fax +44 (0)1904 500159
>> <tel:%2B44%20%280%291904%20500159>
>> York YO10 5GE, UK http://www.cs.york.ac.uk/~jc
>> <http://www.cs.york.ac.uk/%7Ejc>
>> http://www.york.ac.uk/docs/disclaimer/email.htm
>>
>>
>> _______________________________________________
>> Scip mailing list
>> Scip at zib.de <mailto:Scip at zib.de>
>> http://listserv.zib.de/mailman/listinfo/scip
>
>
>
>
> --
> James Cussens
> Dept of Computer Science &
> York Centre for Complex Systems Analysis
> Room 326, The Hub, Deramore Lane Tel +44 (0)1904 325371
> University of York Fax +44
> (0)1904 500159
> York YO10 5GE, UK http://www.cs.york.ac.uk/~jc
> <http://www.cs.york.ac.uk/%7Ejc>
> http://www.york.ac.uk/docs/disclaimer/email.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20160307/8b2375c2/attachment.html>
More information about the Scip
mailing list