Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
2464 Discussions

Misconceptions about TBB: Bring them out

AJ13
New Contributor I
540 Views

I've talked about TBB a lot, and I mean, a lot. With all this TBB-talking, I've also encountered some misconceptions. Tonight, I was pushed over the edge while talking online. I'm tired of addressing the same misconceptions over and over. So, I'm here to put these misconceptions out in the open, partially as therapy for myself so I don't go insane when I hear them again :-) Please feel free to post misconceptions you've heard to this thread, I want to get this all out in the open. And if I'm wrong on one of these, please let me know... it would mean I would be the one with the misconception, and that would just be crazy :-)

Misconception #1: TBB is not open source.

This is kinda silly, but it comes up for some very strange reason. I don't know why. It says right on the main page for TBB: threadingbuildingblocks.org. TBB is released under GPLv2 with the runtime exception. The runtime exception is not taking away rights, look at libstdc++... it's released under the same license, and you trust that right? So download the source code, you'll find the license is in order. It's open source. Now, I think people get very confused with this dual-licensing thing. I myself am very confused as to why there is a commercial version. I've met a number of people who think they have to buy TBB to use it. I'm not a lawyer, so maybe I've really missed some secret thing in the license that says it's not really open... but not that I've seen. I'm not entirely sure about the usage of TBB in commercial products, and I wish that someone would just come out and say what is intended in this regard. The FAQ on the site doesn't help, it refers to a defunct page for libstdc++. My understanding is that the runtime exception means you can use GPLv2 to link against TBB in your commercial programs... obviously if you change TBB itself you have to contribute your changes back... but that's fair. On a side note, I also used to think it was silly to assign my copyright to Intel for contributions. The FSF does that with it's software too. With TBB it's a bit strange because there is a commercial version, and I wouldn't want my code going into a commercial version either. One of my goals this next week is to setup a TBB svn repository, and people who are wary of putting patches up here can patch the unofficial SVN... and keep their own copyright.

Misconception #2: TBB only works on Intel hardware.

Not that I've seen. I haven't tried it on AMD hardware personally but I know others who have. It may be that there are details about AMD chips that aren't handled elegantly by TBB, but I'm not sure about these issues. There are only a couple of assembly files in all of TBB, and they can be ported to other systems. So nope, I don't see anything that ties TBB to one platform or another. Take a look at the code yourself, if you see something let me know and I'll post a patch myself, after coming to this forum and asking a thousand questions. Perhaps AMD handles barriers in some strange way, I really don't know... but if you think this is the case feel free to patch the code, and respond to this post. I'd like to know where this Intel-only code is too. There might be some truth to this with PowerPC which I understand does barriers in a strange way, but I saw powerpc is supported in the release notes... so...

Misconception #3: C is better than C++, hence TBB is a waste

Believe it or not, I've met people online who actually believe TBB would have been better implemented in C. Without starting a language war, for the C people out there... C++ can be just as fast as C if carefully crafted. TBB is carefully crafted. It also uses advanced language features of C++ internally, so that we get this really cool library. A TBB-like library in C would be an absolute nightmare to work with. This doesen't mean you can't use TBB within your C code, but that's a different story. I'm not sure what else to say to this one, but I've encountered it. TBB is in C++, and integrates in a really cool manner.

Misconceptions you've heard?

Feel free to respond to this thread with other misconceptions. Let's get it all out in the open, and if we need to let's make an FAQ to deal with it, let's do it.

If you read this thread hoping for something more interesting, my apologies. I want to get all these misconceptions out, and discussed so that they're over with and I don't have to hear them anymore. I can just refer them here.

0 Kudos
12 Replies
RafSchietekat
Valued Contributor III
540 Views

"I wouldn't want my code going into a commercial version either" Why not?

"Misconception #2: TBB only works on Intel hardware" The releases you can download from Intel now support almost a third of the architectures targeted in my "Additions to atomic" patch (in no particular order x86/x64, Itanium, Alpha, ARM, MIPS, POWER/PowerPC, PA-RISC, SPARC, ESA/390-z/Architecture).

