本人航空航天专业学生,近期要学习MPI并行编程,进行CFD流场计算。
关于VS2010 MPI环境的配置,下面这三篇文章已经说得很清楚了
http://www.tuicool.com/articles/FRBjAz
http://www.csdn123.com/html/itweb/20131113/220645.htm
http://wenku.baidu.com/link?url=33jlyX9apZZf50uMhpgtBwuqthlJStzvcsZZOj1kaFNb8IVsMCLSZ-aXtSEOt9Z0JdghS_j4c1PeECY8hrQgOGBBsxMYEBvf1OWpt44VGEO
需要注意的是我的电脑是64位的,但是加载lib库要加载32位的,不然编译一直会出错。
附第一个MPI代码如下:
#include <mpi.h>
#include <stdio.h>
#include <math.h>
#include <conio.h>
int argc;
char *argv[];
void main(int argc,char *argv[])
{
int myid,numprocs;
int namelen;
char processor_name[MPI_MAX_PROCESSOR_NAME];
M