I'm developing some code using c++ for my research in computational dynamics. My code solves sparse and dense matrices, generates meshes, and does similar operations in the most trivial sense. I needed to parallelize my code to reduce the computational time and used OpenMP for that purpose.
But after a closer look at the commercially available codes, like ANSYS CFX, I encountered that the parallelization scheme used in that software is MPICH2, which is an implementation of MPI.
So you have a lot of parallelization tools/API's :
I used some of these tools and managed to get 100% CPU usage in my local computer using each.
I don't know what criteria I should pay attention to while choosing the proper parallelization tool. What kind of applications require which tool? Is any of the above OK for research purposes? Which of them is used mostly in commerical softwares?
As for many question of this type there is not a true definitive answer. You can't really say what's better because the answer is always "it depends". On what you're doing, on how your code is written, which your portability requirements are and so on.
Following your list:
What to use? I do not have an answer, just try and pick what you feel more comfortable with (take a look to Boost Threads too). Please note that somehow you can mix them, for example OpenMP+MPI, MPI+TBB or even MPI+PLL). My preference is for PPL but if you're developing a real world application you may need a long test to decide what's better. Actually I like Concurrency Runtime (the base of PPL) because it's "horizontal", it provides a basic framework (with structures and algorithms) for parallel computing and a lot of "vertical" packages (Agents, PPL, TPL).
That said when you made your computation parallel you may need to improve performance of some CPU intensive routine. You may consider to use GPU for this task, I think it'll offer its best for short massive parallel computations (of course I prefer OpenCL over the proprietary CUDA even if CUDA performance may be higher). Actually you may even take a look to OpenHMPP if you're interested on this topic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With