I am working on HP server with 40 cores. I am trying to run the OMNeT simulation on parallel. When I set in my ini file:
**.partition-id = 0
the simulation works correctly. But when I change that line to:
**.partition-id = 1
the OMNeT threw the following error:
<!> Error in module (cModule) Fog (id=1) during network setup: wrong partitioning: value 1 too large for 'Fog.router' (total partitions=1).
In OMNeT Manual the following is written but I don't know where should I put it
How can I set the flag (-p) to 40?
This is the structure of my project:
CodePudding user response:
You should open a console and go to the directory where your project is located. There will be an executable file of your simulation (by default the name of the executable file is the same as your project name).
If your project has name fognetsim
, then you should type in console:
cd yourpath/fognetsim
cd simulations
../fognetsim -p0,40 &
../fognetsim -p1,40 &
...
If you have named your ini file otherwise than omnetpp.ini
, you have to provide the name of your ini file as an argument:
cd yourpath/fognetsim
cd simulations
../fognetsim -p0,40 mFogNet.ini &
../fognetsim -p1,40 mFogNet.ini &
...
CodePudding user response:
A different answer for your question:
DON'T DO it. I mean, you should NOT try to use the CPUs on your machine to run parallel simulation in multiple partitions.
- First, the setup is complicated as you can see.
- Second, the actual simulation model must be written specifically to support it (i.e. no static/global variables or modules.) I know no major model frameworks that were written t support it.
- Third, running a simulation once only, does not give any statistically meaningful results. To have usable statistics, you MUST run the same simulation several times with different random seeds to allow the simulation to explore different simulation trajectories. Running a simulation once and extrapolating anything from that is the same as saying something about the climate of an area based on a single temperature measurement.
Instead, use your CPUs to run different trajectories with different seeds concurrently, which would utilize your resources perfectly and wills shorten the total simulation campaign time. Take a look at the opp_runall
command that is specifically designed to this and can transparently run ANY simulation.