【问题标题】:Difference between mpi and mpich2 folder?mpi 和 mpich2 文件夹之间的区别?
【发布时间】:2015-06-04 19:49:29
【问题描述】:

所以配置 MPI 标志我已经意识到在 /usr/include 目录中有两个具有相同文件的文件夹。所以两个相关的问题:

  • 这对于 MPICH 安装是否正常?
  • 它们有什么区别?

一切顺利,提前致谢,

【问题讨论】:

    标签: linux mpi


    【解决方案1】:

    这可能取决于您的安装,但这是提供多个并行 MPI 安装的常用方法。

    我同时安装了 MPICH2 和 OpenMPI,并且此文件夹位于 /usr/include:

    lrwxrwxrwx  1 root root     21 Apr  1 17:03 mpi -> /etc/alternatives/mpi/
    drwxr-xr-x  3 root root   4096 Apr  1 17:03 mpich/
    lrwxrwxrwx  1 root root     22 Nov 30 01:21 openmpi -> ../lib/openmpi/include/
    

    mpi 文件夹是一个应用作#include 以利用alternatives 机制的文件夹(我建议从thisthis 开始,它在基于Debian 的发行版以外的其他版本上可用)。

    如果您运行 update-alternatives --config mpi,您可以更改默认 MPI 分发。

    例如,/etc/alternatives/mpiupdate-alternatives 之前和之后:

    # before, pointing to MPICH2
    lrwxrwxrwx 1 root root 18 Apr  1 17:14 /etc/alternatives/mpi -> /usr/include/mpich/
    # and after, pointing to OpenMPI
    lrwxrwxrwx 1 root root 24 Apr  1 17:07 /etc/alternatives/mpi -> /usr/lib/openmpi/include/
    

    总结:

    1. 使用/usr/include/mpi/ 使您的代码尽可能具有可移植性。
    2. 使用 update-alternatives 更改所需的 MPI 发行版。
    3. 这是alternatives 的一种机制,用于提供软件多版本(和发行版)的简便方法。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-10-10
    • 2011-06-13
    • 2016-02-09
    • 2019-08-11
    • 2011-11-18
    • 1970-01-01
    • 2017-01-22
    • 2018-07-27
    相关资源
    最近更新 更多