Intel TBB vs CilkPlus

I am developing time-demanding simulations in C++ targeting Intel x86_64 machines. After researching a little, I found two interesting libraries to enable parallelization:

  • Intel Threading Bulding Blocks
  • Intel Cilk Plus
  • As stated in docs, they both target parallelism on multicore processors but still haven't figured which one is the best. AFAIK Cilkplus simply implements three keywords for an easier parallelism (which causes GCC to be recompiled to support these keywords); while TBB is just a library to promote a better parallel development.

    Which one would you recommend?

    Consider that I am having many many many problems installing CilkPlus (still trying and still screaming). So I was wondering, should I go check TBB first? Is Cilkplus better than TBB? What would you recommend?

    Are they compatible?

    Should I accomplish installing CilkPlus (still praying for this), would it be possible to use TBB together with it? Can they work together? Is there anyone who did experience sw develpment with both CiclkPlus and TBB? Would you recommend working with them together?

    Thankyou


    Here are some FAQ type of information to the question in the original post.

    Cilk Plus vs. TBB vs. Intel OpenMP

    In short it depends what type of parallelization you are trying to implement and how your application is coded.


    此链接还可以帮助:英特尔TBB和Cilk +进行比较


    I can answer this question in context to TBB. The pros of using TBB are:

  • No compiler support needed to run the code.
  • Generic C++ algorithms of TBB lets user create their own objects and map them to thread as task.
  • User doesn't need to worry about thread management. The built in task scheduler automatically detects the number of possible hardware threads. However user can chose to fix the number of threads for performance studies.
  • Flow graphs for creating tasks that respect dependencies easily lets user exploit functional as well as data parallelism.
  • TBB is naturally scalable obviating the need for code modification when migrating to larger systems.
  • Active forum and documentation being continually updated.
  • with intel compilers, latest version of tbb performs really well.
  • The cons can be

  • Low user base in the open source community making it difficult to find examples
  • examples in documentations are very basic and in older versions they are even wrong. However the Intel forum is always ready to extend support to resolve issues.
  • the abstraction in the template classes are very high making the learning curve very steep.
  • the overhead of creating tasks is high. User has to make sure that the problem size is large enough for the partitioner to create tasks of optimal grain size.

    I have not worked with cilk either, but it's apparent that if at all there are users in the two domain, the majority is that of TBB. It's likely if Intel pushes for TBB by it's updated document and free support, the user community in TBB grows

  • 链接地址: http://www.djcxy.com/p/64522.html

    上一篇: 在clang命令行上提供LLVM ModulePass

    下一篇: 英特尔TBB vs CilkPlus