详解并行库mpich2的安装

本文详细介绍并行函数库MPICH2的安装过程。

什么是MPICH/MPICH2?

MPICH is a freely available, portable implementation of MPI,a standard for message-passing for distributed-memory applications used in parallel computing. MPICH is Free Software and is available for most flavours of Unix (including Linux and Mac OS X) and Microsoft Windows.

MPICH2 is one of the most popular implementations of MPI. It is used as the foundation for the vast majority of MPI implementations including IBM MPI (for Blue Gene), Intel MPI, Cray MPI, Microsoft MPI, Myricom MPI, OSU MVAPICH/MVAPICH2, and many others.

Above From Wikipedia.

下载MPICH2

MPICH2是开源免费的,可以直接到官网下载。

下载地址:官网下载  |  百度网盘

安装MPICH2

1. 解压安装包

下载到的安装包是mpich2-1.0.2p1.tar.gz,使用下面的命令进行解压

tar xvzf mpich2-1.0.2p1.tar.gz

2. 配置安装选项

需要配置的选项不多,我个人只配置了目标安装目录,如下:

./configure --prefix=/home/michael/opt/mpich2

3. 安装

直接使用下面的命令,应该就可以完成安装了。

make & make install

到这里已经完成了MPICH2的安装过程。下面是在其他程序中调用MPICH2时可能用到的。

4. 引用

一般需要指定头文件的路径和库文件的路径,如下所示。

  • 头文件:-I/home/michael/opt/mpich2/include
  • 库文件:-L/home/michael/opt/mpich2/lib

标签: linux

相关文章推荐

添加新评论 (无需注册,可直接评论)