Skip to content

Commit d27d46b

Browse files
committed
Cleared out development logging
1 parent c52e2af commit d27d46b

File tree

6 files changed

+10
-53
lines changed

6 files changed

+10
-53
lines changed

check/TestMipSolver.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,8 +1037,9 @@ TEST_CASE("issue-2432", "[highs_test_mip_solver]") {
10371037
}
10381038

10391039
TEST_CASE("mip-race", "[highs_test_mip_solver]") {
1040-
const bool ci_test = true;
1041-
const std::string model = ci_test ? "flugpl" : "fiball";
1040+
const bool ci_test = false;
1041+
const std::string test_build_model = "fiball";
1042+
const std::string model = ci_test ? "flugpl" : test_build_model;
10421043
// "neos-3381206-awhea";
10431044
const std::string model_file =
10441045
ci_test ? std::string(HIGHS_DIR) + "/check/instances/" + model + ".mps"

highs/lp_data/Highs.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4049,7 +4049,7 @@ HighsStatus Highs::callSolveMip() {
40494049
worker_callback.clear();
40504050
// Race the MIP solver!
40514051
highsLogUser(options_.log_options, HighsLogType::kInfo,
4052-
"Starting MIP race with %d instances: performance is "
4052+
"Starting MIP race with %d instances: behaviour is "
40534053
"non-deterministic!\n",
40544054
int(mip_race_concurrency));
40554055
// Define the HighsMipSolverInfo record for each worker
@@ -4083,10 +4083,7 @@ HighsStatus Highs::callSolveMip() {
40834083
terminator_record.data());
40844084
solver.initialiseMipRace(mip_race_concurrency, instance,
40854085
&mip_race_record);
4086-
double this_time = timer_.read();
4087-
highsLogUser(options_.log_options, HighsLogType::kInfo,
4088-
"instance0: call run() %f6.4\n", this_time);
4089-
mip_time[instance] = -this_time;
4086+
mip_time[instance] = -timer_.read();
40904087
solver.run();
40914088
mip_time[instance] += timer_.read();
40924089
mip_solver_info = getMipSolverInfo(solver);
@@ -4097,11 +4094,7 @@ HighsStatus Highs::callSolveMip() {
40974094
terminator_record.data());
40984095
worker.initialiseMipRace(mip_race_concurrency, instance,
40994096
&mip_race_record);
4100-
double this_time = timer_.read();
4101-
highsLogUser(options_.log_options, HighsLogType::kInfo,
4102-
"instance%d: call run() %f6.4\n", int(instance),
4103-
this_time);
4104-
mip_time[instance] = -this_time;
4097+
mip_time[instance] = -timer_.read();
41054098
worker.run();
41064099
mip_time[instance] += timer_.read();
41074100
worker_info[instance] = getMipSolverInfo(worker);

highs/lp_data/HighsInterface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4269,7 +4269,7 @@ HighsStatus Highs::mipRaceResults(
42694269
HighsInt winning_instance = -1;
42704270
HighsModelStatus winning_model_status = HighsModelStatus::kNotset;
42714271
highsLogUser(options_.log_options, HighsLogType::kInfo,
4272-
"/nMIP race results\n");
4272+
"\nMIP race results\n");
42734273
for (HighsInt instance = 0; instance < mip_race_concurrency; instance++) {
42744274
const HighsMipSolverInfo& solver_info =
42754275
instance == 0 ? mip_solver_info : worker_info[instance];

highs/mip/HighsMipSolver.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@ HighsMipSolver::~HighsMipSolver() = default;
7575
void HighsMipSolver::run() {
7676
modelstatus_ = HighsModelStatus::kNotset;
7777

78-
if (!submip)
79-
highsLogUser(options_mip_->log_options, HighsLogType::kInfo,
80-
"instance%d: top run() %6.4f (MIP)\n",
81-
int(this->mip_race_.my_instance), this->timer_.read());
82-
8378
if (submip) {
8479
analysis_.analyse_mip_time = false;
8580
} else {
@@ -699,13 +694,8 @@ void HighsMipSolver::run() {
699694

700695
void HighsMipSolver::cleanupSolve() {
701696
if (mipdata_->terminatorActive()) {
702-
mipdata_->terminatorReport();
703697
if (mipdata_->terminatorTerminated()) {
704698
// Indicate that this instance has been interrupted
705-
highsLogUser(options_mip_->log_options, HighsLogType::kInfo,
706-
"instance%d: terminated %6.4f (%sMIP)\n",
707-
int(this->mipdata_->terminatorMyInstance()),
708-
this->timer_.read(), submip ? "sub-" : "");
709699
modelstatus_ = HighsModelStatus::kHighsInterrupt;
710700
} else if (!submip) {
711701
// When sub-MIPs call cleanupSolve(), they generally don't have
@@ -715,15 +705,8 @@ void HighsMipSolver::cleanupSolve() {
715705
// reached
716706
//
717707
// No other instance has terminated, so terminate
718-
highsLogUser(options_mip_->log_options, HighsLogType::kInfo,
719-
"instance%d: terminate %6.4f (%sMIP)\n",
720-
int(this->mipdata_->terminatorMyInstance()),
721-
this->timer_.read(), submip ? "sub-" : "");
722708
mipdata_->terminatorTerminate();
723709
}
724-
mipdata_->terminatorReport();
725-
// Report on any active MIP race
726-
mipdata_->mipRaceReport();
727710
}
728711

729712
// Force a final logging line

highs/mip/HighsMipSolverData.cpp

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2421,20 +2421,8 @@ bool HighsMipSolverData::checkLimits(int64_t nodeOffset) const {
24212421
const HighsOptions& options = *mipsolver.options_mip_;
24222422

24232423
// This MIP instance may have been terminated
2424-
if (terminatorActive()) {
2425-
highsLogUser(options.log_options, HighsLogType::kInfo,
2426-
"instance%d: terminated? %6.4f (%sMIP)\n",
2427-
int(this->terminatorMyInstance()),
2428-
this->mipsolver.timer_.read(), mipsolver.submip ? "sub-" : "");
2429-
if (this->terminatorTerminated()) {
2430-
highsLogUser(options.log_options, HighsLogType::kInfo,
2431-
"instance%d: terminated %6.4f (%sMIP)\n",
2432-
int(this->terminatorMyInstance()),
2433-
this->mipsolver.timer_.read(),
2434-
mipsolver.submip ? "sub-" : "");
2435-
return true;
2436-
}
2437-
}
2424+
if (terminatorActive())
2425+
if (this->terminatorTerminated()) return true;
24382426

24392427
// Possible user interrupt
24402428
if (!mipsolver.submip && mipsolver.callback_->user_callback) {
@@ -2999,7 +2987,7 @@ void MipRace::update(const double objective,
29992987
const std::vector<double>& solution) {
30002988
assert(this->record);
30012989
this->record->update(this->my_instance, objective, solution);
3002-
this->report();
2990+
// this->report();
30032991
}
30042992

30052993
bool MipRace::newSolution(const HighsInt instance, double objective,

highs/mip/HighsPrimalHeuristics.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,6 @@ bool HighsPrimalHeuristics::solveSubMip(
145145
// Initialise termination_status_ and propagate any terminator to
146146
// the sub-MIP
147147
submipsolver.initialiseTerminator(mipsolver);
148-
printf(
149-
"HighsPrimalHeuristics::solveSubMip: %d submipsolver.termination_status_ "
150-
"= %d\n",
151-
int(submipsolver.terminator_.my_instance),
152-
int(submipsolver.termination_status_));
153148
submipsolver.rootbasis = &basis;
154149
HighsPseudocostInitialization pscostinit(mipsolver.mipdata_->pseudocost, 1);
155150
submipsolver.pscostinit = &pscostinit;
@@ -172,9 +167,6 @@ bool HighsPrimalHeuristics::solveSubMip(
172167
assert(submipsolver.mipdata_);
173168
}
174169
if (submipsolver.termination_status_ != HighsModelStatus::kNotset) {
175-
printf("HighsPrimalHeuristics::solveSubMip: %d termination status is %d\n",
176-
int(submipsolver.terminator_.my_instance),
177-
int(submipsolver.termination_status_));
178170
mipsolver.termination_status_ = submipsolver.termination_status_;
179171
return false;
180172
}

0 commit comments

Comments
 (0)