I’d like to mix OpenACC with CUDA Fortran code. My build system currently only has one set of flags for GPU compilation, so I tried to have a compiler call for both modes. Therefore I tried the following:
pgf90 -acc -Mcuda -ta=nvidia,cc3x -fast -c my_source.F90 -o my_source.o
Here’s what happens: With CUDA-only files and non accelerated files it works. As soon as I try it with a file that (only) has OpenACC kernels implemented, it prints usage information for ‘fatbinary’, so
Usage : fatbinary [options]
Options
=======
--32 (-32)
Specify that this was a 32bit compile.
--64 (-64)
Specify that this was a 64bit compile.
....
Linking then fails with “nvlink fatal : Could not find fatbin in ‘my_source.o’”.
It seems to me I’ve stumbled upon a bug where PGI Accelerator calls ‘fatbinary’ with some wrong arguments.
My question: Is there already a supported way to have both CUDA and OpenACC enabled in the compiler?[/code]