Developing Products Around The One Question Interface Design & Perceptual Control Theory

 
Ofer Goren

SIP Multicore optimization – the aftershock

Categories: Development
June 17th, 2009

[By now, you should all know Ofer Goren.. He has guest posted here on his experiences with multicore optimization. Well, he's back, along with the aftershock effect of the work he did.]

At the last Intel seminar I participated in, James Reinders, the Chief Software Evangelist & Director of Software Development Products at Intel, made a great comment when asked a question. “Intel has no opinion yet on that matter. I’ll give you my opinion, which usually becomes Intel’s”. I love this statement for it exemplifies our differences: I keep my opinions to myself, his become press releases.

As you might know, RADVISION participated in the Intel Developer Tools seminar, where they focused on the new Intel Parallel Suite tool that was just released. They asked me if I could speak at the event because of my success with the tool in its beta form, as well as the success I had with the post I later wrote about it (89 unique visitors. I’m getting pretty good at putting my hands on those unique IP addresses…J ). Before I was able to give them an answer, my boss answered for me, and without further discussion, I was off to the seminar.

Agenda

The seminar was all about multi core parallelism. An introduction was given by James Reinders regarding this new approach in programming, and about how Intel can help us developers achieve parallelism through the usage of their various tools. We had a 3 hour demonstration session on those tools, with live results on “before” and “after”. We also had some very… YAWN… interesting… z..zzz…zzzz… marketing presentations.

That said, a few lectures got my full attention, and I would like to elaborate.

The Academic Perspective

This lecture was given by Dr. Ami Marowka from Bar-Ilan University. The full name of the lecture was “Pitfalls and Issues of Multi-Core Programming: OpenMP vs TBB; The Academic Perspective“. First of all, he dramatically claimed, that parallel programming is very very hard (as if calling pthread_create() is that complicated. Right?). It is a revolutionary approach, very different from serial programming. As a professor, he claims that Israeli Universities do not teach this and if someone wants to learn, their only option is to be taught by an expert in the field, while on the job.

The second section of his lecture focused on what OpenMP and Intel’s TBB, can and cannot give us. As an example, he showed us a very simple code snip that can never be parallelized as-is by both approaches:

for (i =1; I < 10; i++)

a[i]= a[i-1] + 7;

As this is a case of data dependency, one cannot parallelize this code section because the result of one operation is dependent on the data calculated in a previous step.

He then showed some benchmark results of a comparison between OpenMP and TBB, suggesting that for most cases, TBB is better. This was interesting, as OpenMP defines compiler directives. If Intel implements OpenMP on their compilers, Why is that different from their TBB? I will get back to that later.

Anyway, I hope some students took good notes on his lecture, so I can copy them before the semester exams… Oh, wait; I’m no longer a student!

Parallelism Roadmap

The second interesting session was at the end of the day, again given by James Reinders, about the possible future parallel tools being developed by Intel. He spoke about vTune as the tool for the experts (planning to make it even more complicated), why they won’t integrate its technology into the parallel suite. “If I need to explain someone what ‘cache’ is, I don’t want him to use vTune. He probably needs to use the new suite” – his words. Good thing I know what it is. He explained a little bit about Ct which looks very promising, then switched to the chip domain, explaining a bit on Nehalem, Larrabee and Atom, and basically showed us Intel’s plan to rule the world.

The Main Event – My Lecture

This was a RADVISION presentation, and aside from Intel, we were the only other company speaking at this conference. Sagi Subocki, one of our product managers, was first to present an overview to our solution and then about our optimization experience. After that, he called me to the stage to give my lecture…

I don’t want to talk about it. I’m still recuperating. It was the scariest experience of my life: 200 people staring at me… I said I won’t talk about it. You can see it yourself:

They say I was OK. I don’t remember.

The Next Day

We made such a good impression, that the guys from Intel came to visit us in our office the next day. After the necessary introductions, I gave James Reinders the lecture I had the other day, only in English, and then shared some of my insights regarding the parallel suite, like what was missing, what can be improved, etc. He was kind enough to give us a glimpse at Intel’s software group roadmap for the next couple of years.

Getting back to the TBB/OpenMP comparison, he said that it is indeed very strange In his opinion, TBB should not be better than OpenMP, but rather just another approach to parallelism engineering. So this still remains a mystery that might forever plague us. He did indicate that there is a huge performance gap between the MS OpenMP implementation and the Intel one, in favor of the latter.

My Conclusions

  • The obvious and more acute one: there are far too few females in the software engineering industry. Out of 200 participants in the seminar, I think only 10 of them were women. And it was kind of sad that there was not a single female lecturer.
  • Parallelism is here and is not going anywhere. Even Atom will become multi-core eventually (“not promising anything”, cautions James). We will have to start thinking differently. Parallel optimization will be part of the regular software release cycle, just like the rest of the tools of our trade.
  • The guys in Intel are doing a great job. I Never realized how big their software tools business is: IPP, TBB, vTune, MPI libraries, Ct, and much more.
  • Evangelist? In the holy land??
  • All in all, it was a very interesting experience. Can I go back to coding now? Please?

2

Comments and trackbacks

  • 1. Ami Marowka  |  February 28th, 2010 at 12:47 am

    Dear Ofer Goren,

    Unintentionally, I have found just now your blog entry regarding the last Intel conference where you mentioned my talk:

    http://blog.radvision.com/codeofcontact/2009/06/17/sip-multicore-optimization-the-aftershock/

    First, thanks for attending my talk.

    Second, I’m sorry, but you did not understand exactly what I said about TBB-OMP performance comparison.

    Third, it seems that you did not take me seriously when I said that parallel programming is difficult. If you still think that parallel programming is all about calling pthread_create(), then you and RADVISION are in trouble!

    ….and to know that you are a Bar-Ilan graduate ….

    I will be happy to be invited to give you and your colleagues in RADVISION a course about parallel programming.

    You need it!

    Sincerely,
    Dr. Ami Marowka,
    Computer Science Department,
    Bar-Ilan University

  • 2. Ofer Goren  |  February 28th, 2010 at 12:13 pm

    Hi Ami.

    Thank you for your comment.
    My post was written in somehow a humorous way. I didn’t mean it for people to take it per-se. As such, my remarks regarding the issue in general, and my actions specifically were made just to make the readers smile.
    In no way I meant to suggest the parallelism is easy. It took us almost 3 months just to understand what is wrong w/ our current code, after 10 years of adding more and more features and bug fixes, without always paying attention to parallelism while doing so.

    Our decision not to make use of the TBB mechanism was more related to technical issues, and less because of deficiencies one might have found. The code should have been ported to OSes not currently supported (as we support almost 20 OSes and flavors of those), it was C++ based while we are coding in C, and there were issues of licensing we didn’t want to address. We also did not use OPENMP as we still need to support old GNU compilers that do not support those directives.

    If my post offended you in any way please let me know how to fix it. I assure you we do know that parallelism is way different from regular coding, and we take this issue seriously.

    On a side note, I would say that being a Bar-Ilan graduate does not suggest that I should be more understanding toward multi-core coding. As you suggested in your lecture, Israeli academies do not give full attention to this subject. Moreover, graduating at 1996, parallelism was not mentioned in any of the lectures I was attending.

    Thank you very much,
    Ofer.

Required

Required, hidden

Notify me of followup comments via e-mail

Trackback this post  |  Subscribe to the comments via RSS Feed