Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NVCC 5.0 and OpenACC

Tags:

cuda

nvcc

openacc

According to NVIDIA website:

"The CUDA Toolkit complements and fully supports programming with OpenACC directives."

Does this mean OpenACC programs (pargma and API) can be compiled with nvcc compiler? Or it means only runtime routine calls are supported?

Unfortunately, I cannot install CUDA Toolkit 5.0 atm to get my answer. Thanks!

like image 604
lashgar Avatar asked Nov 04 '12 07:11

lashgar


People also ask

What is nvcc command?

nvcc The main wrapper for the NVIDIA CUDA Compiler suite. Used to compile and link both host and gpu code. cuobjdump The NVIDIA CUDA equivalent to the Linux objdump tool.

Is OpenACC open source?

Summary. The OpenACC directive-based programming model is designed to provide a simple, yet powerful, approach to accelerators without significant programming effort. The Clacc project is working to bring an open source OpenACC compiler and source code translation capability to the HPC and scientific communities.

How does nvcc work?

NVCC is a compiler driver which works by invoking all the necessary tools and compilers like cudacc, g++, cl, etc. NVCC can output either C code (CPU Code) that must then be compiled with the rest of the application using another tool or PTX or object code directly.

Does nvcc compile C++?

NVIDIA's CUDA CompilerThe host code is then pre-processed and compiled with host's C++ compilers supported by nvcc. The nvcc compiler also pre-processes and compiles the device kernel functions using the proprietary NVIDIA assemblers and compilers.


1 Answers

To compile a program using OpenACC directives, you need to use an OpenACC compiler - currently that means Cray, PGI or CAPS.

Parts of the CUDA Toolkit are used by the OpenACC compilers, depending on the implementation they can use various components such as ptxas to assemble PTX to the machine code. The Toolkit also includes libraries such as cuBLAS/cuFFT/cuSPARSE etc. which can interoperate with OpenACC so that you can use both libraries and OpenACC in the same app - you can also interoperate with CUDA C/C++.

nvcc itself is not an OpenACC compiler.

like image 64
Tom Avatar answered Dec 12 '22 01:12

Tom