PNRunner runs process networks from a YML (Y-Chart Markup Language) description and its associated program libraries.
PNRunner is part of the SESAME software system. More information can be found on the web at http://sesamesim.sourceforge.net/.
Given YML (Y-Chart Markup Language) input files, PNRunner loads the classes references in these files and executes the described process network. Currently only Kahn Process Networks are supported.
PNRunner processes can output event traces which describe their communication and computation actions. PNRunner can output these traces either to files or directly to an architecture simulator via supported inter-process communication methods. To output traces PNRunner also requires a YML mapping file.
A PNRunner YML application description describes process, their communication ports, and how they are connected to one another. See the section Files below for a description of YML properties specific to PNRunner.
If there are no errors the application will execute until all its processes finish. PNRunner does not print any status information as while the simulation is running unless you use the -P option. However, your application processes may print status information.
In order to write trace events to files you must use the -T basename option and supply a YML mapping with the -m mapping.yml option. The following example demonstrates application simulation with trace events written to files:
PNRunner -T trace -m map.yml application.yml
The above example will produce trace files named trace0, trace1,. . ., traceN, where N is total number of application processes in your simulation. Trace numbers are assigned according the order in which application process appear in the mapping file. These traces can be read later by the architecture simulator using the same mapping file.
To run PNRunner in cosimulation with an architecture simulator you must use either the default system message queue mapping or the -S option for shared memory mapping. Shared memory mapping is much faster than system message queue mapping, but shared memory mapping does not work on some systems because of limitations on shared memory usage. The example below demonstrates running PNRunner with shared memory mapping in cosimulation.
PNRunner -S -m map.yml application.yml
When the simulation starts PNRunner will print the chosen mapping key. This key must be passed to the architecture simulator to initiate trace event communication between the two simulators.
Once started PNRunner will wait for the architecture simulator to connect. At this point you should execute the architecture simulator with the same options and the mapping key printed by PNRunner in another terminal to start the cosimulation. If the architecture simulator does not connect with in 30 seconds PNRunner will time out and exit.
You may choose the mapping key ahead of time with the -K key option, but a key that is valid on one system is not necessarily valid on another. It is also difficult to guarantee that any specific key is not already in use by another process. By not specifying a mapping key the system will automatically pick a valid key.
variable=value pairs can be used to pass parameters to your simulation at run time. This can be used, for example, to name input files. These variable value pairs are made available to the YML scripting language which in turn can pass the values to application processes via YML properties. See the YML Users Guide for more information.
PNRunner -t output myapp.yml
PNRunner -m mymap.yml myapp.yml
PNRunner -m mymap.yml -K 1234 myapp.yml