[Osi] std::cout and messageHandler() in OsiClpSolverInterface

John Perry John.Perry at usm.edu
Mon Jan 9 15:20:42 EST 2012


I'm one of at least two people working on updating the Coin package in the Sage computer algebra system. I have a question in the way OsiClpSolverInterface handles log levels for messages to the user.

In lines 7926-7 of OsiClpSolverInterface.cpp, this seems to be handled properly: a message destined for the user is passed through messageHandler(), which apparently pays attention to the logLevel. (I get this idea from seeing the messageHandler()'s setLogLevel() method invoked several times.)

In line 7893, however, as well as a few others like it, non-critical messages for the user are sent to std::cout.

(1) Is this a bug?

(2) If not, can anyone suggest a way to impose a vow of silence? We are invoking the Osi interface from Cython, so we have some access to C++.

john perry

More information about the Osi mailing list