Download OMNeT++

Transcript
OMNeT++ Manual – Running Simulations
NOTE: You must ensure that the library can be accessed by OMNeT++. Either specify
the library name with a full path (pre- and postfixes of the library file name still can be
omitted), or adjust the shared library path environment variable of your OS (PATH on
Windows, LD_LIBRARY_PATH on Unix, and DYLD_LIBRARY_PATH on Mac OS X.)
11.1.2
Running a Shared Library
Shared libraries can be run using the opp_run program. Both opp_run and simulation executables are capable of loading additional shared libraries; actually, opp_run is nothing else
than an empty simulation executable.
Example:
opp_run -l mymodel
The above example will load the model found in libmymodel.so and execute it.
11.1.3
Controlling the Run
There are several useful configuration options that control how a simulation is run.
• cmdenv-express-mode – Provides only minimal status updates on the console.
• cmdenv-interactive – Allows the simulation to ask missing parameter values interactively
• cmdenv-status-frequency – Controls how often the status is written to the console.
• cpu-time-limit – Limits how long the simulation should run (in wall clock time)
• sim-time-limit – Limits how long the simulation should run (in simulation time)
• debug-on-errors – If the runtime detects any error, it will generate a breakpoint so you
will be able to check the location and the context of the problem in your debugger.
• fingerprint – The simulation kernel computes a checksum while running the simulation. It is calculated from the module id and from the current simulation time of each
event. If you specify the fingerprint option in the config file, the simulation runtime
will compare the computed checksum with the provided one. If there is a difference it will
generate an error. This feature is very useful if you make some cosmetic changes to your
source and want to be reasonable sure that your changes did not alter the behaviour of
the model.
WARNING: The value of the calculated fingerprint is heavily dependent on the accuracy
of the floating point arithmetic. There are differences between the floating point handling
of AMD and Intel CPUs. Running under a processor emulator software like valgrind may
also produce a different fingerprint. This is normal. Hint: see gcc options -mfpmath=sse
-msse2.
• record-eventlog – You can turn on the recording of the simulator events. The resulting
file can be analyzed later in the IDE with the sequence chart tool.
234