Rsync workload outputs (#877)

* Use rsync to copy back workload results

* Point to correct .ini file in runtime.ini

* Download files with rsync (not upload) | Update docs
This commit is contained in:
Abraham Gonzalez 2021-11-18 11:07:48 -08:00 committed by GitHub
parent 3500497a16
commit 8a67fc07d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 6 deletions

View File

@ -5,6 +5,7 @@ import logging
from runtools.switch_model_config import AbstractSwitchToSwitchConfig
from util.streamlogger import StreamLogger
from fabric.api import *
from fabric.contrib.project import rsync_project
rootLogger = logging.getLogger()
@ -296,7 +297,14 @@ class FireSimServerNode(FireSimNode):
## copy back files from inside the rootfs
with warn_only(), StreamLogger('stdout'), StreamLogger('stderr'):
for outputfile in jobinfo.outputs:
get(remote_path=mountpoint + outputfile, local_path=job_dir)
rsync_cap = rsync_project(remote_dir=mountpoint + outputfile,
local_dir=job_dir,
ssh_opts="-o StrictHostKeyChecking=no",
extra_opts="-L",
upload=False,
capture=True)
rootLogger.debug(rsync_cap)
rootLogger.debug(rsync_cap.stderr)
## unmount
with StreamLogger('stdout'), StreamLogger('stderr'):
@ -313,7 +321,14 @@ class FireSimServerNode(FireSimNode):
remote_sim_run_dir = """/home/centos/sim_slot_{}/""".format(simserverindex)
for simoutputfile in jobinfo.simoutputs:
with warn_only(), StreamLogger('stdout'), StreamLogger('stderr'):
get(remote_path=remote_sim_run_dir + simoutputfile, local_path=job_dir)
rsync_cap = rsync_project(remote_dir=remote_sim_run_dir + simoutputfile,
local_dir=job_dir,
ssh_opts="-o StrictHostKeyChecking=no",
extra_opts="-L",
upload=False,
capture=True)
rootLogger.debug(rsync_cap)
rootLogger.debug(rsync_cap.stderr)
def get_sim_kill_command(self, slotno):
""" return the command to kill the simulation. assumes it will be

View File

@ -23,7 +23,7 @@ switchinglatency=10
netbandwidth=200
profileinterval=-1
# This references a section from config_hwconfigs.ini
# This references a section from config_build_recipes.ini
# In homogeneous configurations, use this to set the hardware config deployed
# for all simulators
defaulthwconfig=firesim-rocket-quadcore-nic-l2-llc4mb-ddr3

View File

@ -100,7 +100,7 @@ when a workload running on a simulated cluster with ``firesim runworkload``
completes, ``/etc/os-release`` will be copied out from each rootfs and placed
in the job's output directory within the workload's output directory (See
the :ref:`firesim-runworkload` section). You can add multiple paths
here.
here. Additionally, you can use bash globbing for file names (ex: ``file*name``).
The ``common_simulation_outputs`` field is a list of outputs that the manager
will copy off of the simulation host machine AFTER a simulation completes. In
@ -111,7 +111,8 @@ full console output of the simulated system) and ``memory_stats.csv`` files
will be copied out of the simulation's base directory on the host instance and
placed in the job's output directory within the workload's output directory
(see the :ref:`firesim-runworkload` section). You can add multiple
paths here.
paths here. Additionally, you can use bash globbing for file names
(ex: ``file*name``).
..
TODO: this is no longer relevant with firemarshal
@ -125,7 +126,7 @@ paths here.
Non-uniform Workload JSON (explicit job per simulated node)
---------------------------------------------------------------
Now, we'll look at the ``ping-latency`` workload, which explicitly defines a
Now, we'll look at the ``ping-latency`` workload, which explicitly defines a
job per simulated node.
.. include:: /../deploy/workloads/ping-latency-firemarshal.json