Compiling Threaded Programs

Compiling Threaded Programs

Several examples of commands used to compile code that uses pthreads are listed in the table below.

Compiler / PlatformCompiler CommandDescription
INTEL
Linux
icc -pthreadC
icpc -pthreadC++
PGI
Linux
pgcc -lpthreadC
pgCC -lpthreadC++
GNU
Linux, Blue Gene
gcc -pthreadGNU C
g++ -pthreadGNU C++
IBM
Blue Gene
bgxlc_r / bgcc_rC (ANSI / non-ANSI)
bgxlC_r, bgxlc++_rC++