Compiling fortran project using PVF 13.9 and Cuda CC5.5

Hi all,

I have this strange problem when I compile using PVF 13.9 and cuda CC 5.5, which does not occur on same PVF compiler and cuda CC 5.0.
FYI I am using Windows 8 with VS 2010.
compiler flags:

-Mpreprocess -D_DEBUG -U_DEBUG -Bstatic -Mbackslash -Mextend -Mcuda=cuda5.5,cc30 -I"C:\Program Files\PGI\win64\13.9\bin" -I"c:\program files\pgi\win64\13.9\include" -I"C:\Program Files\PGI\Microsoft Open Tools 11\include" -I"C:\Program Files (x86)\Windows Kits\8.0\Include\shared" -I"C:\Program Files (x86)\Windows Kits\8.0\Include\um" -fastsse -ta=nvidia,wait,cuda5.5,cc30 -Minform=warn

here are the errors I get when I reach linking stage when compiling:

Compiling Project …
common.f90
kernels.f90
flow.f90
force.f90
geometry.f90
grid.f90
Humidity.f90
init.f90
inverse.f90
misc.f90
mult.f90
OptionalParams.f90
output.f90
Quick5.f90
reynolds.f90
string.f90
UserDefGeom.f90
util.f90
Linking…
common.obj : error LNK2019: unresolved external symbol __cudaRegisterFatBinary referenced in function Q4_GLOBALSDEV
kernels.obj : error LNK2001: unresolved external symbol __cudaRegisterFatBinary
libcudafor4.lib(pgi_memset.obj) : error LNK2001: unresolved external symbol __cudaRegisterFatBinary
common.obj : error LNK2019: unresolved external symbol __cudaRegisterVar referenced in function Q4_GLOBALSDEV
kernels.obj : error LNK2001: unresolved external symbol __cudaRegisterVar
common.obj : error LNK2019: unresolved external symbol __cudaUnregisterFatBinary referenced in function Q4_GLOBALSDEV
kernels.obj : error LNK2001: unresolved external symbol cudaUnregisterFatBinary
libcudafor4.lib(pgi_memset.obj) : error LNK2001: unresolved external symbol cudaUnregisterFatBinary
kernels.obj : error LNK2019: unresolved external symbol cudaGetSymbolAddress referenced in function kernels_setupinitialnestingxy_kernel

libcudafor4.lib(dev_memops.obj) : error LNK2001: unresolved external symbol cudaGetSymbolAddress
kernels.obj : error LNK2019: unresolved external symbol cudaMemcpyToSymbol referenced in function kernels_setupinitialnestingxy_kernel

libcudafor4.lib(dev_allo.obj) : error LNK2001: unresolved external symbol cudaMemcpyToSymbol
libcudafor4.lib(dev_memops.obj) : error LNK2001: unresolved external symbol cudaMemcpyToSymbol
kernels.obj : error LNK2019: unresolved external symbol cudaSetupArgument referenced in function kernels_setupinitialnestingxy_kernel

libcudafor4.lib(pgi_memset.obj) : error LNK2001: unresolved external symbol cudaSetupArgument
kernels.obj : error LNK2019: unresolved external symbol cudaLaunch referenced in function kernels_setupinitialnestingxy_kernel

