omnet++ - Running parallel simulations (using the Command Line) -
how can run simulation different configurations? using omnet++ version 4.6
.
my omnetpp.ini
file looks below :
[general] [config dcn2] network = dcn2 # leaf switch #**.down_port = 2 **.up_port = 16 #12 # 4 # spine switch **.port = 28 # 20 #2048 # crossconnect **.cross_down_port = 28 # 20 #2048 **.cross_up_port = 28 # 20 #2048 # set destination of packet **.number_leaf_switch = 28 # 20 #2048 # link speed #**.switch_switch_link_speed = 40 mbps **.interarrivaltime = ${exponential(.0001),exponential(0.0002),exponential(0.0003)} **.batch_length = 10 **.buffer_length = 10 sim-time-limit = 1000s
i want run code different values of interarrivaltime
. can neither run different configs (one after another), nor can run individual runs in parallel on separate cores.
i have tried cmdev
option in run configurations different runs doesn't show apart 1st one. when try mentioning number of processes more 1 first run gets simulated. cannot find out reason.
config examinataion
in case can perform config examination. omnet++ offers different options that. explained under parameter studies section of omnet++ manual.
so can try 1 of following options examine configs , config file:
./run –a
- show configurations inomnet.ini
./run -x <config_name>
- give more info specific config./run -x <config_name> -g
- see combinations of configs
first have navigate example folder, , there execute 1 of aforementioned commands.
i executed: ./run -x dcn2 -g
, got following resuls
omnet++ discrete event simulation (c) 1992-2014 andras varga, opensim ltd. version: 4.6, build: 141202-f785492, edition: academic public license -- not commercial use see license distribution terms , warranty disclaimer setting tkenv... config: dcn2 number of runs: 3 run 0: $0=exponential(.0001), $repetition=0 run 1: $0=exponential(0.0002), $repetition=0 run 2: $0=exponential(0.0003), $repetition=0 end.
this confirms indeed have 3 different runs simulation parameter trying modify. however, variable name using interarrivaltime
parameter assigned $0
default because have not specified it.
if change following line in config:
**.interarrivaltime = ${exponential(.0001),exponential(0.0002),exponential(0.0003)}
to
**.interarrivaltime = ${interarrivaltime = exponential(0.0001),exponential(0.0002),exponential(0.0003)}
you more descriptive output ./run -x dcn2 -g
running different runs of config:
next step run different runs config. can navigating example directory , execute:
./run -c <config-name> -r <run-number> -u cmdenv
note <config-name>
dcn2
you, , -r
specifies of runs given above execute.
in other words can open 3 terminal windows , navigate example directory , do:
./run -c dcn2 -r 0 -u cmdenv
- interarrivaltime = exponential(0.0001)./run -c dcn2 -r 1 -u cmdenv
- interarrivaltime = exponential(0.0002)./run -c dcn2 -r 2 -u cmdenv
- interarrivaltime = exponential(0.0003)
distinguishing different run results
to able distinguish between output result files of different runs given config can modify default name of output file.
the "how-to" given in 12.2.3 result file names section of omnet++ manual.
output-vector-file = "${resultdir}/${configname}-${runnumber}.vec" output-scalar-file = "${resultdir}/${configname}-${runnumber}.sca"
as can see default output files distinguished ${runnumber}
variable. can further improve adding interarrivaltime
output file name.
example:
output-scalar-file = "${resultdir}/${configname}-${runnumber}-iatime=${interarrivaltime}.sca/vec"
i have not tested final approach. might error along path.
Comments
Post a Comment