⚠ INFORMATION
This page was translated by an AI (LLM) with a cursory human check and is awaiting full review.
This page was translated by an AI (LLM) with a cursory human check and is awaiting full review.
NVIDIA/PGI Compilers (Fortran, C/C++)
The different versions of NVIDIA and PGI compilers available on Jean Zay can be activated using the module command.
Example of loading:
$ module avail pgi nvidia-compilers
-------------------- /lustre/fshomisc/sup/hpe/pub/module-rh/modulefiles --------------------
pgi/19.10 pgi/20.1 pgi/20.4
-------------------- /lustre/fshomisc/sup/hpe/pub/module-rh/modulefiles --------------------
nvidia-compilers/20.7 nvidia-compilers/21.5 nvidia-compilers/22.9 nvidia-compilers/24.3
nvidia-compilers/20.9 nvidia-compilers/21.7 nvidia-compilers/23.1 nvidia-compilers/25.1
nvidia-compilers/20.11 nvidia-compilers/21.9 nvidia-compilers/23.9
nvidia-compilers/21.3 nvidia-compilers/22.5 nvidia-compilers/23.11
$ module load nvidia-compilers/24.3
$ module list
Currently Loaded Modulefiles:
1) nvidia-compilers/24.3
Here are the compilation commands for Fortran, C and C++:
- NVIDIA Compilers
| Language | Command | Source file suffixes |
|---|---|---|
| C | nvc | .c, .i |
| C++ | nvc++ | .C, .cxx, .c++, .cc, .cpp |
| Fortran | nvfortran | .f, .F, .FOR, .F90, .F95, .f90, .f95 |
| CUDA-Fortran | nvfortran | .cuf, .CUF |
- PGI Compilers
| Language | Command | Source file suffixes |
|---|---|---|
| C | pgcc | .c, .i |
| C++ | pgc++ | .C, .cxx, .c++, .cc, .cpp |
| Fortran | pgfortran, pgf77, pgf95 | .f, .F, .FOR, .F90, .F95, .f90, .f95 |
| CUDA-Fortran | pgfortran, pgf95 | .cuf, .CUF |
Examples of executable generation
After loading the desired version of NVIDIA/PGI compilers, simply call the corresponding command to generate your executable:
nvc prog.c -o prog
pgcc prog.c -o prog
nvc++ prog.cpp -o prog
pgc++ prog.cpp -o prog
nvfortran prog.f90 -o prog
pgfortran prog.f90 -o prog