From 0b50e94306b40e53be394b02df6c16772db3f7d8 Mon Sep 17 00:00:00 2001 From: Jason Marechal Date: Mon, 30 Oct 2023 16:24:16 +0100 Subject: [PATCH] Fix broken path for study update --- src/cpp/exe/full_run/main.cpp | 3 +-- src/cpp/lpnamer/main/ProblemGeneration.cpp | 3 ++- src/cpp/lpnamer/main/include/ProblemGeneration.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cpp/exe/full_run/main.cpp b/src/cpp/exe/full_run/main.cpp index f240f6fc0b..997593efbf 100644 --- a/src/cpp/exe/full_run/main.cpp +++ b/src/cpp/exe/full_run/main.cpp @@ -14,12 +14,11 @@ int main(int argc, char** argv) { mpi::communicator world; auto options_parser = FullRunOptionsParser(); std::filesystem::path xpansion_output_dir; - std::filesystem::path archive_path; options_parser.Parse(argc, argv); if (world.rank() == 0) { try { ProblemGeneration pbg(options_parser); - pbg.updateProblems(); + xpansion_output_dir = pbg.updateProblems(); } catch (std::exception& e) { std::cerr << "error: " << e.what() << std::endl; diff --git a/src/cpp/lpnamer/main/ProblemGeneration.cpp b/src/cpp/lpnamer/main/ProblemGeneration.cpp index 681429f0e8..7c0e48f7b0 100644 --- a/src/cpp/lpnamer/main/ProblemGeneration.cpp +++ b/src/cpp/lpnamer/main/ProblemGeneration.cpp @@ -42,7 +42,7 @@ void CreateDirectories(const std::filesystem::path& output_path) { ProblemGeneration::ProblemGeneration(ProblemGenerationOptions& options) : options_(options) {} -void ProblemGeneration::updateProblems() { +std::filesystem::path ProblemGeneration::updateProblems() { auto xpansion_output_dir = options_.XpansionOutputDir(); auto archive_path = options_.ArchivePath(); const auto log_file_path = @@ -60,6 +60,7 @@ void ProblemGeneration::updateProblems() { RunProblemGeneration(xpansion_output_dir, master_formulation, additionalConstraintFilename_l, archive_path, logger, log_file_path, weights_file, unnamed_problems); + return xpansion_output_dir; } struct Version { diff --git a/src/cpp/lpnamer/main/include/ProblemGeneration.h b/src/cpp/lpnamer/main/include/ProblemGeneration.h index 9cab3eb422..f9ac5618f7 100644 --- a/src/cpp/lpnamer/main/include/ProblemGeneration.h +++ b/src/cpp/lpnamer/main/include/ProblemGeneration.h @@ -14,7 +14,7 @@ class ProblemGeneration { public: explicit ProblemGeneration(ProblemGenerationOptions& options); - void updateProblems(); + std::filesystem::path updateProblems(); ProblemGenerationOptions& options_; virtual void RunProblemGeneration(