开发者

What is the best tutorial for learning MPI for C++? [closed]

Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 10 years ago.

The community reviewed whether to reopen this question 5 months ago and left it closed:

Not suitable for this site We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Improve this question

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 r开发者_运维知识库ead. I hope you experts can recommend some good materails to me. Any advice will be appreciated.


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


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.


LLNL has a pretty good one.


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.


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


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