Redhat5.4安装mpich2-1.4.1p1全过程

本文档详细介绍了在Redhat5.4系统上安装和测试mpich2-1.4.1p1的步骤,包括配置主机文件、创建用户、设置NFS无密码登录、安装mpich2以及验证安装和测试MPI程序。
部署运行你感兴趣的模型镜像

1.配置环境

(1) 在两台机器上分别配置/etc/hosts  (root用户)

192.168.100.37   amao991    (主节点)

192.168.100.50   amao992      (从节点)

(2)  在两台机器上分别创建amao用户

(3)  配置NFS

从amao992上mount主节点amao991上/home目录,设为开机挂载

(4)  配置无密码登录(在amao991上用amao用户)

ssh-keygen -t rsa
cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys

2. 安装mpich2 (amao用户在amao991节点上)

(0)预备

在/home/amao下创建

program/mpich2-install目录

soft目录(放置mpich2-1.4.1p1.tar.gz)

study/mpi-study目录

(1) 解压

tar -zxvf mpich2-1.4.1p1.tar.gz

(2) 安装

./configure -prefix=/home/amao/program/mpich2-install/
make
make install

(3) 简单配置

[amao@amao991 ~]$ vi .bashrc

export PATH=/home/amao/program/mpich2-install/bin:$PATH
[amao@amao991 ~]$ source .bashrc

(4)验证

[amao@amao991 ~]$ which mpicc
~/program/mpich2-install/bin/mpicc
[amao@amao991 ~]$ which mpiexec
~/program/mpich2-install/bin/mpiexec

3. 测试

(1) machinefile      //还是用ip把,用机器名时在测试例子时遇到了错误

[amao@amao991 ~]$ vi machinefile

202.117.10.37:4
202.117.10.50:2


(2) 测试

[amao@amao991 ~]$ mpiexec -f machinefile -n 6 ./soft/mpich2-1.4.1p1/examples/cpi
Process 0 of 6 is on amao991
Process 1 of 6 is on amao991
Process 3 of 6 is on amao991
Process 2 of 6 is on amao991
Process 4 of 6 is on amao992
Process 5 of 6 is on amao992
pi is approximately 3.1415926544231239, Error is 0.0000000008333307
wall clock time = 0.001708

4.  增强的配置

(1)把machinefile加入环境变量

cp ~/machinefile  ~/program/mpich2-install/

[amao@amao991 mpich2-install]$ vi ~/.bashrc

export MPI_USEP4SSPORT=yes
export MPI_P4SSPORT=22
export P4_RSHCOMMAND=ssh
export PATH=/home/amao/program/mpich2-install/bin:$PATH
export HYDRA_HOST_FILE=/home/amao/program/mpich2-install/machinefile

[amao@amao991 mpich2-install]$ source ~/.bashrc

(2) 测试 (即不用在命令行声明machinefile了,缺省按照环境变量中的HYDRA_HOST_FILE进行)

[amao@amao991 ~]$ mpiexec -n 6 ./soft/mpich2-1.4.1p1/examples/cpi
Process 1 of 6 is on amao991
Process 2 of 6 is on amao991
Process 3 of 6 is on amao991
Process 0 of 6 is on amao991
Process 4 of 6 is on amao992
Process 5 of 6 is on amao992
pi is approximately 3.1415926544231239, Error is 0.0000000008333307
wall clock time = 0.001440



           




        

        

 


您可能感兴趣的与本文相关的镜像

Linly-Talker

Linly-Talker

AI应用

Linly-Talker是一款创新的数字人对话系统,它融合了最新的人工智能技术,包括大型语言模型(LLM)、自动语音识别(ASR)、文本到语音转换(TTS)和语音克隆技术

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值