nvhpc-byo-compiler

Version:

23.1

Category:

compiler

Cluster:

Loki

Author / Distributor

https://developer.nvidia.com/hpc-sdk

Description

The NVIDIA HPC SDK (NVHPC) 23.1 is a production-grade suite of compilers, libraries, and tools for developing HPC and GPU-accelerated applications.

This specific module is the β€œBYO Compiler” (Bring Your Own Compiler) version of NVHPC. It is designed to integrate the NVHPC GPU offloading components with your own system-provided or preferred CPU compilers and toolchains (e.g., GCC, Clang, Intel).

Key features:

  • CUDA 12.0 support and Hopper (H100) compatibility

  • OpenACC 2.7, OpenMP 4.5/5.x target offloading

  • CUDA Fortran, CUDA C++, and OpenACC Fortran

  • GPU-aware math libraries (cuBLAS, cuFFT, cuSOLVER, cuSPARSE)

  • Compatible with external MPI stacks and compilers

Documentation

$ nvc   --help     # C compiler
$ nvc++ --help     # C++ compiler
$ nvfortran --help # Fortran compiler

Complete documentation:
https://docs.nvidia.com/hpc-sdk/index.html

Check GPU offloading and CUDA installation with:
$ nvaccelinfo
$ nvc --cuda -c test.c

Examples/Usage

  • Load the module:

$ module load nvhpc-byo-compiler/23.1
  • Compile a CUDA-accelerated Fortran program:

$ nvfortran -cuda -O2 gpu_solver.f90 -o solver
  • Use OpenACC with an external GCC toolchain:

$ nvc -acc -Minfo=acc mycode.c -o mycode
  • Compile C++ with OpenMP target offloading:

$ nvc++ -mp=gpu -std=c++17 main.cpp -o gpu_exec
  • Unload the module:

$ module unload nvhpc-byo-compiler/23.1

Installation

Source: https://developer.nvidia.com/nvidia-hpc-sdk-downloads