Skip to content

Compilers

The ICARUS compiler environment is provided by NVIDIA HPC SDK 26.5. Load the same module when compiling and running your application:

module purge
module load nvhpc-hpcx-cuda13-openmpi5/26.5
Language / model Command Purpose
C nvc NVIDIA C compiler
C++ nvc++ NVIDIA C++ compiler
Fortran nvfortran NVIDIA Fortran compiler
CUDA C/C++ nvcc CUDA compiler supplied with the SDK
MPI C mpicc MPI wrapper around the configured C compiler
MPI C++ mpicxx MPI wrapper around the configured C++ compiler
MPI Fortran mpifort MPI wrapper around the configured Fortran compiler

The observed NVIDIA C, C++, and Fortran compiler version is 26.5-0. The bundled CUDA compiler reports 13.2; CUDA and MPI have their own version numbers within the SDK stack.

Check Compiler Versions

nvc --version
nvc++ --version
nvfortran --version
nvcc --version
mpicc --showme:command
mpirun --version

Compile Your Application

After transferring your source, compile it on a login node in your project directory. Load the module above, then use the appropriate command:

# C
nvc -O2 hello.c -o hello_c

# C++
nvc++ -O2 hello.cpp -o hello_cpp

# Fortran
nvfortran -O2 hello.f90 -o hello_fortran

# CUDA C/C++
nvcc -O2 -arch=sm_90 your_gpu_code.cu -o your_gpu_executable

# OpenMP on CPU cores
nvc -O2 -mp hello_omp.c -o hello_omp

# MPI C
mpicc -O2 hello_mpi.c -o hello_mpi

Use -mp with nvc++ or nvfortran for CPU OpenMP code in those languages. For MPI, use the language's wrapper so the required MPI headers and libraries are included. Build executables for ICARUS's Arm aarch64 architecture and run compute workloads through Slurm. See Job Script Template for GPU, OpenMP, and MPI launch examples.

For language support and compiler options, see the NVIDIA HPC SDK compiler user guide.