views:

74

answers:

2

I plan to learn parallel computing, Now I am thinking MPI or TBB. In fact, I do not have much experence at this. I suppose I had better start with something easy to manage. At first, I may try something like coarse-grained code. Which one could be easier for me? Thanks.

A: 

It depends on your definition of parallelism and what you are trying to acheive. The point of TBB is to take advantage of multi-core processors. In this scenario, parallelism means running on multiple cores simultaneously.

However, the main benefit of MPI is distributed memory parallel computing. In this scenario, running your application on a cluster of different physical machines and communicating with each other over TCP or another proprietary protocol.

In summary, depending on your problem space one or the other may be better. It really depends on the problem you are trying to solve.

Taylor Leese
What I try to do is to parallelize several search processes and exchange information among each process hopefully it can improve solution of the algorithm, for example using several different solvers to solve a problem on computer cluster or multi-core computer.
oldfish
If you believe your problem requires more than a few cores then MPI is probably the way to go since you have a much greater ability to scale.
Taylor Leese
A: 

MPI and TBB are very, very different in approach.

MPI is basically a message passing library. This is more difficult to use for developing a threaded application, since it enforces much stricter isolation rules. It does, however, allow you to scale up to multiple processes, running on multiple systems.

TBB, on the other hand, is really geared towards making threading within a single application much simpler and more approachable. It is very similar in approach to Microsoft's concurrency runtime, and even the TPL in the .NET world.

Reed Copsey