Skip to content
2 changes: 1 addition & 1 deletion app/RunHighs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ int main(int argc, char** argv) {

// Shut down task executor for explicit release of memory.
// Valgrind still reachable otherwise.
highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);

return runHighsReturn(highs, run_status);
}
6 changes: 3 additions & 3 deletions check/TestAlienBasis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ void testAlienBasis(const bool avgas, const HighsInt seed) {
highs.run();
}

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("AlienBasis-reuse-basis", "[highs_test_alien_basis]") {
Expand Down Expand Up @@ -677,7 +677,7 @@ TEST_CASE("AlienBasis-reuse-basis", "[highs_test_alien_basis]") {
highs.run();
if (dev_run) highs.writeSolution("", 1);

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("AlienBasis-singular-basis", "[highs_test_alien_basis]") {
Expand Down Expand Up @@ -716,5 +716,5 @@ TEST_CASE("AlienBasis-singular-basis", "[highs_test_alien_basis]") {
return_status = highs.getBasicVariables(basic_variables.data());
REQUIRE(return_status == HighsStatus::kError);

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}
12 changes: 6 additions & 6 deletions check/TestBasis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ TEST_CASE("Basis-file", "[highs_basis_file]") {
std::remove(basis_file.c_str());
std::remove(invalid_basis_file.c_str());

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("Basis-data", "[highs_basis_data]") {
Expand Down Expand Up @@ -110,7 +110,7 @@ TEST_CASE("Basis-data", "[highs_basis_data]") {
testBasisRestart(highs, basis_file, false);
testBasisReloadModel(highs, basis_file, false);

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("set-pathological-basis", "[highs_basis_data]") {
Expand Down Expand Up @@ -147,7 +147,7 @@ TEST_CASE("set-pathological-basis", "[highs_basis_data]") {
highs.run();
REQUIRE(highs.getModelStatus() == HighsModelStatus::kUnbounded);

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("Basis-no-basic", "[highs_basis_data]") {
Expand All @@ -173,7 +173,7 @@ TEST_CASE("Basis-no-basic", "[highs_basis_data]") {
REQUIRE(highs.getInfo().objective_function_value == -0.5);
REQUIRE(highs.getModelStatus() == HighsModelStatus::kOptimal);

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("Basis-singular", "[highs_basis_data]") {
Expand Down Expand Up @@ -352,6 +352,6 @@ TEST_CASE("Basis-read", "[highs_basis_data]") {
REQUIRE(basis2.col_status[0] == status_after);

std::remove(basis_file.c_str());
h1.resetGlobalScheduler(true);
h2.resetGlobalScheduler(true);
h1.resetThreadScheduler(true);
h2.resetThreadScheduler(true);
}
6 changes: 3 additions & 3 deletions check/TestBasisSolves.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ TEST_CASE("Basis-solves", "[highs_basis_solves]") {
highs.run();
REQUIRE(highs.getInfo().simplex_iteration_count == 0);

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("Kappa", "[highs_basis_solves]") {
Expand Down Expand Up @@ -613,7 +613,7 @@ TEST_CASE("Kappa", "[highs_basis_solves]") {
REQUIRE(highs.getKappa(kappa) == HighsStatus::kError);
}

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("2913", "[highs_basis_solves]") {
Expand Down Expand Up @@ -665,5 +665,5 @@ TEST_CASE("2913", "[highs_basis_solves]") {
}

std::remove(basis_file.c_str());
h.resetGlobalScheduler(true);
h.resetThreadScheduler(true);
}
24 changes: 12 additions & 12 deletions check/TestCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ TEST_CASE("highs-callback-logging", "[highs_callback]") {
highs.readModel(filename);
highs.run();

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("highs-callback-solution-basis-logging", "[highs_callback]") {
Expand All @@ -403,7 +403,7 @@ TEST_CASE("highs-callback-solution-basis-logging", "[highs_callback]") {
if (dev_run) highs.writeSolution("", kSolutionStylePretty);
if (dev_run) highs.writeBasis("");

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("highs-callback-simplex-interrupt", "[highs_callback]") {
Expand All @@ -420,7 +420,7 @@ TEST_CASE("highs-callback-simplex-interrupt", "[highs_callback]") {
REQUIRE(highs.getInfo().simplex_iteration_count >
adlittle_simplex_iteration_limit);

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("highs-callback-ipm-interrupt", "[highs_callback]") {
Expand All @@ -447,7 +447,7 @@ TEST_CASE("highs-callback-ipm-interrupt", "[highs_callback]") {
REQUIRE(highs.getInfo().ipm_iteration_count ==
adlittle_ipm_iteration_limit + 1);
}
highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("highs-callback-mip-interrupt", "[highs_callback]") {
Expand All @@ -463,7 +463,7 @@ TEST_CASE("highs-callback-mip-interrupt", "[highs_callback]") {
REQUIRE(highs.getModelStatus() == HighsModelStatus::kInterrupt);
REQUIRE(highs.getInfo().objective_function_value > egout_optimal_objective);

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("highs-callback-mip-improving", "[highs_callback]") {
Expand All @@ -478,7 +478,7 @@ TEST_CASE("highs-callback-mip-improving", "[highs_callback]") {
highs.readModel(filename);
highs.run();

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("highs-callback-mip-data", "[highs_callback]") {
Expand All @@ -492,7 +492,7 @@ TEST_CASE("highs-callback-mip-data", "[highs_callback]") {
highs.readModel(filename);
highs.run();

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("highs-callback-mip-solution", "[highs_callback]") {
Expand All @@ -514,7 +514,7 @@ TEST_CASE("highs-callback-mip-solution", "[highs_callback]") {
highs.startCallback(kCallbackMipSolution);
highs.run();

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("highs-callback-mip-cut-pool", "[highs_callback]") {
Expand All @@ -526,7 +526,7 @@ TEST_CASE("highs-callback-mip-cut-pool", "[highs_callback]") {
highs.startCallback(kCallbackMipGetCutPool);
highs.run();

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

static void runMipUserSolutionTest(
Expand Down Expand Up @@ -566,7 +566,7 @@ static void runMipUserSolutionTest(
std::max(1.0, std::fabs(objective_function_value0));
REQUIRE(objective_diff < 1e-12);
}
highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("highs-callback-mip-user-solution", "[highs-callback]") {
Expand Down Expand Up @@ -637,7 +637,7 @@ TEST_CASE("highs-callback-mip-user-solution-c", "[highs-callback]") {
highs.startCallback(kCallbackMipSolution);

highs.run();
highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("highs-callback-qpasm", "[highs_callback]") {
Expand All @@ -653,5 +653,5 @@ TEST_CASE("highs-callback-qpasm", "[highs_callback]") {
highs.startCallback(kCallbackQpInterrupt);
highs.run();
REQUIRE(highs.getInfo().qp_iteration_count == 6);
highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}
24 changes: 12 additions & 12 deletions check/TestCheckSolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ TEST_CASE("check-set-mip-solution", "[highs_check_solution]") {
assert(other_tests);
std::remove(solution_file.c_str());

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("set-pathological-solution", "[highs_check_solution]") {
Expand Down Expand Up @@ -283,7 +283,7 @@ TEST_CASE("set-pathological-solution", "[highs_check_solution]") {
highs.run();
REQUIRE(highs.getModelStatus() == HighsModelStatus::kUnbounded);

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("check-set-lp-solution", "[highs_check_solution]") {
Expand Down Expand Up @@ -328,7 +328,7 @@ TEST_CASE("check-set-rowwise-lp-solution", "[highs_check_solution]") {
double objective2 = highs.getInfo().objective_function_value;
REQUIRE(fabs(objective1 - objective2) / max(1.0, objective1) < 1e-5);

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("check-set-mip-solution-extra-row", "[highs_check_solution]") {
Expand Down Expand Up @@ -360,7 +360,7 @@ TEST_CASE("check-set-mip-solution-extra-row", "[highs_check_solution]") {
if (dev_run) highs.writeSolution("", 1);
std::remove(solution_file_name.c_str());

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("check-set-illegal-solution", "[highs_check_solution]") {
Expand Down Expand Up @@ -422,7 +422,7 @@ TEST_CASE("read-miplib-solution", "[highs_check_solution]") {
REQUIRE(h.run() == HighsStatus::kOk);
std::remove(miplib_sol_file.c_str());

h.resetGlobalScheduler(true);
h.resetThreadScheduler(true);
}

TEST_CASE("read-lp-file-solution", "[highs_check_solution]") {
Expand Down Expand Up @@ -460,7 +460,7 @@ TEST_CASE("read-lp-file-solution", "[highs_check_solution]") {
std::remove(model_file_name.c_str());
std::remove(solution_file_name.c_str());

h.resetGlobalScheduler(true);
h.resetThreadScheduler(true);
}

TEST_CASE("read-lp-file-basis", "[highs_check_solution]") {
Expand Down Expand Up @@ -504,7 +504,7 @@ TEST_CASE("read-lp-file-basis", "[highs_check_solution]") {
std::remove(model_file_name.c_str());
std::remove(basis_file_name.c_str());

h.resetGlobalScheduler(true);
h.resetThreadScheduler(true);
}

TEST_CASE("read-lp-file-rgn", "[highs_check_solution]") {
Expand Down Expand Up @@ -534,7 +534,7 @@ TEST_CASE("read-lp-file-rgn", "[highs_check_solution]") {
std::remove(model_file_name.c_str());
std::remove(solution_file_name.c_str());

h.resetGlobalScheduler(true);
h.resetThreadScheduler(true);
}

void runWriteReadCheckSolution(Highs& highs, const std::string& test_name,
Expand Down Expand Up @@ -594,7 +594,7 @@ void runWriteReadCheckSolution(Highs& highs, const std::string& test_name,

std::remove(solution_file.c_str());

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

void runSetLpSolution(const std::string model) {
Expand Down Expand Up @@ -663,7 +663,7 @@ void runSetLpSolution(const std::string model) {

std::remove(solution_file.c_str());

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("miplib-sol-file", "[highs_check_solution]") {
Expand Down Expand Up @@ -702,7 +702,7 @@ TEST_CASE("miplib-sol-file", "[highs_check_solution]") {
std::remove(lp_file.c_str());
std::remove(sol_file.c_str());

h.resetGlobalScheduler(true);
h.resetThreadScheduler(true);
}

TEST_CASE("issue-3317", "[highs_check_solution]") {
Expand Down Expand Up @@ -743,5 +743,5 @@ TEST_CASE("issue-3317", "[highs_check_solution]") {

std::remove(sol_file.c_str());

h.resetGlobalScheduler(true);
h.resetThreadScheduler(true);
}
2 changes: 1 addition & 1 deletion check/TestCrossover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void test_crossover(Highs& highs, HighsLp& lp) {
report("After crossover", lp, solution, basis);
report("From Highs", lp, highs.getSolution(), highs.getBasis());

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

void report(const std::string message, const HighsLp& lp,
Expand Down
2 changes: 1 addition & 1 deletion check/TestDualize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ TEST_CASE("Dualize", "[highs_test_dualize]") {
// instanceTest(highs, "afiro");
// instanceTest(highs, "adlittle");
instanceTest(highs, "25fv47");
highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

void dualizeTest(Highs& highs) {
Expand Down
6 changes: 3 additions & 3 deletions check/TestEkk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void ekk_solve(Highs& highs, std::string presolve,
REQUIRE(highs.resetOptions() == HighsStatus::kOk);
highs.setOptionValue("output_flag", dev_run);

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

void ekk_distillation(Highs& highs) {
Expand Down Expand Up @@ -89,7 +89,7 @@ TEST_CASE("Ekk", "[highs_test_ekk]") {
// ekk_scipLpi3(highs);
}

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("EkkPrimal-all", "[highs_test_ekk]") {
Expand Down Expand Up @@ -129,5 +129,5 @@ TEST_CASE("Ekk-excessive-primal-value", "[highs_test_ekk]") {
REQUIRE(highs.run() == HighsStatus::kError);
REQUIRE(log.find("Excessive primal value") != std::string::npos);

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}
6 changes: 3 additions & 3 deletions check/TestFactor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ TEST_CASE("Factor-dense-tran", "[highs_test_factor]") {
rhs.setup(num_row);
REQUIRE(testSolveDense());

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("Factor-put-get-iterate", "[highs_test_factor]") {
Expand Down Expand Up @@ -109,7 +109,7 @@ TEST_CASE("Factor-put-get-iterate", "[highs_test_factor]") {
highs.changeColBounds(iCol, save_lower, save_upper);
}

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

TEST_CASE("Factor-get-set-invert", "[highs_test_factor]") {
Expand Down Expand Up @@ -209,7 +209,7 @@ TEST_CASE("Factor-zero-col-pivot-tolerance", "[highs_test_factor]") {
REQUIRE(highs.run() == HighsStatus::kOk);
REQUIRE(highs.getModelStatus() == HighsModelStatus::kOptimal);

highs.resetGlobalScheduler(true);
highs.resetThreadScheduler(true);
}

HighsInt rowOut(const HighsInt variable_out) {
Expand Down
Loading
Loading