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?