1
votes

I would like to know which parallel processing library to be best used under these configurations:

  1. A single quad core machine. I would like to execute four functions of the same type on each core. The same function takes different arguments.
  2. A cluster of 4 machines with each one with multi core. I would like to execute the same functions but n-parallel ( 4 machines * no of cores in each machine ). So I want it to scale.

Program details :

  1. C++ program. There is no dependency between functions. The same function gets executed with different set of inputs and gets completed for > 100 times
  2. There is no shared memory as each function takes its own data and its own inputs.
  3. Each function need not to wait for others to complete. There is no need of join or fork.

For above scenarios what is the best parallel libs can be used? MPI, BOOST::MPI, open mp or other libs.

My preference would be BOOST::MPI but I want some recommendations. I am not sure if using MPI is allowed with parallel multi core machines?

Thanks.

1
For the first question, I imagine the new standard threading and asynchronous calls should be sufficient.Www

1 Answers

2
votes

What you have here is an embarassingly parallel problem (http://en.wikipedia.org/wiki/Embarrassingly_parallel). While MPI can definitely be used on a multi-core machine, it could be over kill for the problem at hand. If your tasks are completely separated, you could just compile them in to separate executables or a single executable with different inputs and use "make -j [n]" (see http://www.gnu.org/software/make/manual/html_node/Parallel.html) to execute them in parallel.

If MPI comes naturally to you, by all means, use it. OpenMP probably won't cut it if you want to control computing on separate computers within a cluster.