Linux operating system cluster installation and parallel computing

Source: Internet
Author: User
& Nbsp; 1. the installation and installation process for linux is not mentioned much. Note that during installation, if the cluster is not connected to the outside world, you can select rsh as a trusted service regardless of security considerations. Be sure to install the corresponding software package; if you need to connect to the outside world, you should select ssh as a trusted service for security purposes.  

1. linux installation

The installation process is not detailed. Note that during installation, if the cluster is not connected to the external network, security is not considered.

Select rsh as a trusted service, and install the corresponding software package.

To ensure security, select ssh as a trusted service. After installation, ensure that s can be used between nodes

Sh logs on to each other. Each node's sshd should be able to provide services normally. Host Name: node1. .. noden (my structure

System created n = 2)

2. create an NFS service

Create the mpi directory under the public directory of the server node and configure it as an NFS server. in the/etc/exports file

Add a line to the file:

/Public/mpi node1 (rw) node2 (rw)

Add a line to the/etc/fstab file of the client node:

Sever:/pubilc/mpi nfs rw, bg, soft 0 0

Output the/public/mpi directory from the server node and load it on each client to facilitate the division between nodes.

Task sending

3. modify the/etc/hosts file and fill in the extremely high IP addresses of all node names. For example:

127.0.0.1 localhost. localdomain localhost

192.168.1.1 node1

192.168.1.2 node2

.........................

Similar configurations are performed on each node. The purpose of this operation is to enable nodes to pass the name of node1... noden between nodes.

Mutual access. You can ping noden or ssh noden for testing.

4. modify (or create) the/etc/hosts. equiv file

Enter the names of all the machines that you allow access to the local machine for mpi computing, with one machine name in one row. This step is for the ambassador

To other nodes.

For example, my node1 is the machine used to start mpi cluster computing, and other nodes are involved in computing

The/etc/hosts. equiv file of 1 is as follows:

Node1 # grant permissions to yourself so that you can simulate a parallel computing environment when there is only one machine.

Node2

.....

Noden

In the/etc/hosts. equiv file of node2. .. noden:

Node1 # delegate permissions to node1

Node2

......

Noden

5. modify ~ /. Bash_profile file

First, a user name used to start cluster computing is determined. root is not recommended for cluster computing. In each

Create a new user chief on the node. their main directories are/home/chief. the same password must be used.

The computing program must be placed on the same path. For example, if your program is fpi. f and a. out, you must put a. out

In the same territory, such ~ /Mpirun/a. out. this is true for each node. Modify ~ /. Bash_profile

To add the following scripts:

Export PATH = $ PATH:/usr/local/mpich/bin

Export MPI_USEP4SSPORT = yes

Export MPI_P4SSPORT = 22

Export P4_RSHCOMMAND = rsh or ssh

Here, we plan to install the runtime environment of mpich in the/usr/local/mpich directory in the future. The remaining three changes

Volume is used to notify the mpi runtime environment to use rsh (or ssh) as the remote shell. The linux operating environment is available here.

Set.

6. configure rsh or ssh

For users who use rsh to run MPI as remote shell, as long as they have the same users on each node,

Set this user's password to a blank one to run.

If ssh is used as the remote shell, configure as follows: use the user you set to start mpi computing to log on and run

Ssh-keygen, which generates a private/public key pair, which is stored in ~ /. Ssh/identity and ~ /. Ssh/I

Dentity. pub file. Then perform access authorization and run:

Cp ~ /. Ssh/identity. pub ~ /. Ssh/authorized_keys

Chmod go-rwx ~ /. Ssh/authorized_keys

Ssh-agent $ SHELL

Ssh-add

Repeat each node. Try to log on to another node on a node. ssh noden is generated under. ssh /.

A known_hosts2 file contains the key used to access the host and collects all the keys.

Point to make the same copy. In this way, no password is required for each node to access each other.

7. start required services

If you use the root user root to log on to the system, you can use the ntsysv command to start the ntsysv utility. Ntsysv

You can use a program to start or close services of different running levels on a simple menu interface. Select Enable

Rsh, rlogin, telnet, etc. You can also disable some services to speed up startup, such as sendmail.

If you use the su command to convert it to the root user, it is very likely that the ntsysv does not show the ntsysvs utility. In this case

You can directly modify the rlogin, rsh, and telenet settings under/etc/xinetd. d. Open xin in vi editor

Etd. d:

Vi/etc/xinetd. d

The following configuration file is displayed:

            
             
Rsh settings are as follows # default: off # description: The rshd server is the server for the rcmd (3) routine and, # consequently, for the rsh (1) program. the server provides # remote execution facilities with authentication based on # privileged port numbers from trusted hosts. service shell {disable = yes socket_type = stream wait = no user = root log_on_success + = USERID log_on_failure + = USERID server =/usr/sbin/in. rshd} the rlogin settings are as follows # default: off # description: rlogind is the server for the rlogin (1) program. the server # provides a remote login facility with authentication based on # privileged port numbers from trusted hosts. service login {disable = yes socket_type = stream wait = no user = root log_on_success + = USERID log_on_failure + = USERID server =/usr/sbin/in. rlogind} The telnet settings are as follows # default: off # description: The telnet server serves telnet sessions; it uses # unencrypted username/password pairs for authentication. service telnet {disable = yesflags = REUSEsocket_type = streamwait = nouser = rootserver =/usr/sbin/in. telnetdlog_on_failure + = USERID}
            

All these services are disabled by default after the system is installed. you need to modify them to enable them. To

To start telenet, you need to change disable = yes to disable = no. For other services

The dynamic modification is the same as that. If you start these services, you only need to simply execute:

#/Etc/rc. d/init. d/xinetd restart

Or restart the computer to make the change take effect.

8. Compile and install the Fortran90 compiler on the server node.

Copy the Fortran90 compiler (I use Intel) to/tmp, and then use tar xvfz fortran90

.Tar.gz j. decompress the package. Run

Related Article

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.