[Cbc] Forcing output to be line buffered?

John Forrest john.forrest at fastercoin.com
Sat Oct 3 10:36:14 EDT 2015


Jack,

Instead of using standalone Cbc use a driver like 
Cbc/examples/driver3.cpp (which gives same functionality) and pass in a 
message handler.  Look at Clp/examples/driver2.cpp to see what sort of 
thing has to be done.  Then you can flush the buffer in ::print.

John Forrest

On 03/10/15 15:12, Jack Dunn wrote:
> Hi,
>
> I'm running Cbc in a pipe to capture stdout/stderr, and I want to 
> display the solve process in real-time. It seems like Cbc switches to 
> using a 4K buffer rather than line-buffered writes when it detects it 
> isn't running interactively. Is there a way to force Cbc's writes to 
> be line-buffered? I want to avoid having to run the command through a 
> pseudo tty if possible.
>
> Thanks,
> Jack
>
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20151003/8c656126/attachment.html>


More information about the Cbc mailing list