Intel is open-sourcing its Threading Building Blocks 2.0 software, a C++ template library that simplifies the development of software applications running in parallel.
The Santa Clara, Calif., chip maker will use announce on July 24 at the annual Oscon (OReilly Open Source Convention) in Portland that the source code is now available as an open-source project under the GNU General Public License Version 2 with the runtime exception, the same one the Free Software Foundation uses for libstdc++.
“Intel Threading Building Blocks 2.0 is a C++ runtime library that simplifies threading for performance and scalability. It is a higher-level abstraction that requires less code for threading and delivers multicore performance. It is ready today for the multicore architectures of tomorrow,” said James Reinders, software evangelist and director of marketing for Intels software development products.
Intel will also continue to offer a packaged commercial version of the product for $299, which includes a year of technical support, upgrades and new releases, and which is built from the same source code and with exactly the same functionality as the open-source product.
“The goal of the open-source and commercial offerings is to make parallelism more accessible for programmers and enable increased application performance on multicore processors. While parallel computing is a different creature, its not real hard to get used to, as the world around us is parallel,” Reinders said.
While the commercial product supports Windows, Linux and the Mac OS X, the open-source version will also support Solaris 10, FreeBSD and the G5 processor on Mac OS.
“These are implemented in a build, but we dont have much experience using them on those platforms, so we are looking to the community to help us with those. The plan going forward is to support even more processors and operating systems,” Reinders said.
The TBB product was first released in August 2006, and Intel has been hearing from users since then that they wanted the product to be available everywhere and for a very long time, Reinders said. “They told us that if they had both those assurances, then it would be worth programming using this method,” he said.
Open source was a very natural and appropriate way to provide both of those, so Intel decided to take the plunge, he said. “We are not just open-sourcing it and hoping people show up, we are increasing the number of people at Intel working on the project and encouraging others to contribute and participate in it going forward,” he said.
“We expect that open-sourcing the project will give it a broader appeal, and I am quite confident based on experience that as people try it, they will find it to be a very good system for parallelism, and I think we will see a lot of people start playing around and learning parallelism with it,” he said.
Intel is adding a number of people to the core development team for the product, which is a high-priority project for the company and its customers, he said. “We think that helping people program for parallelism is extraordinarily important, as Intel has a lot of exciting ideas for multicore processors in the future and, without the software, they are not as useful,” Reinders said.
While Intel plans to take a strong role in maintaining and making sure the project moves forward, it is also very aware of the power of the community, he said, and “We really hope they get involved, as their contributions, along with those from our core development team, will make a difference to the product going forward.”
Programming in Parallel
Reinders also floated the possibility of Java and .Net versions of TBB in the future. “While our main commitment is making sure we do well with C++, we think that the concepts of abstracting parallelism, of having a very sophisticated runtime to handle all the mapping of tasks on the threads, those core ideas of what we have in threading building blocks could be applied to .Net and Java,” he said.
Now that the product has been open-sourced, the hope is that more people will look at that and whether it is a good idea or not, he said, adding that Intel wanted to gauge the level of interest in, potential usage of and possible contribution to, such a project.
“We are interested in seeing where that takes us, and if leadership emerges in the community to take this to Java or .Net, that will be a big factor in determining if we do it,” Reinders said.
As the world has already moved to multicore processing, programmers need to start thinking about taking a single program and having it take advantage of multiple processors, he said. But the challenge is taking C++ and extending it to allow every one of those programmers to do parallelism without having to abandon that language, as well as getting it to an appropriate level of abstraction. “Intel TBB 2.0 gets you there,” he said.
Some existing users, like Marc Snir, head of the Computer Science Department at the University of Illinois at Urbana-Champaign, agree with that claim. “TBB promises to change how parallel programming is done in C++,” Snir said.
Intel TBB uses generic programming to be efficient, but lets programmers express tasks instead of threads, allowing scalable programs at a fraction of the developer effort required for C++ with threading packages, he said. The software also provides an abstraction for parallelism that avoids the low-level programming inherent in the direct use of threading packages such as p-threads or Windows threads.
It is also designed to work with any C++ compiler, while its building blocks for threading can be used as a whole or in pieces, and co-exist with raw threads and OpenMP, which simplifies the development of applications for multicore systems, Reinders said. The software also detects the number of cores on the hardware platform and makes the necessary adjustments to allow the software to adapt as more cores are added.
TBB is currently used on a wide variety of C++ applications, particularly ones where scalable performance is important, such as content creation, animation, financial services, electronic design, and automation and design simulation, he said.
A number of customers like Martin Watt, senior software engineer at Autodesk, headquartered in San Rafael, Calif., are active in providing product feedback to Intel. “We used to say make it right, then make it fast. We cant do that anymore. TBB lets us design for correctness and speed up front,” he said.
Among the key benefits of TBB 2.0 are its ability to abstract parallelism without a loss of performance, that it is easier to program and maintain, and that it allows generic programming for performance and portability, Reinders said.
The product coexists with native threads in Windows, Posix and OpenMP, and supports 32-bit and 64-bit platforms as well as Intel, GNU and Microsoft compilers. It is portable across the Windows, Linux and Mac OS X platforms and supports the Intel Thread Checker and Profiler tools, he said.
Looking forward, Reinders said he expects to see a lot of usage by both open-source projects and distributions and closed-source projects, as well as many more new ports and more binaries, so it becomes truly ubiquitous.