MPI集群安装、MPI安装

配置ssh免密登录

https://blog.csdn.net/qq_43369986/article/details/117043347

集群搭建nfs服务

https://blog.csdn.net/qq_43369986/article/details/117041545

安装MPI

注意,以下只是单节点安装,其它节点重复以下步骤即可;


安装环境

https://blog.csdn.net/secyb/article/details/78697976

yum install gcc
yum install gcc-c++ -y   
yum install install gfortran

配置

./configure --disable-fortran  --with-device=ch4:ofi  --prefix=/opt/mpich-3.4.1/mpich-install 2>&1 | tee c.txt

--prefix:指定安装目录


注意,如果只是使用./configure`命令配置,可能会报以下错误

No Fortran compiler found. If you don't need to build any Fortran programs, you can disable Fortran support using --disable-fortran. If you do want to build Fortran programs, you need to install a Fortran compiler such as gfortran or ifort before you can proceed

编译

make

安装

make install

用which mpicc和which mpiexec检查安装是否成功,如果有这两个可执行程序的路径显示,则表示安装成功。


配置MPI分布式计算节点

创建mpi_config_file文件,配置每个节点分配几个核心;

node1:2
node2:2

集群测试

将 mpi解压后的examples目录下的cpi文件,copy到nfs共享目录下;

保证每个节点都可以访问该可执行文件(如果不安装NFS服务的话,需要将可执行文件放到每台机器的相同目录下)。

cd到mpi的安装目录的bin目录下;

cd /opt/mpich-3.4.1/mpich-install/bin

执行指令

mpiexec -n 8 -f /opt/mpi_config_file ./cpi

mpiexec 表示执行该mpi程序,-n 8表示开8个进程,参数-f 表示运行过程参考配置文件mpi_config_file,./cpi是当前目录下的执行文件名

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值