Compiling Threaded Programs
Compiling Threaded Programs
Several examples of commands used to compile code that uses pthreads are listed in the table below.
An official website of the United States government
Here's how you know
Official websites use .gov
A .gov website belongs to an official government organization in the United States.
Secure .gov websites use HTTPS
A lock (
) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.
Several examples of commands used to compile code that uses pthreads are listed in the table below.
| Compiler / Platform | Compiler Command | Description |
|---|---|---|
| INTEL Linux | icc -pthread | C |
| icpc -pthread | C++ | |
| PGI Linux | pgcc -lpthread | C |
| pgCC -lpthread | C++ | |
| GNU Linux, Blue Gene | gcc -pthread | GNU C |
| g++ -pthread | GNU C++ | |
| IBM Blue Gene | bgxlc_r / bgcc_r | C (ANSI / non-ANSI) |
| bgxlC_r, bgxlc++_r | C++ |
