Skip to content

Commit

Permalink
Updated tutorial to include networking
Browse files Browse the repository at this point in the history
  • Loading branch information
raghav-g13 committed Apr 8, 2022
1 parent c2d06a4 commit a5e391c
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 7 deletions.
51 changes: 45 additions & 6 deletions docs/source/Tutorials/paralleljobs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Parallel Jobs
======================
``example-workloads/parallelJobs.yaml``

FireMarshal is capable of running multiple jobs in parallel. To understand how this feature works, let's use the ``parallelJobs.yaml`` workload as an example.
FireMarshal is capable of running multiple networked jobs in parallel. To understand how this feature works, let's use the ``parallelJobs.yaml`` workload as an example.

.. include:: ../../../example-workloads/parallelJobs.yaml
:code: json
Expand All @@ -28,7 +28,23 @@ The default login details for all workloads are:

``Password:`` ``firesim``

Once logged in, you can run commands in the terminal. To exit, use:
Once logged in, you can run commands in the terminal.

FireMarshal uses a Virtual Distributed Ethernet (VDE) network with a gateway at ``172.16.0.1`` and DNS nameserver at ``172.16.1.3``. It assigns IP addresses starting with ``172.16.0.2``.

We expect the root workload to have an IP address of ``172.16.0.2``. We can check the IP address assigned to interface ``eth0`` with:

::

ip addr show eth0

We can also test conncectivity to the internet with:

::

wget -S fires.im

To exit, use:

::

Expand Down Expand Up @@ -61,28 +77,51 @@ For instance, attach to job ``j0``, using:

screen -r parallelJobs-j0

You need to login with the the details provided above.

We expect job ``j0`` to have IP address ``172.16.0.2`` and job ``j1`` to have IP address ``172.16.0.3``. Let's test these out!

Inside job ``j0``, run:

::

ip addr show eth0


To detach from inside the screen session, use ``ctrl-a`` then ``ctrl-d``.


Similarly, attach to job ``j1``, using:
Again, we can attach to job ``j1``, using:

::

screen -r parallelJobs-j1

Similarly, we test the IP address of job ``j1`` with:

::

ip addr show eth0

Jobs ``j0`` and ``j1`` should be able to communicate with each other over the network. We can try this feature by pinging ``j0 (172.16.0.2)`` from ``j1``:

::

ping 172.16.0.2

You should see the command print the result of sending and receiving packets. We can terminate this command with ``Ctrl/Command + C``.

Login (with the details provided above) and then use the ``poweroff`` command to shut job ``j1`` down.
Now, use the ``poweroff`` command to shut job ``j1`` down.


Now re-attach to job ``j0``, using:
Then, re-attach to job ``j0``, using:

::

screen -r parallelJobs-j0


Login (with the details provided above) and then use the ``poweroff`` command to shut job ``j0`` down.
Again, use the ``poweroff`` command to shut job ``j0`` down.

FireMarshal also logs ``stdout`` and ``stderr`` to a ``uartlog`` file for each workload. These files can be found inside the corresponding workload output directory inside ``runOutputs``. The path to this directory will be output by the ``launch`` command. For instance, a workload output directory for the launched ``parallelJobs`` workload would be called ``parallelJobs-launch-YYYY-MM-DD--HH-MM-SS-<HASH>``.

2 changes: 1 addition & 1 deletion docs/source/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Launch all jobs in the workload. Jobs will be run sequentially. See the
``-j --job``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In workloads with multiple jobs, you can specify which job(s) to launch.
FireMarshal supports running multiple jobs concurrently but does not support networked jobs yet. Jobs are identified by their ``name`` attribute. Multiple ``-j``
FireMarshal supports running multiple networked jobs concurrently. Jobs are identified by their ``name`` attribute. Multiple ``-j``
options may be passed to invoke multiple jobs. Use ``--all`` to launch all jobs
in the workload. If neither ``--job`` nor ``--all`` are provided, the root
workload will be run. The root workload is the parent of all the jobs (i.e. the
Expand Down

0 comments on commit a5e391c

Please sign in to comment.