0、win7+vs2008+mpich2-1.4
1、对于windows系统,在网上找个.msi的mpich2的安装包直接安装就好了。
2、之后在vs2008里配置编译环境
在tools->options->projects and solutions->vc++ directories里,在include和lib下添加mpi的目录
3、在自己的项目中
右键项目名,选择properties,在configuartion properties->linker->input里添加mpi.lib和cxx.lib,在release和debug下也添加这两个lib
在C/C++->Code Generation里的runtime library中选择multi-threaded
4、之后编写代码,编译生成.exe
5、运行wmpiregister.exe
用户名和密码要和当前登录系统的用户名和密码一致
6、以管理员身份运行cmd.exe
进入\mpich2\bin\
输入命令smpd -install -phrase ******
其中******为上一步中注册的登录密码
7、运行wmpiconfig.exe
8、运行wmpiexec.exe
就可以跑编译生成的.exe了……