【发布时间】:2015-06-04 19:49:29
【问题描述】:
所以配置 MPI 标志我已经意识到在 /usr/include 目录中有两个具有相同文件的文件夹。所以两个相关的问题:
- 这对于 MPICH 安装是否正常?
- 它们有什么区别?
一切顺利,提前致谢,
【问题讨论】:
所以配置 MPI 标志我已经意识到在 /usr/include 目录中有两个具有相同文件的文件夹。所以两个相关的问题:
一切顺利,提前致谢,
【问题讨论】:
这可能取决于您的安装,但这是提供多个并行 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 机制的文件夹(我建议从this 和this 开始,它在基于Debian 的发行版以外的其他版本上可用)。
如果您运行 update-alternatives --config mpi,您可以更改默认 MPI 分发。
例如,/etc/alternatives/mpi 在update-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/
总结:
/usr/include/mpi/ 使您的代码尽可能具有可移植性。update-alternatives 更改所需的 MPI 发行版。alternatives 的一种机制,用于提供软件多版本(和发行版)的简便方法。【讨论】: