Problem with running parallel examples

515 views
Skip to first unread message

Michał

unread,
Sep 21, 2011, 7:32:00 AM9/21/11
to ns-3-users
Hello everyone,

I have started to use NS3 simulator. Because I have a multicore
processor, I wonder if I can use all of his power to speed up the
simulation.

I found this articles on the internet:
* http://www.nsnam.org/docs/release/manual/singlehtml/index.html#distributed
* http://www.nsnam.org/wiki/index.php/Parallel_Simulations

Both articles describe process how to set up simulation in multicore
or distributed environment. But there are some differences between
them. Unfortunately both methods don't work. Firstly, I have followed
the steps from wiki source.
To install MPI, I used command:
sudo apt-get install openmpi-bin openmpi-common openmpi-doc libopenmpi-
dev

And I think that everything was installed correctly because system
recognize command mpic++ after that.

Solution from Wiki doesn't work, because when I add to my code line
"Simulator::EnableParallelSimulation() compiler throws an error with a
description that this function is not a member of NS3.

After that, I have found proper section in the manual. In this
article, there was mentioned that I need to use specially prepared
examples (simple-distributed). When I check the code of this
scenarios, there were a different lines of code, preparing the
distributed simulation, more complicated than a simple:
Simulator::EnableParallelSimulation(); mentioned in Wiki source

So ok, maybe wiki is not up to date. But when I follow the instruction
and after building ns3 and run command:
mpirun -np 2 ./waf --run simple-distributed

I've got an error:
'build' finished successfully (21.194s)
msg="Can't use distributed simulator without MPI compiled in", file=../
src/mpi/examples/simple-distributed.cc, line=252
Command ['/home/michal/EITPlus/ns3_src/ns3/ns-3-dev/build/src/mpi/
examples/simple-distributed'] terminated with signal SIGSEGV. Run it
under a debugger to get more information (./waf --run <program> --
command-template="gdb --args %s <args>").
Waf: Leaving directory `/home/michal/EITPlus/ns3_src/ns3/ns-3-dev/
build'
'build' finished successfully (22.402s)
msg="Can't use distributed simulator without MPI compiled in", file=../
src/mpi/examples/simple-distributed.cc, line=252
Command ['/home/michal/EITPlus/ns3_src/ns3/ns-3-dev/build/src/mpi/
examples/simple-distributed'] terminated with signal SIGSEGV. Run it
under a debugger to get more information (./waf --run <program> --
command-template="gdb --args %s <args>").

So where is the problem? What I should do to run parallel scenario?

Furthermore, I want to ask you, if there is any possibility to employ
this MPI implementation (which is based point-to-point links) in the
wireless mobile scenarios?

Lalith Suresh

unread,
Sep 22, 2011, 6:38:54 PM9/22/11
to ns-3-...@googlegroups.com
On Wed, Sep 21, 2011 at 1:32 PM, Michał <pank...@gmail.com> wrote:

Furthermore, I want to ask you, if there is any possibility to employ
this MPI implementation (which is based point-to-point links) in the
wireless mobile scenarios?


Not yet. You can have islands of nodes separated by point to point links, and have each island run on a machine in the cluster. The island itself can have wireless connections within it.
 
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.




--
Lalith Suresh

Infiel

unread,
Sep 23, 2011, 7:37:06 AM9/23/11
to ns-3-users
Hi,

Thank you for your reply. I have just re-install the ns3 and now MPI
works fine! :)

According to your answer, words 'not yet' means that you are now
developing this functionality? Or just planning to do so?
I wonder, if the fact that mobile simulations are not possible to run
using MPI, result from your current implementation of parallelism or
from the limitations of MPI?

On 23 Wrz, 00:38, Lalith Suresh <suresh.lal...@gmail.com> wrote:

Lalith Suresh

unread,
Sep 23, 2011, 10:16:23 AM9/23/11
to ns-3-...@googlegroups.com
On Fri, Sep 23, 2011 at 1:37 PM, Infiel <pank...@gmail.com> wrote:
Hi,

Thank you for your reply. I have just re-install  the ns3 and now MPI
works fine! :)

According to your answer, words 'not yet' means that you are now
developing this functionality? Or just planning to do so?

I don't know if anyone is developing this as of now. You should probably ask George Riley.
 
I wonder, if the fact that mobile simulations are not possible to run
using MPI, result from your current implementation of parallelism or
from the limitations of MPI?


It's a limitation of the implementation actually. Partitioning of the simulation into different machines is easier with this limitation. With wireless scenarios, partitioning becomes trickier. Do you split according to geographic regions in the simulation? Do you bind nodes to a particular machine? Furthermore, there will be a lot of overhead of sending messages between machines during a wireless broadcast.



--
Lalith Suresh
Reply all
Reply to author
Forward
0 new messages