matrixMulDrv.cpp undefined references

Hi all. Am currently trying to compile the SDK on RHEL 5.5 64-bit. The test box is an HP Z800 with 2 Tesla C2050 boards in it. Thanks to this forum, I resolved a few library issues that others have had. Currently ran into some undefined references (see below). I think the linker is trying to bring them in but can’t find them. What do you think?

Thanks,
Philippe

make[1]: Entering directory /root/NVIDIA_GPU_Computing_SDK/C/src/matrixMulDrv' obj/x86_64/release/matrixMulDrv.cpp.o: In function initCUDA(int, char**, CUfunc_st**)’:
matrixMulDrv.cpp:(.text+0x326): undefined reference to cuDeviceTotalMem_v2' matrixMulDrv.cpp:(.text+0x6db): undefined reference to cuCtxCreate_v2’
obj/x86_64/release/matrixMulDrv.cpp.o: In function runTest(int, char**)': matrixMulDrv.cpp:(.text+0xc1b): undefined reference to cuMemAlloc_v2’
matrixMulDrv.cpp:(.text+0xc35): undefined reference to cuMemAlloc_v2' matrixMulDrv.cpp:(.text+0xc55): undefined reference to cuMemcpyHtoD_v2’
matrixMulDrv.cpp:(.text+0xc75): undefined reference to cuMemcpyHtoD_v2' matrixMulDrv.cpp:(.text+0xc95): undefined reference to cuMemAlloc_v2’
matrixMulDrv.cpp:(.text+0xe22): undefined reference to cuMemcpyDtoH_v2' matrixMulDrv.cpp:(.text+0xef4): undefined reference to cuMemFree_v2’
matrixMulDrv.cpp:(.text+0xf08): undefined reference to cuMemFree_v2' matrixMulDrv.cpp:(.text+0xf1c): undefined reference to cuMemFree_v2’
collect2: ld returned 1 exit status
make[1]: *** […/…/bin/linux/release/matrixMulDrv] Error 1
make[1]: Leaving directory `/root/NVIDIA_GPU_Computing_SDK/C/src/matrixMulDrv’
make: *** [src/matrixMulDrv/Makefile.ph_build] Error 2

I wonder if its because I’m trying to compile with 64-bit libraries? Did a “make clean” and aliased CC to “gcc -m64”, but still get same errors.

I wonder if its because I’m trying to compile with 64-bit libraries? Did a “make clean” and aliased CC to “gcc -m64”, but still get same errors.

I wonder if its because I’m trying to compile with 64-bit libraries? Did a “make clean” and aliased CC to “gcc -m64”, but still get same errors. Am using gcc 4.1.2 if that helps. Its the standard rpm that comes with RHEL 5.5 distro. Sorry for the double post (didn’t hit back button quick enough).

I wonder if its because I’m trying to compile with 64-bit libraries? Did a “make clean” and aliased CC to “gcc -m64”, but still get same errors. Am using gcc 4.1.2 if that helps. Its the standard rpm that comes with RHEL 5.5 distro. Sorry for the double post (didn’t hit back button quick enough).

HI Philippe,

I’ve got the same problem. Did you figure it out?

ahination

HI Philippe,

I’ve got the same problem. Did you figure it out?

ahination

I had the same problem. It turned out that the version of cuda and the nvidia driver didn’t match up.

I have the linux driver 195.36.15 on my system and have no administrator rights to update it.

With cuda toolkit 3.2 I got the same error as you. Now I installed cuda toolkit 3.0 (which corresponds to the nvidia driver I have) and now everything compiles as it should.

I had the same problem. It turned out that the version of cuda and the nvidia driver didn’t match up.

I have the linux driver 195.36.15 on my system and have no administrator rights to update it.

With cuda toolkit 3.2 I got the same error as you. Now I installed cuda toolkit 3.0 (which corresponds to the nvidia driver I have) and now everything compiles as it should.

Hi, :teehee:

I have the same problem. Where can I download the cuda toolkit 3.0? I search everywhere but seems that is not available.

(Guess what I just found cuda toolkit 3.0, under http://developer.nvidia.com/object/cuda_archive.html )

Final question, :rolleyes: after doing lspci | grep -i nvidia, I got the following. How to tell the compiler to work only with tesla S1070? or it will randomly choose the available or suitable one for my program.

[p3nis@cluster]$ lspci | grep -i nvidia

04:00.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

05:00.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

05:01.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

05:02.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

05:03.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

07:00.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

08:00.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

08:01.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

08:02.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

08:03.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

0a:00.0 3D controller: nVidia Corporation GT200 [Tesla C1060] (rev a1)

0c:00.0 3D controller: nVidia Corporation GT200 [Tesla C1060] (rev a1)

Hi, :teehee:

I have the same problem. Where can I download the cuda toolkit 3.0? I search everywhere but seems that is not available.

(Guess what I just found cuda toolkit 3.0, under http://developer.nvidia.com/object/cuda_archive.html )

Final question, :rolleyes: after doing lspci | grep -i nvidia, I got the following. How to tell the compiler to work only with tesla S1070? or it will randomly choose the available or suitable one for my program.

[p3nis@cluster]$ lspci | grep -i nvidia

04:00.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

05:00.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

05:01.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

05:02.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

05:03.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

07:00.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

08:00.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

08:01.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

08:02.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

08:03.0 PCI bridge: nVidia Corporation PCI express bridge for Quadro Plex S4 / Tesla S870 / Tesla S1070 (rev a3)

0a:00.0 3D controller: nVidia Corporation GT200 [Tesla C1060] (rev a1)

0c:00.0 3D controller: nVidia Corporation GT200 [Tesla C1060] (rev a1)

I got this error, any suggestions?

matrixMulDrv.cpp:272: error: cannot convert ‘size_t’ to ‘unsigned int’ for argument ‘1’ to ‘CUresult cuDeviceTotalMem(unsigned int*, CUdevice)’

make[1]: *** [obj/x86_64/release/matrixMulDrv.cpp.o] Error 1

make[1]: Leaving directory `/home/pacl/NVIDIA_GPU_Computing_SDK/C/src/matrixMulDrv’

make: *** [src/matrixMulDrv/Makefile.ph_build] Error 2

I got this error, any suggestions?

matrixMulDrv.cpp:272: error: cannot convert ‘size_t’ to ‘unsigned int’ for argument ‘1’ to ‘CUresult cuDeviceTotalMem(unsigned int*, CUdevice)’

make[1]: *** [obj/x86_64/release/matrixMulDrv.cpp.o] Error 1

make[1]: Leaving directory `/home/pacl/NVIDIA_GPU_Computing_SDK/C/src/matrixMulDrv’

make: *** [src/matrixMulDrv/Makefile.ph_build] Error 2