valgrind seems to be showing a lot of errors with driver

When I run my opencl program through valgrind for leak checks, valgrind throws a lot of errors. Apparently there seems to be a lot of leaks inside the compiler and the the nvidia driver. Are others getting these errors too with valgrind?

The driver version is 190.29

How does it work with 195.xx drivers?

Is this the linux 195.xx driver? http://www.nvidia.com/object/linux_display_ia32_190.53.html

No mention of OpenCL support in the above driver. The 195.62 supports OpenCL but they are available only for windows unfortunately. I think for linux the last OpencL driver was 190.29?!

Couldn’t find a 195 driver for linux. The last available driver for linux is 190.53 and that apparently doesn’t support OpenCL(installed and I couldn’t find libOpenCL installed). I think the last OpenCL driver for linux would be 190.29.

The 195 drivers for Linux are still in Beta. I think this is still the most recent IA32 195 driver for Linux. I am not sure whether it includes OpenCL support or not.

Got the beta driver 195.30. The .30 release notes doesn’t specify OpenCL, but the OpenCL libraries seem to be installed. I compiled a sample code of mine, which I had previously run with my 190.29 dirver, but it doesn’t work with 195.30. When I run the program, I fail to get a context with clCreateContextFromType().

One thing that might have changed with these drivers is that you cannot create a context specifying NULL as platform id any more. You need to query for available platforms and pass a valid platform id obtained from that query. This is the proper behavior, as defined by the standard. Prior implementations have made a shortcut there, allowing passing NULL for “default platform” *.

  • actually, the standard says

But imagine what would happen if you had two runtimes installed and both decided that their platform is the one that gets selected when there are no properties passed. That’s why both NVIDIA in AMD changed this in their non-beta implementations. From the release notes:

Right, that makes sense. Apparently I was supplying NULL, since I let the implementation handle the selection of the platform and the device. Specifying the platform in the property, and my samples are working fine. Thanks Big_Mac

By the way I missed the release of 195.22 and 195.30 for linux. And it isn’t available in the registered developer section too. I guess I must have missed it in their weekly mail or so.

Coming back to the original question, I still see all the leaks even in 195.30. The leaks are inside the opencl library, the compiler, and the cuda library.

I can confirm the leaks with the 190.29 driver.

Hi,

Is this still case with with CUDA Toolkit 3.2? I am trying to find out what valgrind errors/warnings I have / I should fix and which not.

==1209== Conditional jump or move depends on uninitialised value(s)

==1209==    at 0x68DFE40: inflateReset2 (in /lib/libz.so.1.2.3.4)

==1209==    by 0x68DFF2F: inflateInit2_ (in /lib/libz.so.1.2.3.4)

==1209==    by 0x68DA1BC: ??? (in /lib/libz.so.1.2.3.4)

==1209==    by 0x6115AE8: ??? (in /usr/lib/libcuda.so.260.19.21)

==1209==    by 0x6115C78: ??? (in /usr/lib/libcuda.so.260.19.21)

==1209==    by 0x61142F6: ??? (in /usr/lib/libcuda.so.260.19.21)

==1209==    by 0x60803D3: ??? (in /usr/lib/libcuda.so.260.19.21)

==1209==    by 0x5F10709: ??? (in /usr/lib/libcuda.so.260.19.21)

==1209==    by 0x5F2E569: ??? (in /usr/lib/libcuda.so.260.19.21)

==1209==    by 0x5EF8C95: ??? (in /usr/lib/libcuda.so.260.19.21)

==1209==    by 0x5F983C9: ??? (in /usr/lib/libcuda.so.260.19.21)

==1209==    by 0x5F97B1C: ??? (in /usr/lib/libcuda.so.260.19.21)

==1209== 

==1209== Use of uninitialised value of size 8

==1209==    at 0x539FA40: profil_counter (profil.c:42)

==1209==    by 0x52E9C1F: ??? (in /lib/libc-2.12.1.so)

==1209==    by 0x95C03BF: ??? (in /usr/lib/libnvidia-compiler.so.260.19.21)

==1209==    by 0x9651A5F: ??? (in /usr/lib/libnvidia-compiler.so.260.19.21)

==1209==    by 0x9651B07: ??? (in /usr/lib/libnvidia-compiler.so.260.19.21)

==1209==    by 0x9651B9E: ??? (in /usr/lib/libnvidia-compiler.so.260.19.21)

==1209==    by 0x9652F86: ??? (in /usr/lib/libnvidia-compiler.so.260.19.21)

==1209==    by 0x965398A: ??? (in /usr/lib/libnvidia-compiler.so.260.19.21)

==1209==    by 0x95BF536: ??? (in /usr/lib/libnvidia-compiler.so.260.19.21)

==1209==    by 0x974EAFB: ??? (in /usr/lib/libnvidia-compiler.so.260.19.21)

==1209==    by 0x974F0D6: ??? (in /usr/lib/libnvidia-compiler.so.260.19.21)

==1209==    by 0x974F28B: ??? (in /usr/lib/libnvidia-compiler.so.260.19.21)

==1209== 

==1209== Invalid read of size 1

==1209==    at 0x4C299A2: memcpy (mc_replace_strmem.c:497)

==1209==    by 0x5F9C436: ??? (in /usr/lib/libcuda.so.260.19.21)

==1209==    by 0x406503: train (train.c:1159)

==1209==    by 0x407CCB: trainBatch (train.c:1425)

==1209==    by 0x40850B: autoTrain (train.c:1511)

==1209==    by 0x40A4A0: dataset (train.c:1960)

==1209==    by 0x40AC5D: main (train.c:2095)

==1209==  Address 0x7969730 is 0 bytes after a block of size 80 alloc'd

==1209==    at 0x4C2815C: malloc (vg_replace_malloc.c:236)

==1209==    by 0x401F15: set_new (train.c:348)

==1209==    by 0x407A5F: trainBatch (train.c:1410)

==1209==    by 0x40850B: autoTrain (train.c:1511)

==1209==    by 0x40A4A0: dataset (train.c:1960)

==1209==    by 0x40AC5D: main (train.c:2095)

.....