MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / start

Method start

highs/lp_data/HighsInterface.cpp:4380–4411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4378}
4379
4380void HighsProfiling::start(const HighsInt profiling_clock, const bool restart) {
4381 assert(profiling_clock >= 0);
4382 if (profiling_clock >= this->num_profiling_clock_) return;
4383 // For a sub-MIP, don't start the clock for anything but a
4384 // sub-solver
4385 if (this->isSubMip() && profiling_clock >= kToSubSolver) return;
4386 // Start timing sub-solver profiling_clock
4387 HighsInt thread = this->myThread();
4388 HighsProfilingRecord* thread_record = this->getHighsProfilingRecord();
4389 double time_start = timer->read();
4390
4391 if (profiling_clock == kMipClockSubMipSolve) {
4392 printf("HighsProfiling::start SubMipSolve on thread %2d with submip = %s\n",
4393 int(thread), this->submip[thread] ? "T" : "F");
4394 }
4395 const bool clock_running =
4396 std::signbit(thread_record->start_time[profiling_clock]);
4397 if (clock_running && profiling_clock != kSubSolverHipoAc &&
4398 profiling_clock != kSubSolverIpxAc) {
4399 // Check for starting a clock that's currently running - except
4400 // for analytic centre calculation that may by stopped by
4401 // terminating the task
4402 printf(
4403 "HighsProfiling: clock running for thread %d when starting clock %d "
4404 "(%s) and subMip = %s\n",
4405 int(thread), int(profiling_clock), this->name[profiling_clock].c_str(),
4406 this->submip[thread] ? "T" : "F");
4407 assert(!clock_running);
4408 }
4409 thread_record->start_time[profiling_clock] = -time_start;
4410 if (restart) thread_record->num_call[profiling_clock]--;
4411}
4412
4413void HighsProfiling::stop(const HighsInt profiling_clock) {
4414 assert(profiling_clock >= 0);

Callers 15

hipdlpTimerStartMethod · 0.45
separateImpliedBoundsMethod · 0.45
runMethod · 0.45
solveSubMipMethod · 0.45
runMethod · 0.45
cleanupSolveMethod · 0.45
separationRoundMethod · 0.45
runMipPresolveMethod · 0.45
evaluateRootNodeMethod · 0.45
simplexTimerStartMethod · 0.45
solveLpSimplexFunction · 0.45

Calls 5

isSubMipMethod · 0.95
myThreadMethod · 0.95
c_strMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected