diff --git a/ortools/linear_solver/xpress_interface.cc b/ortools/linear_solver/xpress_interface.cc index e0be1c7838..eb1d667fd5 100644 --- a/ortools/linear_solver/xpress_interface.cc +++ b/ortools/linear_solver/xpress_interface.cc @@ -1427,11 +1427,10 @@ MPSolver::ResultStatus XpressInterface::Solve(MPSolverParameters const& param) { -1.0 * solver_->time_limit_in_secs())); } - // Solve. - // Do not CHECK_STATUS here since some errors (for example CPXERR_NO_MEMORY) - // still allow us to query useful information. timer.Restart(); - + // Solve. + // Do not CHECK_STATUS here since some errors still allow us to query useful + // information. int xpressstat = 0; if (mMip) { if (this->maximize_) @@ -1448,6 +1447,7 @@ MPSolver::ResultStatus XpressInterface::Solve(MPSolverParameters const& param) { } // Disable screen output right after solve + XPRSremovecbmessage(mLp, 0, 0); XPRSsetintcontrol(mLp, XPRS_OUTPUTLOG, 0); if (status) { @@ -1591,8 +1591,6 @@ MPSolver::ResultStatus XpressInterface::Solve(MPSolverParameters const& param) { } } - XPRSremovecbmessage(mLp, 0, 0); - sync_status_ = SOLUTION_SYNCHRONIZED; return result_status_; }