NVIDIA HPC

NVIDIA HPC  is  a Comprehensive Suite of Compilers, Libraries and Tools for HPC

Using NVIDIA HPC

Loading the Module

To use NVIDIA HPC in our HPC Cluster, one needs to load the corresponding module. To know the dependencies of NVIDIA HPC, run

module spider nvhpc

Load the appropriate module (version):

module load nvhpc/22.2

Running a Sample Job

Copy the sample C++ source code "sortParallel.cpp" from /usr/local/doc/NVHPC to your home directory:

cp /usr/local/doc/NVHPC/sortParallel.cpp .

Request a GPU node:

srun -p gpu --gres=gpu:1 --mem=8gb --pty bash

Load nvhpc module:

module load nvhpc

Compile the code using nvhpc:

nvc++ -stdpar -o cusort sortParallel.cpp

Run:

time ./cusort

output:

Testing with 1000000 doubles...

Serial: Lowest: 3348 Highest: 4.29497e+09 Time: 5.141516ms

Serial: Lowest: 3348 Highest: 4.29497e+09 Time: 2.559334ms

Serial: Lowest: 3348 Highest: 4.29497e+09 Time: 2.473932ms

Serial: Lowest: 3348 Highest: 4.29497e+09 Time: 2.676512ms

Serial: Lowest: 3348 Highest: 4.29497e+09 Time: 2.555062ms


real    0m0.773s

user    0m0.138s

sys     0m0.214s


For batch job submission, refer to HPC Interactive & Batch job submission.