- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am running Intel Fortran Compiler 10.1.025 with Visual Studio 2005 under Vista. I was unable to integrate CUDA in fortran because I get following errors when building simple test.f file:
Linking...
Link: executing 'link'
test.obj : error LNK2019: unresolved external symbol _CUINIT referenced in function _MAIN__
test.obj : error LNK2019: unresolved external symbol _CUDEVICEGETCOUNT referenced in function _MAIN__
test.obj : error LNK2019: unresolved external symbol _CUDEVICEGET referenced in function _MAIN__
test.obj : error LNK2019: unresolved external symbol _CUDEVICEGETNAME referenced in function _MAIN__
Debug\GASS_EXAMPLE1.exe : fatal error LNK1120: 4 unresolved externals
Mentioned test.f file that calls CUDA functions is as follows:
program cuda_fortran_test
integer dev
character*256 n
print *,'Existing CUDA devices:'
call cuInit(0)
idevices = 0
call cuDeviceGetCount(idevices)
do i=1,idevices
call cuDeviceGet(dev, i-1)
call cuDeviceGetName(n, 256, dev)
print *,'Device ',i-1,': ',n
enddo
end
I have set environment var. PATH (in Windows Vista) to CUDAs bin, lin i
inc properly.
I also put cuda.lib in
C:\Program Files\Intel\Compiler\Fortran\10.1.025\IA32\Lib
folder.
I was unabel to integrate cuda.lib in Visual Studio Fortran properly I guess.
Maybe someone can help how to compile and build fortran program that calls cuda funcitions.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am not familiar with the CUDA API but I'd expect that the routine names are mixed-case and Intel Fortran makes all names uppercase by default. My advice is to create a module with interface blocks for the CUDA routines using BIND(C,NAME="CudaRoutineName").

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page