To take advantage of the GPU accelerated compute nodes, your code will need to be modified to run in the hybrid GPGPU environment. If you are using PGI compilers to compile GPU code, the compile chain will need to specify that the target is GPU via the target argument to the pgcc/pgfortran compiler. This include the compiler argument: -ta=nvidia
. This compiler flag tells the PGI compiler to compile for the NVIDIA GPU.The preferred method of accessing GPUs is to use the NVIDIA CUDA toolkit
CUDA C code compilation
Load the CUDA module to access the NVIDIA CUDA compilers:
Code Block | ||||
---|---|---|---|---|
| ||||
module load cuda/9.1.85
|
which places the nvcc
compiler in your path. See the NVIDIA CUDA programming guide for more details.
CUDA Fortran and OpenACC code compilation
To compile code written with CUDA Fortran or OpenACC directives, load the latest PGI compiler module. Include the compiler argument -ta=tesla to compile for Artemis's GPUs.
Code Block |
---|
module load pgi/18.1 |
MPI CUDA C compilation
To compile MPI CUDA C programs, load the CUDA-aware OpenMPI module and the CUDA module before compiling with nvcc
:
...