From c4115544a55ff9a76d042bc17b85292d971ce956 Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Tue, 14 Aug 2018 20:03:53 +0100 Subject: [PATCH] Hadrons: application option to save graph --- extras/Hadrons/Application.cc | 5 +++++ extras/Hadrons/Application.hpp | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/extras/Hadrons/Application.cc b/extras/Hadrons/Application.cc index b2a1987e..91d1f431 100644 --- a/extras/Hadrons/Application.cc +++ b/extras/Hadrons/Application.cc @@ -110,6 +110,11 @@ void Application::run(void) LOG(Message) << "RUN ID '" << getPar().runId << "'" << std::endl; vm().setRunId(getPar().runId); vm().printContent(); + if (!getPar().graphFile.empty()) + { + makeFileDir(getPar().graphFile, env().getGrid()); + vm().dumpModuleGraph(getPar().graphFile); + } env().printContent(); schedule(); printSchedule(); diff --git a/extras/Hadrons/Application.hpp b/extras/Hadrons/Application.hpp index ef463dd6..82307d62 100644 --- a/extras/Hadrons/Application.hpp +++ b/extras/Hadrons/Application.hpp @@ -55,7 +55,8 @@ public: GRID_SERIALIZABLE_CLASS_MEMBERS(GlobalPar, TrajRange, trajCounter, VirtualMachine::GeneticPar, genetic, - std::string, runId); + std::string, runId, + std::string, graphFile); }; public: // constructors