OpenACC code targeted at an Nvidia GPU must be compiled with the PGI compiler using at least the following options:
pgcc source_code.c -ta=nvidia -acc
scc1% pgcc -o mycode -acc -Minfo mycode.c
In the above example,
-acc
turns on the OpenACC feature while -Minfo
returns additional information on the compilation.pgi/15.10.0 supports pgCC for c++
Newer pgi/18 doesn't recognize pgCC on Titan
A good read
http://www.drdobbs.com/parallel/creating-and-using-libraries-with-openac/240012502?pgno=2
https://kristerw.blogspot.com/2017/04/building-gcc-with-support-for-nvidia.html
acc benchmark code
https://github.com/EPCCed/epcc-openacc-benchmarks/blob/master/