libcudafor4.lib(pgi_memset.obj) : error LNK2001: unresolved external symbol cudaLaunch
kernels.obj : error LNK2019: unresolved external symbol _cudaRegisterFunction referenced in function kernels_checkcrash2_kernel
libcudafor4.lib(pgi_memset.obj) : error LNK2001: unresolved external symbol __cudaRegisterFunction
libcudafor4.lib(dev_allo.obj) : error LNK2019: unresolved external symbol cudaMalloc referenced in function __dev_alloc
libcudafor4.lib(dev_allo.obj) : error LNK2019: unresolved external symbol cudaGetErrorString referenced in function __dev_alloc
libcudafor4.lib(dev_memops.obj) : error LNK2001: unresolved external symbol cudaGetErrorString
libcudafor4.lib(dev_configure.obj) : error LNK2001: unresolved external symbol cudaGetErrorString
libcudafor4.lib(cudaerror.obj) : error LNK2001: unresolved external symbol cudaGetErrorString
libcudafor4.lib(dev_allo.obj) : error LNK2019: unresolved external symbol cudaMemcpy referenced in function pgf90_dev_mkdesc
libcudafor4.lib(dev_memops.obj) : error LNK2001: unresolved external symbol cudaMemcpy
libcudafor4.lib(dev_allo.obj) : error LNK2019: unresolved external symbol cudaFree referenced in function dev_dealloc
libcudafor4.lib(dev_allo.obj) : error LNK2019: unresolved external symbol cudaMallocHost referenced in function pgf90_dev_chksect
libcudafor4.lib(dev_allo.obj) : error LNK2019: unresolved external symbol cudaGetDevice referenced in function pinned_dealloc
libcudafor4.lib(cudadevicemngmt.obj) : error LNK2001: unresolved external symbol cudaGetDevice
libcudafor4.lib(dev_allo.obj) : error LNK2019: unresolved external symbol cudaPointerGetAttributes referenced in function pinned_dealloc
libcudafor4.lib(cuda4.obj) : error LNK2001: unresolved external symbol cudaPointerGetAttributes
libcudafor4.lib(dev_allo.obj) : error LNK2019: unresolved external symbol cudaSetDevice referenced in function pinned_dealloc
libcudafor4.lib(cudadevicemngmt.obj) : error LNK2001: unresolved external symbol cudaSetDevice
libcudafor4.lib(dev_allo.obj) : error LNK2019: unresolved external symbol cudaFreeHost referenced in function pinned_dealloc
libcudafor4.lib(dev_allo.obj) : error LNK2019: unresolved external symbol cudaUnbindTexture referenced in function pgf90_dev_unbind_texture
libcudafor4.lib(dev_allo.obj) : error LNK2019: unresolved external symbol cudaCreateChannelDesc referenced in function pgf90_dev_bind_texture
libcudafor4.lib(dev_memops.obj) : error LNK2001: unresolved external symbol cudaCreateChannelDesc
libcudafor4.lib(dev_allo.obj) : error LNK2019: unresolved external symbol cudaBindTexture referenced in function pgf90_dev_bind_texture
libcudafor4.lib(dev_memops.obj) : error LNK2019: unresolved external symbol cudaMemcpyAsync referenced in function pgf90_dev_copyin_async
libcudafor4.lib(dev_memops.obj) : error LNK2019: unresolved external symbol cudaMemcpyFromSymbol referenced in function pgf90_dev_symhandle_copyout
libcudafor4.lib(dev_memops.obj) : error LNK2019: unresolved external symbol cudaConfigureCall referenced in function pgf90_dev_memset16v
libcudafor4.lib(dev_configure.obj) : error LNK2001: unresolved external symbol cudaConfigureCall
libcudafor4.lib(dev_memops.obj) : error LNK2019: unresolved external symbol cudaMemcpy2D referenced in function pgf90_dev_copyin_2d
libcudafor4.lib(dev_memops.obj) : error LNK2019: unresolved external symbol cudaMemset3D referenced in function pgf90_dev_memset_3d
libcudafor4.lib(dev_memops.obj) : error LNK2019: unresolved external symbol cudaMemcpy3D referenced in function pgf90_dev_memcpy_3d
libcudafor4.lib(dev_memops.obj) : error LNK2019: unresolved external symbol cudaMemcpy3DAsync referenced in function pgf90_dev_memcpy_3d_async
libcudafor4.lib(dev_memops.obj) : error LNK2019: unresolved external symbol cudaRuntimeGetVersion referenced in function pgf90_get_cuda_runtime_version
libcudafor4.lib(dev_memops.obj) : error LNK2019: unresolved external symbol cudaDriverGetVersion referenced in function pgf90_cudadrivergetversion
libcudafor4.lib(dev_memops.obj) : error LNK2019: unresolved external symbol cudaMemGetInfo referenced in function pgf90_cudamemgetinfo
libcudafor4.lib(cudaerrorhandling.obj) : error LNK2019: unresolved external symbol cudaGetLastError referenced in function cudagetlasterror

