ILOG CPLEX 11.0 User's Manual > Advanced Programming Techniques > Advanced MIP Control Interface > Introduction to MIP Control Callbacks > Thread Safety and MIP Control Callbacks

When you use a control callback with parallel MIP, you must observe several points about default parameter settings, thread-safety, and parallelism. This section addresses those points.

The presence of a control callback in an application with default parameter settings turns off parallel MIP. (Informational callbacks do not have this effect of turning off parallel MIP optimization by default. For more about informational callbacks, see Informational Callbacks.) In order to continue using parallelMIP in the presence of a control callback, the user must set the threads parameter (Threads, CPX_PARAM_THREADS) to a value strictly greater than one. It is then the responsability of the user to implement that control callback in such a way that the callback is thread-safe. In particular, the control callback must be written in such a way that it does not depend on the order in which callbacks are called, as no fixed order of calling the callbacks can be guaranteed by parallel ILOG CPLEX.

With respect to determinism, if the user sets the parallel mode parameter (ParallelMode, CPX_PARAM_PARALLELMODE) to 1 (one) thus invoking deterministic parallel MIP optimization, it is up to the user to make sure that the control callback does not interfere with the search in any way that would make the search opportunistic. To make sure of that condition, the control callback must use only information queried from ILOG CPLEX itself within the callback as the basis for algorithmic decisions. In other words, no information that accumulated in an external data structure over several invokations of the control callback can be used.