All Projects → jefflarkin → openacc-interoperability

jefflarkin / openacc-interoperability

Licence: BSD-3-Clause License
Interoperability examples for OpenACC.

Programming Languages

c
50402 projects - #5 most used programming language
Cuda
1817 projects
Makefile
30231 projects
fortran
972 projects
C++
36643 projects - #6 most used programming language

Stupid OpenACC (Interoperability) Tricks

Author: Jeff Larkin [email protected]

This repository demonstrates interoperability between OpenACC and various other GPU programming models. An OpenACC-enabled compiler is required. The default makefile has been written for PGI and tested with PGI 20.9, although most if not all examples will work with earlier versions.

If building with the Cray Compiler Environment the makefile will detect this and adjust compiler flags and targets accordingly. Some targets rely on PGI CUDA Fortran features, these targets will be disabled when building with CCE.

Build Instructions:

$ make

Examples

  • cuda_main - calling OpenACC from CUDA C
  • openacc_c_main - Calling CUDA from OpenACC in C
  • openacc_c_cublas - Calling CUBLAS from OpenACC in C
  • thrust - Mixing OpenACC and Thrust in C++
  • cuda_map - Using OpenACC acc_map_data with CUDA in C
  • cuf_main - Calling OpenACC from CUDA Fortran
  • cuf_openacc_main - Calling CUDA Fortran from OpenACC
  • openacc_cublas - Calling CUBLAS from OpenACC in CUDA Fortran
  • acc_malloc - Same as cuda_main, but using the OpenACC API
  • openacc_streams - Mixes OpenACC async queues and CUDA streams
  • openacc_cuda_device - Calls a CUDA __device__ kernel within an OpenACC region
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].