Reaching Others University at Buffalo - The State University of New York
Skip to Content

PGI

The Portland Group compilers, a suite of high performance compilers and associated tools.

Category:  Compiler

 

Usage Notes:

Show the software versions:  module avail pgi

Loading the module will set the path and any necessary variables:  module load pgi/version

 

Example of compiling hello-world with the PGI C compiler:


[cdc@u2:~]$ cat hello-world.c 
#include <stdio.h>

int main() {
   printf("Hello world!\n");
}
[cdc@u2:~]$ module avail pgi

-------------------------- /util/Modules/modulefiles ---------------------------
pgi/10.1          pgi/11.1(default) pgi/12.3          pgi/7.1
pgi/10.3          pgi/11.8          pgi/6.2           pgi/7.2
pgi/11.0          pgi/11.9          pgi/7.0
[cdc@u2:~]$ module load pgi/12.3
[cdc@u2:~]$ pgcc -o hello-pgi hello-world.c 
[cdc@u2:~]$ ./hello-pgi 
Hello world!
[cdc@u2:~]$