SimGrid  3.20 Versatile Simulation of Distributed Systems

Find the MSG example fitting your needs from the extensive set provided in the archive.

Warning
MSG was deprecated in SimGrid v3.18. These examples should be converted to S4U in the next releases. You really should consider using S4U in your next project.

# Tracing and visualization features

Tracing can be activated by various configuration options which are illustrated in these example. See also the full list of options related to tracing.

It is interesting to run the process-create example with the following options to see the task executions:

• Setting Categories. examples/msg/trace-categories/trace-categories.c
This example declares several tracing categories to that are used to classify its tasks. When the program is executed, the tracing mechanism registers the resource utilization of hosts and links according to these categories. Recommanded options:
--cfg=tracing:yes --cfg=tracing/categorized:yes --cfg=tracing/uncategorized:yes
• Master Workers tracing. examples/msg/trace-masterworker/trace-masterworker.c
This is an augmented version of our basic master/worker example using several tracing features. It traces resource usage, sorted out in several categories; Trace marks and user variables are also used. Recommanded options:
--cfg=tracing/categorized:yes --cfg=tracing/uncategorized:yes
• Process migration tracing. examples/msg/trace-process-migration/trace-process-migration.c
This version is enhanced so that the process migrations can be displayed as arrows in a Gantt-chart visualization. Recommanded options to that extend:
-cfg=tracing:yes --cfg=tracing/msg/process:yes

TODO: These tracing examples should be integrated in the examples to not duplicate the C files. A full command line to see the result in the right tool (vite/FrameSoc) should be given along with some screenshots.

## Tracing user variables

You can also attach your own variables to a any resource described in the platform file. The following examples illustrate this feature. They have to be run with the following options:

--cfg=tracing:yes --cfg=tracing/platform:yes


# Models-related examples

## NS3 as a SimGrid Network Model

This example demonstrates how to use the bindings to the Network Simulator, as explained in ns-3 as a SimGrid model. The most interesting is probably not the C files since they are unchanged from the other simulations, but the associated files, such as the platform file to see how to declare a platform to be used with the ns-3 bindings of SimGrid and the tesh file to see how to actually start a simulation in these settings.

TODO: merge the C files

TODO: show the XML files instead if it's what is interesting. On a "XML example files" page that does not exist yet.