2015-03-31 105 views
1

所以配置MPI標誌我已經意識到在/usr/include目錄中有兩個文件夾具有相同的文件。所以有兩個相關的問題:mpi和mpich2文件夾之間的區別?

  • 這對於MPICH安裝是否正常?
  • 他們之間有什麼區別?

一切順利,在此先感謝,

回答

2

這取決於你的安裝,但這是提供幾個並行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/ 

彙總:

  1. 使用/usr/include/mpi/使你的代碼儘可能多的便攜越好。
  2. 使用update-alternatives更改所需的MPI發行版。
  3. 這是alternatives的一種機制,以提供軟件的多個版本(和分發)的簡單方法。