Skip to content

Commit

Permalink
Moved logger initialization to Uno.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
cvanaret committed Oct 16, 2024
1 parent f166e60 commit b0d5da2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions bindings/AMPL/uno_ampl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ namespace uno {
Uno::print_optimization_summary(options, result);
// std::cout << "memory_allocation_amount = " << memory_allocation_amount << '\n';
}

Level Logger::level = INFO;
} // namespace

int main(int argc, char* argv[]) {
Expand Down
2 changes: 2 additions & 0 deletions uno/Uno.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ namespace uno {
max_iterations(options.get_unsigned_int("max_iterations")),
time_limit(options.get_double("time_limit")) {
}

Level Logger::level = INFO;

Result Uno::solve(const Model& model, Iterate& current_iterate, const Options& options) {
std::cout << "Problem " << model.name << '\n' << model.number_variables << " variables, " << model.number_constraints << " constraints\n\n";
Expand Down
4 changes: 0 additions & 4 deletions unotest/unotest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
#include <gtest/gtest.h>
#include "tools/Logger.hpp"

namespace uno {
Level Logger::level = INFO;
} // namespace

// https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/
int main(int argc, char **argv) {
#if defined(HAS_MPI) && defined(MUMPS_PARALLEL)
Expand Down

0 comments on commit b0d5da2

Please sign in to comment.