tags:

views:

457

answers:

7

Hi, I plan to use MPI for my C++ code. I have installed MPICH2 on my computers. But I do not know much about MPI and hope to find some materials to read. I hope you experts can recommend some good materails to me. Any advice will be appreciated.

+2  A: 

Parallel Programming with MPI by Peter S. Pacheco is a good intro book. Note, the book uses C, but it should be an easy transition to using the C++ MPI bindings.

Taylor Leese
+1 This book is a great introduction to MPI programming.
semiuseless
I think the book is a good way to learn to program with MPI. If you find my answer, you will discover that I do not favor using C++ for any new MPI development. Since you fail to mention a similar caution, no upvote. You did still get a supportive comment. ;)
semiuseless
Pacheco's book was written many years ago. Is it still useful?
Dr. Faust
The content is still relevant in my opinion.
Taylor Leese
+1  A: 

some get started manual may be found on LAM/MPI site

shuvalov
+1  A: 

LLNL has a pretty good one.

Jerry Coffin
+4  A: 

I'm assuming you already know how to program C++ pretty well and have a basic understanding of parallel programming (or at least know how you want to parallelize your code).

I would check out the book Using MPI first. Using MPI 2 is the follow on book that discusses using the new bits in MPi-2. Both books were written by the guys who wrote the MPI library and headed up the standardization effort. One nice thing about Using MPI is that it's available online so you can check it out w/o spending money :-)

J Teller
+1 from me. One small issue, which might or might not be a problem: switches between Fortran, C, and C++ sample code.
stephan
I agree it could be a bit annoying, but I didn't find it to be a significant detriment to understanding when I was using the book.
J Teller
+1  A: 

hello

Mpich2 comes with a number of examples in C++/C. probably the most famous is cpi, which computes pi in parallel. Read through the program together with manuals/books other people suggested. This way you will see actual working code right away and can make your own modifications to play with things.

aaa
+3  A: 

I would advise against using the MPI C++ bindings for any new development. The program itself can be in C++, but invest the extra effort to use the C interface to the MPI library.

The MPI Forum is depreciating the C++ bindings. So, future implementations of MPI will probably drop support for C++. In general, most implementations skimp on features when it comes to C++. The basics will work, but things like dynamic processes (i.e. spawn), the PMPI interfaces, and so on are less well supported.

The C and Fortran bindings are reasonably well supported by all the major implementations, and will continue to be supported into the foreseeable future.

semiuseless
+2  A: 

As @semiuseless pointed out, the MPI forum is deprecating the C++ bindings. One of the reasons for that is that the boost MPI interface does a much better job.

Edric