nvhpc
Link to section 'Description' of 'nvhpc' Description
The NVIDIA HPC SDK C, C++, and Fortran compilers support GPU acceleration of HPC modeling and simulation applications with standard C++ and Fortran, OpenACC® directives, and CUDA®. GPU-accelerated math libraries maximize performance on common HPC algorithms, and optimized communications libraries enable standards-based multi-GPU and scalable systems programming.
Link to section 'Homepage' of 'nvhpc' Homepage
https://developer.nvidia.com/hpc-sdk
Link to section 'Versions' of 'nvhpc' Versions
- Scholar: 22.11
- Gilbreth: 22.7
- Anvil: 21.7
Link to section 'Module' of 'nvhpc' Module
You can load the modules by:
module purge
module load nvhpc
Link to section 'Example' of 'nvhpc' Example
Below is the example to use nvcc to compile a simple hello-world cuda code.
Link to section 'Cuda code' of 'nvhpc' Cuda code
hello.cu
#include <stdio.h>
__global__ void cuda_hello(){
printf("Hello World from GPU!\n");
}
int main() {
cuda_hello<<<1,1>>>();
cudaDeviceSynchronize();
return 0;
}
</stdio.h>
Link to section 'Compile cuda code' of 'nvhpc' Compile cuda code
$ nvcc hello.cu -o hello
Link to section 'Run compiled code' of 'nvhpc' Run compiled code
$ ./hello
Hello World from GPU!