Skip to main content
⚠ INFORMATION
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
LanguageCommandSource file suffixes
Cnvc.c, .i
C++nvc++.C, .cxx, .c++, .cc, .cpp
Fortrannvfortran.f, .F, .FOR, .F90, .F95, .f90, .f95
CUDA-Fortrannvfortran.cuf, .CUF
  • PGI Compilers
LanguageCommandSource file suffixes
Cpgcc.c, .i
C++pgc++.C, .cxx, .c++, .cc, .cpp
Fortranpgfortran, pgf77, pgf95.f, .F, .FOR, .F90, .F95, .f90, .f95
CUDA-Fortranpgfortran, 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

Your opinion matters!

To give your feedback, report an error, or suggest an improvement, click here:

quick anonymous questionnaire

This questionnaire is temporary and will take less than a minute, so take the opportunity!