0 Kudos
Anton_Pegushin
New Contributor II
540 Views
Misconception #4 (if no one beats me): If I use parallel algorithms I don't have to care about thread safety.

It's been a number of times that I heard people say that using TBB tasks directly is a lot harder than using parallel algorithms, plus (!) in that case user has to take care of thread safety in his application. This is not all true. Allthough generally using tasks directly is more complex, it's not the only scenario in which user needs to think about thread safety.Implementing a function object in the thread safe manner is still a TBB user responsibility and both race conditions and dead locks are possible while using parallel_for or parallel_reduce.

And btw, hope this discussion continues and we hear more of those.
0 Kudos
Dmitry_Vyukov
Valued Contributor I
539 Views

Misconception #5: TBB is all-powerful and will help me with any kind of application.

Sorry, TBB is only for "computations". TBB will be of little help for "unstructured" parallelism. TBB will be of little help for general-purpose client software (non number crunching). TBB won't help with server/middle-ware/systems software.

0 Kudos
Dmitry_Vyukov
Valued Contributor I
540 Views

Misconception #6: TBB is so smart so I just have to get linear speedup the very first time.

Sorry, the default is performance degradation. Period. Even with TBB. If you are smart and will try hard then, maybe, you will achieve linear speedup.

0 Kudos
Dmitry_Vyukov
Valued Contributor I
539 Views
Quoting - Dmitriy Vyukov

Misconception #5: TBB is all-powerful and will help me with any kind of application.

Sorry, TBB is only for "computations". TBB will be of little help for "unstructured" parallelism. TBB will be of little help for general-purpose client software (non number crunching). TBB won't help with server/middle-ware/systems software.

This one must go especially to James Reinders ;)

According to my investigations only ~20-40% of developers are dealing with number-crunching and are ready to express the algorithm with tasks. All others are still barehanded in the multicore era...

0 Kudos
dez123
Beginner
539 Views
Quoting - AJ

Misconception #1: TBB is not open source.

I'm not entirely sure about the usage of TBB in commercial products, and I wish that someone would just come out and say what is intended in this regard.

Hi Aj,

