配置MPI软件运行环境
操作场景
本文介绍配置MPI软件运行环境的操作指导。
操作步骤
- 为ECS配置yum源。
- 执行以下命令,安装依赖包。
yum install libuuid libuuid-devel autoconf automake libtool numactl-devel libnl3 python-devel libmnl-devel valgrind-devel rpm-build systemd-devel libdb-devel iptables-devel lsof libselinux-devel flex cmake elfutils-devel bison libnl3-devel numactl-devel libusbx tcl fuse-libs tcsh tk createrepo kernel-headers kernel-devel pciutils gcc-gfortran libXext rpcbind nfs-utils libXt gtk3 gcc gcc-c++ libnsl -y;
- 执行以下命令,设置nfs、rpcbind服务自启动。
systemctl enable rpcbind
- 执行以下命令,修改hostname。
hostnamectl set-hostname [hostname]
systemctl restart systemd-hostnamed
在/etc/hosts文件末尾增加配置,格式为:[ip] [hostname]
ip必须指定是vRoCE设备的ip。
图1 执行结果
- 设置节点间互信。
- 在主节点执行命令。
- 执行以下命令,生成authorized_keys。
- 执行以下命令,将id_rsa authorized_keys复制到其他所有节点。
- 执行以下命令,通过ssh连接本端hostname和对端的hostname,确认可以免密ssh访问本端和对端。
对于非ROOT用户,若存在权限问题,需注意如下几点:
- 添加普通用户:useradd [test_name]
- 普通用户密码:passwd [test_name]
- 密码建议跟用户名字相同
以test用户为例:
- /home/test目录必须具有700权限
- /home/test/.shh目录必须具有700权限
- /home/test/.ssh/authorized_keys必须具有600权限
- 共享文件目录。
