Ubuntu installation Openmpi && ns-3 MPI

Source: Internet
Author: User

Recently doing ns-3 network simulation, but when the network topology is relatively large or high speed, the simulation efficiency is very low.

Learn how Ns-3 's MPI module can improve simulation efficiency and start learning.

The whole process is divided into two steps:

1. Install Openmpi under Linux system. You can refer to the following two articles:

http://blog.csdn.net/jacketinsysu/article/details/44840611

Http://www.linuxidc.com/Linux/2015-04/116448.htm

After I have operated on these two articles, running MPIRUN-NP 4 Hello_c can succeed, but when you reopen the terminal and run again, the following error occurs

Mpirun:error while loading shared libraries:libopen-rte.so.20:cannot open Shared object file:no such file or directory

After trying, you can solve the following methods:

Update the file/sbin/ldconfig-v with the command, otherwise the problem remains.

2. Successfully run the simple-distributed.cc file in ns-3

Command 1:sudo gedit/etc/profile open the file and join the ns-3 path:

Finally, the last two behaviors of this file:

Export Ld_library_path= $LD _library_path:/usr/local/lib


Export Ld_library_path= $LD _library_path:/home/jing/m_allfile/project/sourceinsight/ns3sourcefile/ ns-allinone-3.25/ns-3.25

The first line of the path is the Ubuntu system installation Openmpi path;

The path of the second behavior ns-3.

Command 2:source/etc/profile

Update source

Command 3:sudo/sbin/ldconfig-v

Then, you can run the ns-3 simple-distributed.cc file:

Command:MPIRUN-NP 2./waf--run scratch/simple-distributed

Results: At time 1.02264s packet sink received bytes from 10.1.1.1 ports 49153 total Rx bytes
At time 1.0235s packet sink received bytes from 10.1.2.1 ports 49153 total Rx bytes
At time 1.02437s packet sink received bytes from 10.1.3.1 ports 49153 total Rx bytes
At time 1.02524s packet sink received bytes from 10.1.4.1 ports 49153 total Rx bytes

End---

Ubuntu installation Openmpi && ns-3 MPI

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.