Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
446 views
in Technique[技术] by (71.8m points)

mpi - Setting Code Block to run MPICH2

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 :)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...