diff options
-rw-r--r-- | rumba/prototypes/irati.py | 1 | ||||
-rw-r--r-- | rumba/prototypes/ouroboros.py | 26 |
2 files changed, 22 insertions, 5 deletions
diff --git a/rumba/prototypes/irati.py b/rumba/prototypes/irati.py index 0f2d69e..160bff1 100644 --- a/rumba/prototypes/irati.py +++ b/rumba/prototypes/irati.py @@ -22,6 +22,7 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., http://www.fsf.org/about/contact/. # + import copy import json import os diff --git a/rumba/prototypes/ouroboros.py b/rumba/prototypes/ouroboros.py index 0a67e9b..a09f570 100644 --- a/rumba/prototypes/ouroboros.py +++ b/rumba/prototypes/ouroboros.py @@ -23,9 +23,11 @@ # Foundation, Inc., http://www.fsf.org/about/contact/. # +import time + import rumba.ssh_support as ssh import rumba.model as mod -import time +import rumba.multiprocessing_utils as m_processing import rumba.log as log @@ -37,6 +39,13 @@ class Experiment(mod.Experiment): def __init__(self, testbed, nodes=None): mod.Experiment.__init__(self, testbed, nodes) + @staticmethod + def make_executor(node, packages, testbed): + def executor(commands): + ssh.aptitude_install(testbed, node, packages) + node.execute_commands(commands, time_out=None, use_proxy=True) + return executor + def prototype_name(self): return 'ouroboros' @@ -55,12 +64,19 @@ class Experiment(mod.Experiment): "git clone -b be git://ouroboros.ilabt.imec.be/ouroboros " + "~/ouroboros", "cd ~/ouroboros && mkdir build && cd build && " + - "cmake -DCMAKE_BUILD_TYPE=Debug .. && sudo make install"] + "cmake -DCMAKE_BUILD_TYPE=Debug .. && sudo make install " + + "-j$(nproc)"] + + names = [] + executors = [] + args = [] for node in self.nodes: - ssh.aptitude_install(self.testbed, node, packages) - ssh.execute_commands(self.testbed, node.ssh_config, - cmds, time_out=None) + executor = self.make_executor(node, packages, self.testbed) + names.append(node.name) + executors.append(executor) + args.append(cmds) + m_processing.call_in_parallel(names, args, executors) def create_ipcps(self): for node in self.nodes: |