libcudafor4.lib(cudaerrorhandling.obj) : error LNK2019: unresolved external symbol cudaThreadSynchronize referenced in function cudathreadsynchronize

libcudafor4.lib(cudaerrorhandling.obj) : error LNK2019: unresolved external symbol cudaThreadExit referenced in function cudathreadexit

libcudafor4.lib(cudaerrorhandling.obj) : error LNK2019: unresolved external symbol cudaPeekAtLastError referenced in function cudapeekatlasterror

libcudafor4.lib(cudadevicemngmt.obj) : error LNK2019: unresolved external symbol cudaChooseDevice referenced in function cudachoosedevice

libcudafor4.lib(cudadevicemngmt.obj) : error LNK2019: unresolved external symbol cudaGetDeviceCount referenced in function cudagetdevicecount

libcudafor4.lib(cudadevicemngmt.obj) : error LNK2019: unresolved external symbol cudaGetDeviceProperties referenced in function cudagetdeviceproperties

libcudafor4.lib(cudadevicemngmt.obj) : error LNK2019: unresolved external symbol cudaSetDeviceFlags referenced in function cudasetdeviceflags

libcudafor4.lib(cudadevicemngmt.obj) : error LNK2019: unresolved external symbol cudaFuncSetCacheConfig referenced in function cudafuncsetcacheconfig

libcudafor4.lib(cudadevicemngmt.obj) : error LNK2019: unresolved external symbol cudaFuncGetAttributes referenced in function cudafuncgetattributes

libcudafor4.lib(cudadevicemngmt.obj) : error LNK2019: unresolved external symbol cudaSetDoubleForDevice referenced in function cudasetdoublefordevice

libcudafor4.lib(cudadevicemngmt.obj) : error LNK2019: unresolved external symbol cudaSetDoubleForHost referenced in function cudasetdoubleforhost

libcudafor4.lib(cuda4.obj) : error LNK2019: unresolved external symbol cudaDeviceGetCacheConfig referenced in function cudadevicegetcacheconfig

libcudafor4.lib(cuda4.obj) : error LNK2019: unresolved external symbol cudaDeviceSetCacheConfig referenced in function cudadevicesetcacheconfig

libcudafor4.lib(cuda4.obj) : error LNK2019: unresolved external symbol cudaDeviceGetLimit referenced in function cudadevicegetlimit

libcudafor4.lib(cuda4.obj) : error LNK2019: unresolved external symbol cudaDeviceSetLimit referenced in function cudadevicesetlimit

libcudafor4.lib(cuda4.obj) : error LNK2019: unresolved external symbol cudaDeviceReset referenced in function cudadevicereset

libcudafor4.lib(cuda4.obj) : error LNK2019: unresolved external symbol cudaDeviceSynchronize referenced in function cudadevicesynchronize

libcudafor4.lib(cuda4.obj) : error LNK2019: unresolved external symbol cudaSetValidDevices referenced in function cudasetvaliddevices

libcudafor4.lib(cuda4.obj) : error LNK2019: unresolved external symbol cudaHostGetFlags referenced in function cudahostgetflags

libcudafor4.lib(cuda4.obj) : error LNK2019: unresolved external symbol cudaHostRegister referenced in function cudahostregister

libcudafor4.lib(cuda4.obj) : error LNK2019: unresolved external symbol cudaHostUnregister referenced in function cudahostunregister

C:\D Drive\CML codes\Quick 5\x64\Release\Quick5.exe : fatal error LNK1120: 52 unresolved externals
Quick_cuda build failed.
Build log was saved at “file://C:\D Drive\CML codes\Quick 5\x64\Release\BuildLog.htm”

========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

please advice what I am missing.

Dolf

Hi Dolf,

This is a known issue (TPR#19641) in 13.9 which occurs when “-Mcuda” is combined with both OpenACC (-acc / -ta) and CUDA 5.5. The problem was fixed in 13.10. So unfortunately you will need to either upgrade or not use CUDA 5.5.

  • Mat

Thanks Mat, I am in the process of downloading PVF 13.10

Dolf

Correct! I am able to compile cuda CC5.5 with PVF 13.10.

Thanks again Mat for your rapid response.

Dolf