Slashdot Log In
Intel Releases Threading Library Under GPL 2
Posted by
CmdrTaco
on Wed Jul 25, 2007 09:02 AM
from the of-interest-to-some-of-you dept.
from the of-interest-to-some-of-you dept.
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.'"
This discussion has been archived.
No new comments can be posted.
Intel Releases Threading Library Under GPL 2
|
Log In/Create an Account
| Top
| 158 comments
| Search Discussion
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
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)
(http://randomcoolzip.blogspot.com/)
Agreed it does look to take a lot of the grunt work out of writing parallel-processing code. There are supposedly Java and
Woohoo (Score:3, Insightful)
GPL 2 (Score:3, Informative)
(Last Journal: Thursday November 20 2003, @05:55AM)
"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: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:GPL 2 only (Score:5, Interesting)
(http://www.networkboy.net/)
-nB
Just great... (Score:1)
Open-Source vs Commercial? (Score:3, Insightful)
(http://programmers.malfunct.net/)
I'm glad to hear it (Score:5, Informative)
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: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).
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.
Nice Offering (Score:1)
(Last Journal: Monday June 14 2004, @06:43PM)
Any reviews for:
1) benchmarking
2) development ease
task based then thread based (Score:1)
(http://www.milksucks.com/ | Last Journal: Monday September 15 2003, @12:30PM)
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)
(http://stiffproposition.com/)
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.
Great news! (Score:2, Interesting)
(http://www.deadeyeinside.com/)
This and XEN (Score:2)
(http://slashdot.org/journal.pl?op=list&uid=911325 | Last Journal: Monday October 29, @02:52PM)
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?
Difficult to implement (Score:2, Interesting)
Compatibility kinda sucks (Score:2, Informative)
(http://powerlord.livejournal.com/)
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:
OSes:
Compilers:
P.S. Slashdot pulled out all the trademark symbols, and doesn't support the sup tag, so you'll just have to picture them in all the appropriate spots. :P
Re:Compatibility kinda sucks (Score:4, Informative)
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.
GPLv2 only (Score:3, Informative)
(http://www.axiom-developer.org/)
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.
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.
"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.
Performance Comparison? (Score:1)
Pythonify all (Score:1)
(http://t0mb.net/)
Re:CS courses (Score:2, Insightful)
(Last Journal: Sunday September 02, @04:01AM)
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:I'm thinking (Score:5, Informative)
(http://www.polsci.wv...ecream/icecream.html)
And, if there was, well it's under the GPL now, and I'm sure someone would have added / corrected that mistake.
Re:CS courses (Score:1)
Re:Burning question... comparison to OpenMP? (Score:1)
This blogpost talks about OpenMP vs TBB: Threading Building Blocks: Solution Looking for a Problem? [intel.com]
Neither Linux nor Intel specific (Score:3, Informative)
(http://slashdot.org/)
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, Microsoft and GNU.
Threading Building Blocks supports the following processors:
* Non Intel processors compatible with the above processors
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)
(http://randomcoolzip.blogspot.com/)
Re:Intriguing (Score:1)