Mix OpenACC and cuBLAS

Hello,

My application includes calls to cuBLAS and contains some OpenACC kernels.

I have run into compilation issues using PGI compilers (ver 16.5, 16,7) and CUDA 7.5 on Cray XK7 (Titan) at Oak Ridge National Laboratory.

PGC-F-0249-#error – — !!! UNKNOWN COMPILER: please provide a CUDA compatible definition for ‘align’ !!! — (/opt/nvidia/cudatoolkit7.5/7.5.18-1.0502.10743.2.1/include/host_defines.h: 133)
PGC/x86-64 Linux 16.5-0: compilation aborted

I have seen a related forum topic: https://forums.developer.nvidia.com/t/pgcc-compile-error-in-openacc-cuda-interoperabily-example/133388/1

I would like to understand the current status and any recommended workaround. I need to use PGI compilers for OpenACC support. Can I split cuBLAS and OpenACC portions into separate files but still get interoperability from different compilers?

Thanks,
Sarat.

Hi Sarat,

Can I split cuBLAS and OpenACC portions into separate files but still get interoperability from different compilers?

You can but it’s unnecessary.

We ship several examples on how to mix cuBLAS calls with OpenACC. You can find them in the “$PGI/linux86-64/2016/examples/CUDA-Libraries/cuBLAS” directory. There are examples for C, C++, and Fortran which show how to call cuBLAS from the host using OpenACC to manage data as well as how to call cuBLAS from device code.

Please take a look at these examples. They should get you started.

Hope this helps,
Mat