RedHat5.4 installation mpich2-1.4.1p1 Process

Source: Internet
Author: User
1. Configure the environment (1) Configure/etc/hosts (root User) 202.117.10.37www.linuxidc.com (master node) 202.117.10.50www.linuxidc.net (slave node) on the two machines respectively (2

1. Configure the environment

(1) Configure/etc/hosts on the two machines respectively (root User)

202.117.10.37 www.linuxidc.com (master node)

202.117.10.50 www.linuxidc.net (slave node)

(2) create linuxidc users on the two machines respectively

(3) Configure NFS

Mount the/home directory on the master node www.linuxidc.com from www.linuxidc.net and set it to mount on startup

(4) Configure login without a password (use linuxidc user on www.linuxidc.com)

  1. Ssh-keygen-t rsa
  2. Cp ~ /. Ssh/id_rsa.pub ~ /. Ssh/authorized_keys

2. Install mpich2 (the linuxidc user is on the www.linuxidc.com node)

(0) Preparation

Create under/home/linuxidc

Program/mpich2-install directory

Softdirectory (set mpich2-1.4.1p1.tar.gz)

Study/mpi-study directory

(1) Extract

Tar-zxvf mpich2-1.4.1p1.tar.gz

(2) Installation

  1. ./Configure-prefix =/home/linuxidc/program/mpich2-install/
  2. Make
  3. Make install

(3) simple configuration

Linuxidc@www.linuxidc.com ~ $ Vi. bashrc

Export PATH =/home/linuxidc/program/mpich2-install/bin: $ PATH

Linuxidc@www.linuxidc.com ~ $ Source. bashrc

(4) Verification

  1. Linuxidc@www.linuxidc.com ~ $ Which mpicc
  2. ~ /Program/mpich2-install/bin/mpicc
  3. Linuxidc@www.linuxidc.com ~ $ Which mpiexec
  4. ~ /Program/mpich2-install/bin/mpiexec

3. Test

(1) machinefile // still use ip address. An error occurred while testing the instance with the machine name.

Linuxidc@www.linuxidc.com ~ $ Vi machinefile

  1. 202.117.10.37: 4
  2. 202.117.10.50: 2

(2) test

  1. Linuxidc@www.linuxidc.com ~ $ Mpiexec-f machinefile-n 6./soft/mpich2-1.4.1p1/examples/cpi
  2. Process 0 of 6 is on www.linuxidc.com
  3. Process 1 of 6 is on www.linuxidc.com
  4. Process 3 of 6 is on www.linuxidc.com
  5. Process 2 of 6 is on www.linuxidc.com
  6. Process 4 of 6 is on www.linuxidc.net
  7. Process 5 of 6 is on www.linuxidc.net
  8. Pi is approximately 3.1415926544231239, Error is 0.0000000008333307
  9. Wall clock time = 0.001708

4. Enhanced Configuration

(1) Add machinefile to the Environment Variable

Cp ~ /Machinefile ~ /Programs/mpich2-install/

Linuxidc@www.linuxidc.com mpich2-install $ vi ~ /. Bashrc

  1. Export MPI_USEP4SSPORT = yes
  2. Export MPI_P4SSPORT = 22
  3. Export P4_RSHCOMMAND = ssh
  4. Export PATH =/home/linuxidc/program/mpich2-install/bin: $ PATH
  5. Export HYDRA_HOST_FILE =/home/linuxidc/program/mpich2-install/machinefile

[Linuxidc@www.linuxidc.com mpich2-install] $ source ~ /. Bashrc

(2) test (that is, you do not need to declare machinefile in the command line. The default value is HYDRA_HOST_FILE in the environment variable)

  1. Linuxidc@www.linuxidc.com ~ $ Mpiexec-n 7./soft/mpich2-1.4.1p1/examples/cpi
  2. Process 1 of 6 is on www.linuxidc.com
  3. Process 2 of 6 is on www.linuxidc.com
  4. Process 3 of 6 is on www.linuxidc.com
  5. Process 0 of 6 is on www.linuxidc.com
  6. Process 4 of 6 is on www.linuxidc.net
  7. Process 5 of 6 is on www.linuxidc.net
  8. Pi is approximately 3.1415926544231239, Error is 0.0000000008333307
  9. Wall clock time = 0.001440

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.