In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains the "MPI multi-node building", the content of the article is simple and clear, easy to learn and understand, now please follow the editor's ideas slowly in depth, together to study and learn "MPI multi-node building" bar!
Accounts with the same account password on multiple hosts
Communication establishment:
Sudo permission modification / etc/hosts
Add all child nodes
For example, 192.168.0.106 node1
192.168.0.107 node2
Turn off the firewall:
Sudo systemctl stop firewalld
Sudo systemctl disable firewalld
Enter ~ / .ssh
If not, link yourself first: ssh localhost
After entering
Enter ssh-keygen-t rsa to generate the public key
Load the generated id_rsa.pub into authorized__key to store the public keys of all nodes
Cat id_rsa.pub > > authorized_key
The rest of the node becomes the public key and then passes it to the master node.
Scp id_rsa.pub node1:~/.ssh/node2.pub prevents duplicate names, and the name of the file on the primary node is node2.pub
Put it under authorized_key:
Cat node2.pub > > authorized_key
Install MPI:
Go to the official website to download MPICH
Decompress tar zxvf filename.tar.gz
Enter cd filename
Installation trilogy:
. / configure-prefix=/usr/local/mpi/ # installs the required compilers in advance: compilers for gcc-c++ and fortran
Make
Sudo make install
Add to the user's environment variable:
Nano / .bashrc
Add the following two lines:
PATH=$PATH:/usr/local/mpi/bin
Export PATH
Save
After coming out, source ~ / .bashrc makes the changes effective.
Both mpicc and mpiexec can be used.
MPI multi-node operation:
Create a servers file
$nano servers
Node1:3#node1 executes three processes
Node2:3#node2 executes three processes
Node3:3#node3 executes three processes
Save
Put the compiled executable file in the same directory of the child node
Execute mpiexec-n 9-f. / servers. / a.out
Complete multi-node operation
Thank you for reading, the above is the content of "MPI multi-node building". After the study of this article, I believe you have a deeper understanding of the problem of MPI multi-node building, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.