栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Linux中MPICH3.2.1安装步骤及遇到的问题并解决

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Linux中MPICH3.2.1安装步骤及遇到的问题并解决

一、下载Mpich并解压

Downloads | MPICH

到官方网站下载Mpich,并解压到自己的文件目录下

 二、安装过程及遇到的问题

        正确安装步骤,可以直接看Mpich解压文件下的README文件,有详细安装步骤及某些问题解决方式。

1、Configure MPICH specifying the installation directory
for csh and tcsh:

      ./configure --prefix=/home//mpich-install |& tee c.txt

for bash and sh:

      ./configure --prefix=/home//mpich-install 2>&1 | tee c.txt

 遇到的问题:

(1)configure: error: no acceptable C compiler found in $PATH...

原因:没有安装GCC编译器

解决方法:如何在Ubuntu 18.04上安装GCC编译器_Linux教程_Linux公社-Linux系统门户网站

(2)No Fortran 77 compiler found. ...

原因:缺少such as后面的那两个包中的一个

解决方法:

sudo apt-get install gfortran
2、Build MPICH
for csh and tcsh:

      make |& tee m.txt

for bash and sh:

      make 2>&1 | tee m.txt

安装时未遇到问题

官方给出的可能遇到的问题的解决方法:

If there were problems, do a "make clean" and then run make again with V=1.

      make V=1 |& tee m.txt       (for csh and tcsh)

      OR

      make V=1 2>&1 | tee m.txt   (for bash and sh)

Then go to step (2) below, for reporting the issue to the MPICH developers and other users.
3、Install the MPICH commands
for csh and tcsh:

      make install |& tee mi.txt

for bash and sh:

      make install 2>&1 | tee mi.txt

未遇到问题

4、Add the bin subdirectory of the installation directory to your
    path in your startup script

配置环境变量查看和修改PATH环境变量(Linux通用) - 唐僧公子 - 博客园

PATH=/home//mpich-install/bin:$PATH ; export PATH

配置完成后,可以使用以下两个命令检查配置是否成功

which mpicc
which mpiexec

 配置成功会显示,mpicc和mpiexec的路径

 5、MPICH uses a process manager for starting MPI applications.

使用以下两种方式运行Mpich自带的例子

To run the CPI example with 'n' processes on your local machine, you can use:

      mpiexec -n  ./examples/cpi

Test that you can run an 'n' process CPI job on multiple nodes:

      mpiexec -f machinefile -n  ./examples/cpi

The 'machinefile' is of the form:

      host1
      host2:2
      host3:4   # Random comments
      host4:1

'host1', 'host2', 'host3' and 'host4' are the hostnames of the machines you want to run the job on. 
The ':2', ':4', ':1' segments depict the number of processes you want to run on each node.
If nothing is specified, ':1' is assumed.

安装成功

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/335113.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号