Intel(R) TBB 4.2 update 4 is released and available for download

Intel(R) TBB 4.2 update 4 is released and available for download

Intel(R) Threading Building Blocks 4.2 update 4 is now released and available for download. Check the What's new article for list of changes.

You can download Intel TBB 4.2 update 4 from commercial and open source sites.

8 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

On OS X, dining_philosophers doesn't build: #include <unistd.h> to use sleep().

(Added) seismic is still invisible with argument 300... or maybe I just blinked at the wrong time.

Thanks Raf for reporting this. We'll double check the samples and fix them if needed.

Not (yet?) in this release: Clang as the default compiler on OS X, X Window System support on recent Debian-derived Linux distributions.


Hello, Raf,

About Dining Philosophers, could you tell me which OS/X and clang versions you have problems with?  I've tried two different versions (

Darwin 13.1.0 Darwin Kernel Version 13.1.0: Thu Jan 16 19:40:37 PST 2014; root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64; Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)

Darwin 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64; Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn

and haven't found the error.

Thanks and Regards,

I'm seeing "Kernel Version: Darwin 13.1.0" (as in your first version) and "clang-503.0.40" (as in your second version).

"man 3 sleep" mentions "#include <unistd.h>", and if I add that to examples/graph/dining_philosophers/dining_philosophers.cpp it solves the problem "dining_philosophers.cpp:219:5: error: use of undeclared identifier 'sleep'".

(Added) Note that include/tbb/machine/gcc_generic.h includes this header (not immediately obvious why?), but it's not used with Clang as the compiler (verified for "make compiler=clang examples" by adding "#ifndef __GNUC__ / #error / #endif"). I couldn't immediately find the cause of the problem or of its sudden manifestation, but it (now?) also occurs for tbb42_20140122oss (previous update?), which I presume I would also have tested on OS X (or not?), so this may be caused by a recent change in the environment rather than by a change in TBB (meaning I should probably have reported it in a different thread). But it also seems better to just add "#include <unistd.h>" immediately before "#define SLEEP(a) sleep(a)" and reserve one's curiosity for more interesting subjects.

Hi, Raf,

Thanks for the extra information.  I will fix it by using the tbb_thread method for sleep; seems like it will reduce the complexity of the test and remove the need to update it further.


If you want to go there, you could do even better by reviewing all uses of sleeping. For example, there are 4 independent but (nearly?) identical definitions of a function MilliSleep(), 3 of rt_sleep(), and also Harness::Sleep(), that are comparable to SLEEP(): functions instead of a macro, more precise by a factor 1000, but all with similar or even greater complexity for the same simple functionality. It's hard to keep a DRY eye looking at that situation... :-)

(2014-05-20 Edited)

Leave a Comment

Please sign in to add a comment. Not a member? Join today