Visual Studio 2008 使用MPI的设置

本文介绍了在Visual Studio 2008中设置MPI以进行并行算法开发的步骤,包括下载winIA32 Binary版本的MPI,安装MPI,配置项目的包含目录、库目录和附加依赖项,确保能够成功编译MPI程序。
摘要由CSDN通过智能技术生成

论文要用到MPI做并行算法,设置VS花了不少的功夫,现在分享一下小办法

一下为MPI 中Readme之中的方法

THE INSTALLER:

 

 

You must install MPICH2 on all machines that you want to run MPI programs on.  Run the installer on each machine individually.

 

The installer creates the following mpich2 directory structure on your machine:

mpich2/bin

mpich2/include

mpich2/lib

 

The include and lib directories contain the libraries needed to compile MPI programs.  The mpich2 dlls are copied to the Windows/system32 directory.  The bin directory contains smpd.exe which is the MPICH2 process manager used to launch MPI programs.  mpiexec.exe, also found in the bin directory, is used to start MPICH2 jobs.

以下为我用VS设置的方法

1.

http://www.mcs.anl.gov/research/projects/mpich2/从中下载 winIA32 Binary 那一个

2.

安装MPI

3.

#include"mpi.h"

4. 项目->属性->c/c++->常规->附加包含目录 设置mpi/include所在的目录

例如F:/mpi/include

5.项目->属性->链接器->常规->附加库目录 设置mpi/lib所在的目录

例如F:/mpi/lib

6.项目->属性->链接器->输入->附加依赖项 设置为 mpi.lib

7.后面就剩下编译了,本人用vs2008暂时还没遇到什么问题

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值