Setting Code Block to run MPICH2

最后都变了- 提交于 2019-12-19 10:23:30

问题


Greeting Everyone!

I am a student and currently I got problem in setting Code Block. Can anyone help me or guide me how to configure Code Block so it can run MPI?

I already install Code Block and MPICH2.

But when I trying to compile the code, it does not work. Code block doesn't detect MPI.

Anyone can show to me step by step to configure it. Really Appreciate it :)


回答1:


I assume you are asking about Code::Blocks IDE.

I think, you should modify your IDE and project settings and switch from default GCC compiler setup to MPI one.

First your should to clone GCC Compiler Setup in IDE Settings (menu "Settings" -> "Compiler and debugger"). http://www.codeblocks.org/docs/main_codeblocks_en3.html#x3-270001.11.6 You must clone the some complier settings (I recommend to copy a default "GNU GCC Compiler"), then you can change new settings set on the tab "Toolchain executables" -- replace the gcc and g++ by mpicc and mpicxx.

Second step is to change your MPI project build settings to use new compiler settings.

This will allow you to build MPI applications with Code::Blocks IDE.

To run them you can use the command line, and to debug them... debugging of MPI is not so easy...




回答2:


Use Eclipse PTP. It has builtin support for MPI based programs.



来源:https://stackoverflow.com/questions/5141042/setting-code-block-to-run-mpich2

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!