Parallel Distributed Simulation with INET Framework

511 views
Skip to first unread message

qian

unread,
Mar 23, 2011, 3:44:08 AM3/23/11
to omnetpp
Hi,

I'm building my project related with the INET Framework on omnet+
+4.1 with OS redhat5.4. I use the "FlatNetworkConfiguration","Router"
and "StandHost" provided by INET Framework.

My project is about P2P Streaming. Since it has almost 10000
modules, and creates too many messages per simsec, so I tried to use
parallel distributed simulation provided by omnet++. I have read the
parallel distributed simulation example "cqn" provided by omnet++ and
have tried to follow it to set my project. But even the simplest test
with INET Framwork which just sends msgs by a module to another can
not work at all. When I run the shell "runparsim" written as the
sample "cqn", it looks like failed to set up the user interface.

My question is "Whether the parallel distributed simulation
provided by omnet++ can work with the INET Framework? If they can work
together, how to set?"

Thanks!

Rudolf Hornig

unread,
Mar 24, 2011, 5:58:44 PM3/24/11
to omn...@googlegroups.com
Parallel simulation requires that the modules in different partitions are communicating ONLY via messages. That is not the case if you are using FlatNetworkConfigurator which is a global component. You should eliminate it first.

I assume the OMNET sample parallel CQN was woking correctly?
Rudolf


--
You received this message because you are subscribed to the Google Groups "omnetpp" group.
To post to this group, send email to omn...@googlegroups.com.
To unsubscribe from this group, send email to omnetpp+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/omnetpp?hl=en.


qian

unread,
Mar 25, 2011, 5:56:42 AM3/25/11
to omnetpp
Hi, Rudolf

Thank you for asking my question. As you said, the OMNET sample
parallel CQN was woking correctly, and some simple tests without the
INET Framwork written by me also worked correctly.

I knew that FlatNetworkConfigurator is a global component, and
my parallel simulation is failed because of that module. But since
there are too many modules in my project, and I don't want to build
the routing table and router all by myself, so I use Router provided
by the INET Framwork . To work with the Router, I use
FlatNetworkConfigurator to Configure IP addresses and routing tables,
then use the auto routing funtion provided by the INET Framework.

Is there any way to use Routers provided by the INET Framwork
without such a global component FlatNetworkConfigurator? Or you mean
that, if I want to use parallel simulation, I should work without
Routers and even work without the INET Framwork?

Thank you very much!

On 3月25日, 上午5时58分, Rudolf Hornig <rudolf.hor...@gmail.com> wrote:
> Parallel simulation requires that the modules in different partitions are
> communicating ONLY via messages. That is not the case if you are using
> FlatNetworkConfigurator which is a global component. You should eliminate it
> first.
>
> I assume the OMNET sample parallel CQN was woking correctly?
> Rudolf
>
> On Wed, Mar 23, 2011 at 8:44 AM, qian <sherry.wang1...@gmail.com> wrote:
> > Hi,
>
> >     I'm building my project related with the INET Framework on omnet+
> > +4.1 with OS redhat5.4. I use the "FlatNetworkConfiguration","Router"
> > and "StandHost" provided by INET Framework.
>
> >     My project is about P2P Streaming. Since it has almost 10000
> > modules, and creates too many messages per simsec, so I tried to use
> > parallel distributed simulation provided by omnet++. I have read the
> > parallel distributed simulation example "cqn" provided by omnet++ and
> > have tried to follow it to set my project. But even the simplest test
> > with INET Framwork which just sends msgs by a module to another can
> > not work at all. When I run the shell "runparsim" written as the
> > sample "cqn", it looks like failed to set up the user interface.
>
> >      My question is "Whether the parallel distributed simulation
> > provided by omnet++ can work with the INET Framework? If they can work
> > together, how to set?"
>
> >      Thanks!
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "omnetpp" group.> To post to this group, send email toom...@googlegroups.com.

Rudolf Hornig

unread,
Mar 25, 2011, 6:39:07 AM3/25/11
to omn...@googlegroups.com, qian
I'm really not an expert on this topic, but INET was not written with parallel simulation in mind.
Wireless simulations are definitely out of question because of the channel controller component.
For wired simulations you must get rid of the top level FlatNetworkConfigurator. You may be able to configure the IP addresses also using the INI file (i.e. you would have a separate line in INI for each host. It's ugly, but can be done). I'm not sure about routing tables, but those can be also manually configured. 

Rudolf

To post to this group, send email to omn...@googlegroups.com.

王皘

unread,
Mar 25, 2011, 11:01:05 AM3/25/11
to Rudolf Hornig, omn...@googlegroups.com
Hi, Rudolf

     Thank you very much for answering my questions. I'll try to balance if I need to use parallel simulation and do the IP addresses and routing tables configuration manually or give up the parallel simulation.

     Take this opportunity, I have a question for INET Framwork in detail. As I have mentioned earlier, I use StandardHost in my simulation. But when I want to set the "**.eth[*].mac.txrate" of one StandardHost module to 1Mbps, the program prompted error in module. The error is "nonstandard transmission rate 1e+06, must be 1e+07, 1e+08, 1e+09, 1e+10 bit/sec." Do you know if there is a way for me to set a host's txrate less than 10Mbps?

     Thank you !
--
          祝

好!


王皘

Kyeong Soo (Joseph) Kim

unread,
Apr 12, 2011, 10:47:32 AM4/12/11
to omn...@googlegroups.com, Rudolf Hornig, qian
Rudolf and All,

Could you please check the attached INI & run-time script files
together with the resulting log file from the parallel execution of
"examples/inet/kidsnw1" example?

You can simply run "./run-mpi" on the said directory once you put the
attached files there.

Besides routing table configurations, I think the INET seems to have
some issues to address for parallel & distributed simulation.

For more complex examples (which I cannot prepare sample INI/NED
files), I got different types of error messages, as follows (similar
to those in https://groups.google.com/d/topic/omnetpp/5AVBUqATfkc/discussion):

IInterfaceTable not found as submodule `interfaceTable' in host/router ...

Regards,
Joseph


2011/3/25 Rudolf Hornig <rudolf...@gmail.com>:

parsim.ini
run-mpi
run-mpi.log

Rudolf Hornig

unread,
Apr 12, 2011, 3:19:01 PM4/12/11
to omn...@googlegroups.com
Ok, I will take a look. At least I will try to identify the issues and if nothing else we could try to fix them for the next inet release.
Rudolf

Rudolf Hornig

unread,
Apr 13, 2011, 10:12:23 AM4/13/11
to omn...@googlegroups.com
Hello all, 

thanks for the example. First of all the good news. I was able to get it working...

- You *must* use OMNET4.2b1. We made some bugfixes in the parallel simulation part back in last November. Those changes are available only in 4.2b1 (that message about internal error was caused by this bug)

- There is a bug also in INET-Framework that must be fixed:
in IPAddress.h:

- inline void doPacking(cCommBuffer *buf, const IPAddress& addr)
+ inline void doPacking(cCommBuffer *buf, IPAddress& addr)

with the above modification I was able to run the example using two partitions. Note that the NED file specifies very small delays on the links, so the overall surntime will be much slower. Put some higher delay on the links to provide an actual speedup.

Let me know of your experience...
Rudolf

Kyeong Soo (Joseph) Kim

unread,
Apr 13, 2011, 10:55:30 AM4/13/11
to omn...@googlegroups.com, Rudolf Hornig
Hi Rudolf,

That's really a good news!
I will definitely give 4.2b1 a try; I have intentionally avoided newer
versions for both OMNeT++ and INET, but have no other choice.

BTW, I am also doing source-level debugging and found that it's a way
more difficult with parallel ones than serial ones. It's, however,
still doable.

Just for your and others' information, I briefly summarize the setup
for this (assuming the use of OpenMPI in a multi-core node; multi-node
case needs a bit of tweaking with X11 security and details can be
found "http://www.open-mpi.org/faq/?category=debugging"):


1. Create a run script (e.g., "gdb-run-mpi") like this:

#!/bin/sh
mpirun -np 2 xterm -e gdb opp_run -x sample.gdb

* NOTE:
- You can replace 'xterm' with your choice of x terminal program (I
personally use urxvt).
- 'sample.gdb' is GDB command file and see #2 below for this.


2. Create a GDB command file ('sample.gdb' in this example) as follows:

set breakpoint pending on
exec-file OMNETPP_ROOT/bin/opp_run
set args -l INET_ROOT/src/inet -n INET_ROOT/examples:INET_ROOT/src -f
./parsim.ini -u Cmdenv (*** more options if needed ***)
tbreak main
tbreak SimTime::overflowAdding
tbreak IPAddressResolver::interfaceTableOf
#display state->snd_nxt
#display state->snd_una
#display state->snd_mss
#display state->snd_max
#display bytes
run

* NOTE:
- Do not use the execution shell script (e.g., "run") provided by
INET. Instead, like the above, you should use the real name of
execution file (either "opp_run" or "inet" depending on your
installation).
- Replace OMNETPP_ROOT and INET_ROOT with your own OMNeT++ and INET
installation root directories.
- You can set as many temporary breakpoints with tbreak
ClassName::functionName as you wish.


3. Type "./gdb-run-mpi". Then, it will open two X terminals each
running a GDB session of MPI process. Now you can debug as usual, but
with two independent sessions.


Of course, later I will summarize my experience in OMNeT++/INET wiki pages.

With Regards,
Joseph


2011/4/13 Rudolf Hornig <rudolf...@gmail.com>:

Kyeong Soo (Joseph) Kim

unread,
Apr 15, 2011, 11:40:23 AM4/15/11
to omn...@googlegroups.com, Rudolf Hornig
Hi Rudolf,

I also tried the said example with OMNeT++ 4.2b1 and the latest
version of INET (master branch) and could run it through the end.
Thanks again for your quick fix!

By the way, I am still in the middle of debugging process with a bit
more complex example with UDP applications and found the following (I
will report to the Bug Tracker, but currently am gathering more
information):


1. Type mismatch between EnvirBase::getUniqueNumber() of OMNeT++ and
the functions of INET based on it

For instance, UDPAppBase::bindToPort() uses
UDPSocket::generateSocketId() (in line 33 of UDPAppBase.cc), which, in
turn, calls the said getUniqueNumber() function (in line 52 of
UDPSocket.cc).

The problems is that, while getUniqueNumber() returns "unsigned long
integer" value (whose maximum is a really huge number in 64-bit
platform), generateSocketId() returns it as "int" value to its caller
(i.e., bindToPort()); if getUniqueNumber() returns a value beyond the
range of int, generateSocketId() eventually returns "-1" after the
conversion.

In a serial execution, the above would be hardly a problem because the
class variable "nextuniquenumber" is initialized to 0 (in line 1487 of
envirbase.cc of OMNeT++) and during the life time of typical
simulation, the chance that it grows beyond the range of int would be
extremely small.

In a parallel execution, on the other hand, the said variable could be
set to really large values (see line 1490 of envirbase.cc) for LPs
whose process IDs are not zero. This results in error "Model error:
sockId in BIND message not filled in." in my case.


2. (Potential) overflow in getUniqueNumber()
Related with the #1 above, now that "nextuniquenumber" could be
initialized to a really large value in the parallel execution, it's
likely for it to overflow (i.e., cycling back to 0) in the middle of
simulation. Unlike the #1, however, I am not sure whether there would
be any serious issues with it: Does it cause any problem when
getUniqueNumber() returns an identical value in different LPs? Note
that, for a given LP, the chance that getUniqueNumber() returns two
identical values (even with overflow/cycling) during the life time of
a simulation would be quite low.


In this regard, I wonder what would be a quick fix for the issue #1 above.

Again, many thanks in advance for your suggestion/advice!
Joseph


On Wed, Apr 13, 2011 at 3:55 PM, Kyeong Soo (Joseph) Kim

Pedro Evangelista

unread,
Jun 25, 2012, 7:19:21 PM6/25/12
to omn...@googlegroups.com
Hi to all!

I'm trying to run a simulation using mpirun with OMNET4.2.2, and with the fix in the IPAddress.h file, but I got the same error as Joseph: "IInterfaceTable not found as submodule  `interfaceTable' in host/router"

I wonder if the bugfix in version 4.2b1 made to 4.2.2...

Can someone help me?

Thanks
Hello all, 

Rudolf



>> > > For more options, visit this group at
>> > >http://groups.google.com/group/omnetpp?hl=en.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "omnetpp" group.
>> To post to this group, send email to omn...@googlegroups.com.
>> To unsubscribe from this group, send email to

>> For more options, visit this group at
>> http://groups.google.com/group/omnetpp?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "omnetpp" group.
> To post to this group, send email to omn...@googlegroups.com.
> To unsubscribe from this group, send email to

Amit Tarkar

unread,
Aug 16, 2013, 1:10:32 AM8/16/13
to omn...@googlegroups.com
Hi Joseph /Rudolph,
                I tried to run
Joseph's example in but I am getting following error  "<!> Error in module (cCompoundModule) KIDSNw1 (id=1) during network setup: incomplete partitioning: missing value for 'KIDSNw1.host1'." I am using  omnetpp4.3 & inetmanet 2.0.

Thanks and Regards
Amit Tarkar

hamideh jabalameli

unread,
Oct 2, 2013, 12:15:13 PM10/2/13
to omn...@googlegroups.com
Hi Dear Sir

I tried to run Joseph's example in but I have a following error: in module (cCompoundModule)KIDSNw1 (id=1)during network setup:incomplete partitioning: missing value for 'KIDSNw1.host1'.

I created all of the processes which you said in this email. I need run mpi over inet. please help me

hamideh jabalameli

unread,
Oct 2, 2013, 1:50:02 PM10/2/13
to omn...@googlegroups.com
Hi Dear Sir

I tried to run Joseph's example in but I have a following error: in module (cCompoundModule)KIDSNw1 (id=1)during network setup:incomplete partitioning: missing value for 'KIDSNw1.host1'.

I created all of the processes which you said in this email. I need run mpi over inet. please help me.

hamideh jabalameli

unread,
Oct 18, 2013, 9:01:24 AM10/18/13
to omn...@googlegroups.com

Hi again Mr Rudolf

Please tell me how run this example in two partitions? IPv4Address.h is fixed :

 

- inline void doPacking(cCommBuffer *buf, const IPAddress& addr)

+ inline void doPacking(cCommBuffer *buf, IPAddress& addr)

 

 And I use OMNeT 4.3 with INET 2.0.0

Can you send correct parallel simulation over KIDSNw1 example for me?


On Wednesday, April 13, 2011 6:42:23 PM UTC+4:30, Rudolf Hornig wrote:

Ibrahim Khan

unread,
Nov 22, 2015, 4:50:37 AM11/22/15
to OMNeT++ Users
Hi Rudolf..

Can you share the example  that you able to run. Also specify the requirements for running the example.. 

Thanks
Reply all
Reply to author
Forward
0 new messages