繁体   English   中英

mpi和mpich2文件夹之间的区别?

[英]Difference between mpi and mpich2 folder?

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

  • MPICH安装是否正常?
  • 它们之间有什么区别?

祝一切顺利,在此先感谢您,

这可能取决于您的安装,但这是提供几种并行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分发。

例如,在update-alternatives之前和之后的/etc/alternatives/mpi

# 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机制, alternatives提供多种软件版本(和发行版)的简便方法。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM