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...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…