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

TBB on HP-UX (and Solaris)

johnpenney
Beginner
499 Views

Hi - I'm new to TBB though I've done an amount of reading on it and have got the O'Reilly book on TBB so I think I "get it" in principle!

We build our (threaded) application on 3 platforms - Windows (VC++7), Solaris 2.10 (OneStudio8 C++ v5.5) and HP-UX 11.23 (PA-Risc & Itanium, HP aC++).

Other threads in this forum suggest Solaris support is present, though I can't see it stated formally anywhere.

But there's no suggestion that HP-UX is supported.

We might be interested in attempting an HP-UX port, but would need some understanding of the effort involved beforehand. I'm interested in hearing from those involved in the Solaris port for example... how much effort did it take to get it working I wonder?

Thanks,

John

0 Kudos
4 Replies
RafSchietekat
Valued Contributor III
501 Views
The most recent development release (tbb20_20080402oss_src) will build on Solaris (I tried SXDE 1/08 on a virtual x86 machine) using g++ (requiring a manual change to build/SunOS.inc), but CC fails (support for GNU inline assembler syntax is bleeding edge and there are no files with CC's own syntax), and I don't see any SPARC files either. This level of porting can be done in a day or so (I did it too, but too late to be useful); if you know your inline assembler syntax, a few days might be all you need.

0 Kudos
johnpenney
Beginner
501 Views

Thanks Raf. Your reply made me realise I need to dig a bit deeper so I know the right questions. I "get it" only from the point of view of a theoretical TBB user. I suspect there's rather more to learn in order to port TBB.... :-)

The porting instructions suggest that you could start with a minimal implementation (in include/tbb/machine) and extend it with inline assembly code to improve performance. From your answer above, it sounds like Ishould be able to get the basic TBB up and running in"a day or so", and the assembly code extensions would take me "a few days".

Have I understood correctly so far?

The only other thing that confused me was that the porting instructions suggest that a new file in include/tbb/machine is required. But there's none present for SunOS.

0 Kudos
RafSchietekat
Valued Contributor III
501 Views
It only took about a day for Solaris (Express Developer Edition 1/08) because g++ could reuse the inline assembler code in linux_ia32.h (linux_*.h and mac_*.h could and perhaps should be renamed to gcc_*.h, with gcc standing for g++, although Solaris CC is attempting to also use that syntax in addition to its own).

I think you won't get anywhere without at least about the amount of assembler code that mac_ppc.h provides for the PowerPC (tbb_machine.h tests for 3 macros, but if you don't define __TBB_fence_for_acquire and __TBB_fence_for_release you're depending on a misguided interpretation of "volatile" semantics that is not provided by all compilers), if you have a 64-bit data bus and you trust your compiler to do the obvious (I like to err on the pedantic side and would use much more assembler code, and even then I have lingering doubts, e.g., whether the trick to load and store 8-byte values on x86 really works on all hardware versions). Apparently you don't need to worry about alignment issues, which are taken care of for you and unit tested as well.

Those time estimates are obviously very rough, and depend on how much you already know (I didn't really look at the instructions very carefully) and how much you get distracted (you might guess that I do), but a few hours (that would be impressive...) to a few days should be enough.

(Added) Some information to save you some time with Solaris (this works with SXDE 1/08 on x86) until there are instructions (I didn't find any): add /usr/sfw/bin to your PATH (to find gtar, gmake and g++ during the build), unpack the distribution file (nothing earlier than tbb20_20080402oss_src) using gtar (because of how GNU tar deals with long file names), change suncc to gcc in build/SunOS.inc (twice, for native_compiler and compiler, on consecutive lines), and then use gmake to build.

0 Kudos
robert-reed
Valued Contributor II
501 Views
FYI, Solaris binaries for TBB were posted to the latest Stable release download page earlier today.
0 Kudos
Reply