[Cbc] Terminating cbc run

Fei Peng fpeng at cs.cmu.edu
Fri Feb 28 15:11:34 EST 2014


Hi,

I recently ran into a problem about terminating cbc: I have a few 
different cbcmodel's built and running concurrently on different 
threads, and at some point I might decide to stop some of them from 
continuing to run, and kill that thread.

I understand that pthread_cancel will only cancel the execution of a 
thread when it runs into a predefined set of codes, and it's not done 
immediately after I call pthread_cancel() -- in which case each thread 
I'm cancelling will need to wait for it's cbcmodel to finish and then 
cancel. My question is: is there a way to signal cbc in the middle of 
the optimization, so that it stops immediately?  Is sayEventHappened() 
designed to do this? Please advise

Thanks!
Fei


More information about the Cbc mailing list