2011年12月2日星期五

MPICH2 + Netbeans

My computer is 64 bit but the linker of Netbeans 7 does not work with mpich2-1.4.1p1-win-x86-64.msi but works with mpich2-1.4.1p1-win-ia32.msi

打开wmpiregister.exe
注册当前用户名 和 密码

用管理员权限打开cmd   
smpd -install





The steps to compile it:
  • File / New Project … / C/C++ Aplication, name it and go with defaults
  • Replace content of main.cpp with the code above.
  • Rightclick on project name on the left, select Properties:
  1. Categories / Build / C++ Compiler -> Include directories add value C:/Program Files (x86)/MPICH2/include
  2. Categories / Build / Linker -> Additional Library Directories add C:/Program Files (x86)/MPICH2/lib
  3. Categories / Build / Linker -> Libraries click “Add Option” and select “Static Bindings” (will add flag -static to the linker)
  4. Categories / Build / Linker -> Add Library ... and select one by one, all .lib files from C:/Program Files (x86)/MPICH2/lib

1 条评论: