
Intel Releases Threading Library Under GPL 2 158
littlefoo writes "Intel Software Dispatch have announced the availability of the Threading Building Blocks (TBB) template library under the GPL v2 with the run-time exception — so this previously commercial only package is now open for all the use, whether for open-source projects or commercial offerings (although they are explicitly encouraging open source use). The interface is more task-based then thread-based, but with a somewhat different view of things than, e.g. OpenMP.
From the Intel release: 'Intel® Threading Building Blocks (TBB) offers a rich and complete approach to expressing parallelism in a C++ program. It is a library that helps you leverage multi-core processor performance without having to be a threading expert. Threading Building Blocks is not just a threads-replacement library. It represents a higher-level, task-based parallelism that abstracts platform details and threading mechanism for performance and scalability.'"
As if enough people weren't already confused... (Score:1, Troll)
--
Censored [blogspot.com] by [blogspot.com] Technorati [blogspot.com] and now, Blogger too! [blogspot.com]
Re:As if enough people weren't already confused... (Score:4, Informative)
Re:As if enough people weren't already confused... (Score:4, Informative)
Agreed it does look to take a lot of the grunt work out of writing parallel-processing code. There are supposedly Java and
Re: (Score:3, Insightful)
Re: (Score:2)
c++ abstracts away from ASM, so is it bad too?
Um, I wasn't saying it was bad, I just meant that referring to something as "transparent" usually implies that it makes it easier to see the implementation beneath. I thought "opaque" was more appropriate, because TBB obscures the details normally associated with writing multi-threaded code. I'm all in favor of abstracting away any details that tend to be tedious or error-prone. Especially when it comes to multi-threading, since AFAIK there haven't been any real breakthroughs in parallel algorithms, so
Re: (Score:2)
Re: (Score:2, Interesting)
As the developers themselves are well aware of, gluing "true" concurrency onto procedural languages such as C/C++/C#/Java will always be "ugly".
There is actually a microsoft labs-developed "fork" of C# called COmega which tries to integrate concurrent programming more tightly into the language.
Just to point out:
1) C# is actually further along in some ways to realizing true and easy-to-use concurrent programming (also ref C# 3.5).
2) Moder
Re: (Score:2)
Woohoo (Score:3, Insightful)
GPL 2 (Score:3, Informative)
"Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation"
You can of course get it as GPL 3....
Re: (Score:2, Offtopic)
Try to take my very crappy and unimportant GPLv2 code (note, not GPLv2 or any later version) and relicense it/use it with GPLv3 code and you'll be getting a letter from my lawyer. I dare you to do it to IBM.
Re: (Score:2)
Re:GPL 2 (Score:4, Informative)
Simply put, you can link in the code as a library without worrying about LGPL's library requirements. (Namely the need to be able to replace the library with an upgraded version.) Intel notes that this is necessary for C++ libraries because of the way they have to be linked.
For the parent's code, I doubt he chose to have this clause in the GPL he chose, and it wouldn't be possible with his.
Re: (Score:2)
Simply put, anything created BY the software does not matter. The GPL says nothing about that.
If you make a Word document in Open Office, is that document GPL'd? No. It's the same here. The binary that is created does not fall under the GPL as it is merely considered a document.
Again: The GPL3'd GCC can still compile programs that use ANY license, just as the GPL'd GCC can do today. The only dif
Re: (Score:2)
The GPL3'd GCC can still compile programs that use ANY license, just as the GPL'd GCC can do today. The only difference is that you will not be allowed to run the GPL3'd GCC on a device that doesn't comply with the GPL V3's requirements.
Just a minor correction to an otherwise informative post. You will be able to run GPLv3 code on a device that doesn't comply with the GPLv3's requirements, you just won't be able to distribute GPLv3 code on that device. The GPL (v2 or v3) doesn't stop you from modifying or running it however you want, it only puts requirements on your distribution.
Re: (Score:3, Interesting)
You are correct that Intel's code would be used by the final program. (I hesitate to say 'become part of' because it's still a seperate library, just used by the program. When you wear glasses, they don't become part of you, no matter how necessary they are to your continued existance.)
Re: (Score:2)
That depends on what you mean by "copy". Since it uses the "runtime exception", you can link to the library in a program released under any licensing models you want, you just can't modify the library itself and distribute it other than under the GPL.
Re: (Score:2)
Re: (Score:2)
The compilers don't matter... what does matter is that GPL3 code is incompatible with GPL2 code so you cannot copy this code into GPL3 programs you write unless Intel re-licenses it as GPL2/GPL3 code. If they never change the license on it, welcome to the software divide created by the FSF in their zeal to make the GPL3 incompatible with GPL2.
It depends on if Intel licensed this code "under the GPL version 2" or "under the GPL version 2 or (at your option) any later version". If they included the "any later version" option, then it can be included into the GPLv3 GCC. If not, then your statement is correct.
Re: (Score:2)
Re: (Score:2)
Re: (Score:3, Interesting)
Actually it says (and "any later version").The part of the program that says this is licensed under the GPL would have to say the "OR" version. The portion you and many others who don't know the GPL well enough to discern the intent pick the part outside the GPL entitled how to apply this for reference. It isn't part of the GPL and it isn't anything ot
Re: (Score:3, Informative)
Re: (Score:2, Informative)
No you can't.
GPL 2 only (Score:3, Informative)
# Copyright 2005-2007 Intel Corporation. All Rights Reserved.
#
# This file is part of Threading Building Blocks.
#
# Threading Building Blocks is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# version 2 as published by the Free Software Foundation.
There's no "Or Later" in there. This is GPL v2 only.
Re:GPL 2 only (Score:5, Interesting)
-nB
Re: (Score:2)
Agreed. The real problem is that many projects lose touch with their contributors, and so can't contact them all and say, "what about moving to this new license?" Of course, even if they could, getting agreement on that would be tough.
Open-Source vs Commercial? (Score:3, Insightful)
Re: (Score:2)
The contrary of open source is closed source.
The contrary of commercial is non-commercial (too many angles on that one: not for profit, public, etc.)
The contrary of Free (libre) is enslaved.
The contrary of Free (gratis) is costly.
Proprietary is the contrary of public domain. (Note that public domain is ONE of the contraries of commercial...but not an exact match. Most commercial activity requires non-public-domain material or informational components.)
I'm glad to hear it (Score:5, Informative)
Re: (Score:2)
I think you're getting confused. Once threads are created they're scheduled by the OS whether they like it or not. An app can't do its own scheduling other than simply halting or not halting a thread though obviously it can decide when to create/destroy threads or allocate data to specific threads.
Re: (Score:2, Informative)
Re: (Score:2)
Looks good, but a little hampered by C++ (Score:5, Insightful)
But. As much as I love C++ ( and I do ) the real weakness is the lack of usable closures/lambda. The parallel_for example requires you to pass a functor to execute on ranges, which is fine, it makes sense, but since you can't define the closure in the calling-scope in C++ you end up filling your namespace with one-off function objects.
This is not a critique of TBB, but rather of C++. In java I can make an anonymous subclass within function scope. In python and hell even javascript I can make anonymous functions to pass around. But in C++ I can't, and this means that my code will be ugly.
Not that this is new news. I use Boost.thread for threading right now, and most of my functors are defined privately in class scope ( which is, at the very least, not polluting my namespace ) but it's too bad that I don't have a more elegant option in C++.
That being said, Boost.lambda makes my brain hurt a little, so my complaints are really just a tempest in a teacup. If I were smarter and could really grok C++ I could probably use Boost.Lambda and this would be a non-issue.
Re: (Score:2, Insightful)
Besides how hard is it to multicore manually, you can either subdivide a major loop, if its warranted, if it lasts 1us then its useless or
you might as well subdivide at the highest level. ie AI/AUDIO/3D
Javascript, even if running on 16 5ghz cores, would still be slower than 1 core 3ghz, so its a mute benefit of its 'magic functions'
I wouldn't want to depend on a generic system to make my random function appear faster, rather design it we
Re: (Score:2)
i rather have the other core free
I don't know your setup, but you've made the schoolboy error of assuming that everyone has 2 cores. I suppose in the future, you'll be the guy complaining that your new 64-core CPU only uses 2 of them, "why can't app writers figure out how many cores I have and use them all"
You don't need a core free to run apps, and having functors is a well established C++ paradigm for creating code, they're not any worse than calling a simple C function (even if they look strange sometimes - the compiler does all the wo
Re: (Score:2)
Well with a library such as this your code doesn't have to keep track of how many threads it is supposed to use or how many are available. You just write some parallel loops/functions and the library will scale the # of threads accordingly. I don't believe it would be all too difficult to explicitly tell the lib the number of threads to use (N, N/2, N-1, etc. wh
Re: (Score:2)
Re: (Score:2)
Then I guess you'll be happy to hear that the proposal [open-std.org] for lambda expressions is well on its way to getting included in C++09.
But the thing is (Score:4, Informative)
You'll find that this is rather evident in most games. While it is increasingly common to write large portions of the game in a scripting language since that make it easier to write and perhaps more importantly easier to mod, you'll find that the high speed stuff is still C++. Take Civ 4 for example. They wrote almost the whole damn game in XML and Python. All data (like unit definitions, technology tree, etc) is stored in XML files, all the scripting necessary to make them work is Python. Makes the game extremely easy to mod. However, the AI code, which they also released to end users, is in C++. The reason is that the AI is highly intensive and would have run too slow in Python. Also, the core engine of the game (not released to users) is C++ as well.
So it isn't surprising this is where Intel is targeting their optimisations. Also, I'd argue that to a large degree any of this kind of thing for a managed language is the responsibility of the runtime itself. If Java is to have better support for automatically threading things, the JRE is probably where that should be done.
A job for Fortran . . . (Score:3, Informative)
Fortran 90 and later already have the structures for this (Forall, etc).
*sigh*
hawk, who hasn't written a line in over two years
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:3, Informative)
Local _functions_ aren't in C++, but may be a GCC extension - which might be confusing you.
Re:Looks good, but a little hampered by C++ (Score:4, Informative)
Local classes / structs do not have external linkage and therefore can't be used as template arguments. So, for functors etc., which is precisely where you'd want something like a local class (ie. because you really want a closure), they are useless.
Hence why we have Boost lambda. Expect, and I agree with the GP, the syntax ends up so horrible (due to the constraints of C++, not in any way the fault of the Boost devs) that you end up not using it. Not a lot of point in trying to do something because it is technically cleaner and neater if it ends up unreadable and therefore unmaintainable (for that, there is always Perl).
Re: (Score:2)
No - you'd need to ask someone close to the history of the standards process.
There are / have been proposal(s) to remove this limitation. The standards process grinds along pretty slowly - but it may happen, one day.
Re: (Score:2)
Re: (Score:2)
This is an error in C++ (although your compiler might support it as a non-standard extension)
class local {
public: void hello() { printf("hello world\n"); }
};
local::hello();
Must either declare 'hello' static, or call it as:
local().hello();
Oh, and if you are worried about cluttering up "the namespace", that's what namespace MySpace { } is for
Actually that's what
Re: (Score:2)
The interesting paper on adding lambda/closures to C++ looks very like it maps a lambda to a function object. The key here, is that the function object cheats by being on the heap so you have access to copies of captured variables when you call the closure. Not sure how this would work if you tried to communicate between two closures using t
Great news! (Score:2, Interesting)
This and XEN (Score:2)
Question: With this now GPL2 and open source, will this fix one of the problems of XEN?
XEN can only be run on certain processors when used with particular OSes, XP, namely. And, as I understood it, it was because of the threading. If XEN incorporates this into their system, will this open the door?
Re: (Score:3, Interesting)
Re: (Score:2)
Difficult to implement (Score:2, Interesting)
Compatibility kinda sucks (Score:2, Informative)
I know this comes as a great surprise, but the OSes and processors this runs on are limited [intel.com]. If you want your programs to run on non-Intel platforms, or on any of the BSDs, I suggest you skip it and use something else.
Processors:
Re: (Score:2)
Well, yeah, considering it's an Intel software product, that Intel originally released under a closed-source license and probably charged a nominal fee for. (Intel's software is used to promote their hardware, after all, so even if they give it away for free, they don't lose out since their li
Re: (Score:2)
Since its GPLv2 rather than closed, to the extent that it is a useful library and easier to adapt to other processors/OS's than implement the API or an equally useful one from scratch, there is at least the potential of community-driven implementations for other environments.
Re: (Score:2)
If there is not technical limitation to the use on other processors and Intel just didn't warrant or claim it works on them, then it might work well with them, you just need a way to find out for sure. I ma guessing this might lead to a designed and tested for Inte
Re: (Score:2)
Re:Compatibility kinda sucks (Score:4, Informative)
Re: (Score:2)
Re:Compatibility kinda sucks (Score:4, Informative)
The commercial product information quoted does not include some ports which were completed for the open source project only days before the open source release.
Preparing for open source, we were able to get G5 for Mac OS X as well as support for Solaris and FreeBSD (both x86 and x86-64) working before releasing on Tuesday. It was tight - but they made it. I wasn't sure until the week before what we would have - but the team got them working. I think it will be easier now that the project is started - and we can let other join in to help us.
I should also say we got a bunch more Linux distributions working for builds too. We have tested them enough to see no issues - but we haven't enough experience to call them supported on the product pages (commercial product). Please look for the latest ports on the open source project threadingbuildingblocks.org. We'll work with anyone who has processors/system expertise and needs any advice we can offer. Understandably, we don't have a lot of non-Intel hardware inside Intel to test upon and we are hoping others can help a bit with that.
For compilers - we have gcc, Intel, Microsoft and Apple (gcc in Xcode environment) compilers all working with the builds. It seems like we may have something to do for Sun's compilers and/or environment working - some Sun engineers are in touch and helping us double check this. No schedule - just working together - which I have faith will get results to put out in an updated open source copy in the not too distant future - non-binding wish - this is not a promise
The biggest issues from processor to processor is knowing how to implement a few key locks, and atomic operations, best in assembly language. Since we have support for processors with both weak and strong memory consistency models - we know TBB is up to the task.
TBB is very strongly tied to shared memory, and so a port to a Cell processor (or a GPU) would be a bit more challenging - but might be doable for the Cell. We've had only a few discussions/thoughts - no progress I know of figuring out a good approach there. That will almost certainly take someone with more Cell experience than we have at this time. I'm open to learning - but I'd need a teacher for sure.
Re: (Score:2)
While that's true, I assume that they would have listed one of the BSDs if they knew it worked on it. As far as I know, it required specific thin
GPLv2 only (Score:3, Informative)
This doesn't surprise me much, actually - I imaging Intel wouldn't want to commit their code to an unknown future license, and I expect they're still evaluating GPLv3. Even if they were done with that evaluation, the process for releasing this under v2 probably took a LONG time to complete - Intel is after all a large corporation. Restarting with GPLv3 probably would have just delayed it, although I suppose the only ones who would actually know that work for Intel.
Re: (Score:2)
"Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed."
Thus, I expect that a court would find that Intel would be bound to the verbatim GPLv2 (which has "or any later version") unless they specifically say something of the kin of "modified GPLv2" wherever they mention the license they're using, and particularize the modifications prominently in their version.
They would also be
Re: (Score:3, Informative)
I would not. The verbatim GPLv2 states:
If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions eithe
Re: (Score:2)
No, if anything, in that case, Intel would be guilty of copyright violation on the license. Forcing them to adhere to the original license (assuming their product doesn't incorporate anything licensed under the unmodified license) would be an extraordinarily improbable remedy, in that case.
But, anyway, you're wrong: the GPLv2 doesn't contain an "or any later version" clause, it has a pro
Re: (Score:2)
No, if anything, in that case, Intel would be guilty of copyright violation on the license. Forcing them to adhere to the original license (assuming their product doesn't incorporate anything licensed under the unmodified license) would be an extraordinarily improbable remedy, in that case.
Incidentally, adherence to the original license would be a shield against litigation by Intel. In other words, Intel would not be permitted to rely upon modifications to the contr
Re: (Score:2)
I don't think that works if the original license wasn't the one Intel distributed. If Intel distributed the original license and tried to foist a modification off, promissory estoppel might limit the effect given to the revision (or at least a shield against som
Re: (Score:2)
I think you understand and are getting at what I was hoping to be able to convey.
If Intel said it was using the unmodified GPLv2, someone relied upon the unmodified GPLv2 e
Memory requirements - bummer (Score:3, Interesting)
I read on their FAQ that TBB requires 512MB to run, though they recommend 1GB. This appears to be very high, especially when compared to Boost.Threads etc. I can't think of a reason why they need to allocate this much - and it would probably be a problem for consumer applications.
Also from the FAQ, the so-called concurrent containers still need to be locked before access. So no change from normal STL containers there.
But I will download it just for the memory allocator they supply, since it can be plugged into STL, and claims to hand out cache-aligned memory. It can apparently be built independently of the rest of TBB.
Re: (Score:2)
The easy way to answer this question is to compile and run a sample application I suppose...
Re: (Score:2, Informative)
TBB really has minimal requirements of its own... using TBB won't really change the memory needs enough to worry about it.
I'll see if we can find a way to update the web page so it makes sense. Sorry for the confusion.
The concurrent containers are much more scalable than those in STL - much more scal
"open-source" != "non-commercial" (Score:2)
The antonym of "open-source" is "closed-source" or "proprietary". Anyone telling you you can't use and distribute GPL'ed software commercially is in violation of the GPL.
Re: (Score:2)
Anyone telling you that is wrong, perhaps, but the GPL doesn't impose a universally-applicable limit on free speech which makes anyone who says it a violator of the GPL. (Someone distributing software that they got under the GPL who asserts a license term say you can't use their distribution/modification of that GPL software in commercial software might be in violation of the GPL, but most people who say
Re: (Score:2)
Re: (Score:2, Insightful)
That said, I'm sure most CS courses teach at least the basics of memory management, but people are still happy to rely on the Java garbage collector
Re: (Score:2)
Re: (Score:2)
I'm still waiting for someone to explain to me why this isn't even touched on in most CS programs.
In fact, I'm still waiting for someone to help me understand it. :\
Re:task based then thread based (Score:5, Funny)
Obviously you are in the those who don't group.
Re:task based then thread based (Score:4, Funny)
The then/than mixup is kind of funny though. Reminds me of something I read in the engineering faculty on a white board (I assume a first year engineer):
"I'd rather be retarded then do my engineering homework.."
Looks like he had the pre-requisite fulfilled and should have just got on with the homework.
Re: (Score:2)
And obviously it's your fault.
Re: (Score:2)
Re: (Score:2, Funny)
Re: (Score:2)
1) those who don't use zero-based array indices, and
1) those who do
Re: (Score:2)
Re: (Score:2)
0 = 0
1 = 1
10 = 2
11 = 3
and so on
or am I mistaken?
Re: (Score:2)
Try it with the columns having 5,3,1,1 as their values instead of 8,4,2,1
Re:I'm thinking (Score:5, Informative)
And, if there was, well it's under the GPL now, and I'm sure someone would have added / corrected that mistake.
Re: (Score:3, Insightful)
Neither Linux nor Intel specific (Score:3, Informative)
It is neither Linux nor Intel specific
http://threadingbuildingblocks.org/ [threadingb...blocks.org]
Cross platform support:
* Provides a single solution for Windows*, Linux*, and Mac OS* on 32-bit and 64-bit platforms using Intel®, Microsoft, and GNU compilers.
* Supports industry-leading compilers from Intel, Mi
PS3? (Score:4, Interesting)
Hmmm, it may be one of my first projects; six cores running @ 3.2GHz and an easy method of putting them to use. It would be interesting to parallelize pi calculation and see how long it would take to get one million digits.
Re:PS3? (Score:4, Informative)
Re: (Score:2)
Re: (Score:2, Informative)
http://softwarecommunity.intel.c [intel.com]
Re: (Score:2)
Re: (Score:2)