Unresolved external symbols

I am trying to develop a PVF application that uses Cuda.

I have no problem running the prebuilt example “CUDAFor_Matmul” that
I downloaded from the PGI website. I would like to figure out how to
develop my own PVF/Cuda application from scratch.

I have found the information and instructions for
“Using NVIDIA GPU Accelerators with PGI Visual Fortran”
found on:
https://www.pgroup.com/lit/articles/insider/v2n2a3.htm

I followed all of the instructions (setting up Language and
Debug properties, etc.) and when I build the
application (using the same CUDAFor_Matmul FORTRAN code),
I get 14 unsatisfied externals. Please tell me what I am
doing wrong. Thanks. Here are the first three such errors:

Error 1 unresolved external symbol _cudaSetupArgument@12 referenced in function _MMUL_MOD_MMUL_KERNEL@24 ConsoleApp.obj

Error 2 unresolved external symbol _cudaLaunch@4 referenced in function _MMUL_MOD_MMUL_KERNEL@24 ConsoleApp.obj

Error 3 unresolved external symbol _pgf90_dev_alloc03 referenced in function _MMUL_MOD_MMUL@24 ConsoleApp.obj

Hi Terry,

It may be that you’ve enabled the CUDA Fortran property at the file level rather than the project level. Doing so creates a situation where the flags are used for compilation but not linking.

A note about project vs. file properties. In PVF, project properties are used for all files until a particular file’s property or properties are set individually. Once that’s been done, the property overridden at the file level must continue to be adjusted at the file level for that property for that file. So if you manually change the file’s property to ‘No’ and the project’s property to ‘Yes’, the project property will no longer override the file’s property and the file will be compiled without the flag. This issue is a known limitation in PVF.

Let us know if enabling the CUDA Fortran property at the project level helps or not.

Annemarie