just to clarify this one once more - i AM confused with this dual-licence :(

- Do I need a commercial version of TBB in order to be able to sell my product using it (suppose I am not modifying anything in TBB sources)? Otherwise I would compile the sources and distribute DLLs together with my software. Just need a clear statement. I would expect in "Which Intel TBB license is right for your needs?" chapter on TBB frontpage a simple sentence and not something like "If your legal counsel is comfortable with your use of software under the Intel TBB open source license and you do not require commercial support services, please download the latest version of open source Intel TBB...". I am not a native speaker and not a lawyer, but if I get it right, it is either allowed to use OSS-TBB in my commercial software or not allowed, independent of my legal councel being comfortable with it.

And nother thing: what do I actually buy for the money apart from Premium Support? Updates? I can get them anyway from the TBB homepage (which if same as OSS version anyway) ... And if this is the case, wouldn't it be better to sell "premium support" and not "the product"? Don't get me wrong, it is not the matter of not paying $299 for the copy, I simply want to know clear this up for me.

Thanks a lot!

0 Kudos
Dmitry_Vyukov
Valued Contributor I
539 Views
Quoting - dez123

Hi Aj,

just to clarify this one once more - i AM confused with this dual-licence :(

- Do I need a commercial version of TBB in order to be able to sell my product using it (suppose I am not modifying anything in TBB sources)? Otherwise I would compile the sources and distribute DLLs together with my software. Just need a clear statement. I would expect in "Which Intel TBB license is right for your needs?" chapter on TBB frontpage a simple sentence and not something like "If your legal counsel is comfortable with your use of software under the Intel TBB open source license and you do not require commercial support services, please download the latest version of open source Intel TBB...". I am not a native speaker and not a lawyer, but if I get it right, it is either allowed to use OSS-TBB in my commercial software or not allowed, independent of my legal councel being comfortable with it.

And nother thing: what do I actually buy for the money apart from Premium Support? Updates? I can get them anyway from the TBB homepage (which if same as OSS version anyway) ... And if this is the case, wouldn't it be better to sell "premium support" and not "the product"? Don't get me wrong, it is not the matter of not paying $299 for the copy, I simply want to know clear this up for me.

Thanks a lot!

First of all, you are mixing up two independent things: (1) open-sourceness and (2) licencing. Open-source is when you can see the source. No more and less. For example there are paid libraries with open sources. TBB is definitely open-source, just because you can download the sources.

TBB is dual-licenced. And free licence is GPLv2 with the runtime exception. If you comfortable with it, you can use it.

0 Kudos
Dmitry_Vyukov
Valued Contributor I
539 Views
Quoting - Dmitriy Vyukov

First of all, you are mixing up two independent things: (1) open-sourceness and (2) licencing. Open-source is when you can see the source. No more and less. For example there are paid libraries with open sources. TBB is definitely open-source, just because you can download the sources.


Sorry for that, it seems that it is me who mixing up something...

Quoting - Dmitriy Vyukov

TBB is dual-licenced. And free licence is GPLv2 with the runtime exception. If you comfortable with it, you can use it.

When you buy TBB you also get library distributed under different licence (which has nothing in common with GPL, I believe).

0 Kudos
AJ13
New Contributor I
540 Views

It seems to me that you would want the paid product if you intend to change TBB internally, and not tell anyone?

Generally you see dual-licensing with something like the GPL, where you can't really release a closed-source product. Perhaps the best thing here is to ask the nice people at the FSF for their advice :-)

0 Kudos
Alexey-Kukanov
Employee
540 Views
Quoting - AJ
It seems to me that you would want the paid product if you intend to change TBB internally, and not tell anyone?

Far from truth. Commercial TBB packages do not include sources (request an evaluation license to download one, and check). If you take sources from the TBB site, you get it under the terms of open-source license, no matter whether you have bought a copy of TBB or not.

It's not my business why some customers want to buy commercial TBB licenses, but it would be stupid to lose them, would not it? That's just one reason why we provide TBB as a commercial product as well.

Also the TBB team is not in a business of interpreting and explaininglicensing terms. That's the business of lawyers, so if someone does not understand something about GPL with runtime exception, or any other license, he/she should ask lawyers. And this forum is not the place to ask them, neither will they provide an answer here.

So let's better stick to technical topics at this forum.

0 Kudos
AJ13
New Contributor I
540 Views

Also the TBB team is not in a business of interpreting and explaininglicensing terms. That's the business of lawyers, so if someone does not understand something about GPL with runtime exception, or any other license, he/she should ask lawyers. And this forum is not the place to ask them, neither will they provide an answer here.

So let's better stick to technical topics at this forum.

I have moved this conversation to the TBB users mailing list. The list may be accessed here:

http://sourceforge.net/mailarchive/forum.php?forum_name=tbb-users

My first post should show up soon, I think the archive is only updated every day.

I wish for this conversation to carry on, however I respect if this forum does not wish to host it. I have asked someone from the Free Software Foundation to provide an overview of the GPL with runtime exception, because I'm still confused about it myself.

Thanks,

AJ

0 Kudos
robert-reed
Valued Contributor II
540 Views
Quoting - AJ

I have moved this conversation to the TBB users mailing list. The list may be accessed here:

http://sourceforge.net/mailarchive/forum.php?forum_name=tbb-users


Adrien, though you weren't ranting about GPL licensing regarding TBB specifically, we have noticed that our FAQ on the subject has gotten a bit decrepit of late. We were delayed by the holidays but have work in progress to rewrite specific sections of the FAQ to address some of the questions about dual licensing and related topics and make it easier to find them. Look for that content to change in the future. Thanks for your continuing interest in TBB.
0 Kudos
Reply