CUDA driver API: Where is nvcuda? - cuda

The CUDA C Programming Guide Version 4.2 states:
The driver API is implemented in the nvcuda dynamic library which is copied on
the system during the installation of the device driver.
I installed the RC5.0 devdriver on my Linux box along with SDK 4.2 and 5.0. Right now I have difficulties finding this library. Its not in (or under) /usr, /lib, /lib64, nor in one of the SDK libs:
CUDA 4.2:
ls /usr/local/cuda-4.2/cuda/lib64/
libcublas.so libcudart.so libcufft.so libcuinj.so libcurand.so libcusparse.so libnpp.so
libcublas.so.4 libcudart.so.4 libcufft.so.4 libcuinj.so.4 libcurand.so.4 libcusparse.so.4 libnpp.so.4
libcublas.so.4.2.9 libcudart.so.4.2.9 libcufft.so.4.2.9 libcuinj.so.4.2.9 libcurand.so.4.2.9 libcusparse.so.4.2.9 libnpp.so.4.2.9
CUDA 5.0:
ls /usr/local/cuda-5.0/cuda/lib64/
libcublas.so libcudart.so libcufft.so libcuinj.so libcurand.so libcusparse.so libnpp.so libnvToolsExt.so
libcublas.so.5.0 libcudart.so.5.0 libcufft.so.5.0 libcuinj.so.5.0 libcurand.so.5.0 libcusparse.so.5.0 libnpp.so.5.0 libnvToolsExt.so.5.0
libcublas.so.5.0.7 libcudart.so.5.0.7 libcufft.so.5.0.7 libcuinj.so.5.0.7 libcurand.so.5.0.7 libcusparse.so.5.0.7 libnpp.so.5.0.7 libnvToolsExt.so.5.0.7
Where is this library installed to?
It's not that the driver API is not included in the RC 5.0. I just reinstalled devdriver 4.2 and its still not in the above mentioned places.

Found it. But under a different name (libcuda instead libnvcuda):
/usr/lib/libcuda.so.295.41
This must be a typo/error in the manual.

libcuda is always by default installed to /usr/lib/ and on 64bit linux /usr/lib64
See also Chapter 5. Listing of Installed Components for list and locations of other driver components.

Related

Unable to get Decoding Capabilities by cuvidGetDecoderCaps CUDA SDK

I have a server with Tesla T4 GPU. I am trying to decode an H264 video on GPU. I am using Cuda SDK to get CUVIDDECODECAPS (decoding capabilities of GPU) but it is returning 0 to MinWidth, MinHeight, MaxWidth, MaxHeight, and false to "bIsSupported". ie. This hardware doesn't support decoding on GPU. But according to this link T4 does support video decoding.
Below is the code snippet.
CUVIDDECODECAPS decodeCaps = {};
decodeCaps.eCodecType = _codec;
decodeCaps.eChromaFormat = _chromaFormat;
decodeCaps.nBitDepthMinus8 = videoFormat.nBitDepthMinus8;
cuSafeCall(cuCtxPushCurrent(ctx_));
cuSafeCall(cuvidGetDecoderCaps(&decodeCaps));
cuSafeCall(cuCtxPopCurrent(NULL));
Below is driver and cuda version
NVIDIA-SMI 440.118.02 Driver Version: 440.118.02 CUDA Version: 10.2 Nvidia Video codec SDK is 11.0.10
Does anyone have any idea what's wrong I am doing here?
Each Nvidia Video SDK has minimal requirements for CUDA SDK and graphics driver version. If you open the SDK web page you will find this info:
NVIDIA Windows display driver 456.71 or newer
NVIDIA Linux display driver 455.28 or newer
DirectX SDK (Windows only) CUDA 11.0 Toolkit
At least on Linux, the related NVENC and NVDEC libraries are part of the driver distribution so the latest SDK headers cannot work with the old libs ( according to your driver version). You can download the older version of the Video SDK if you must use that specific driver.

No "sqlread" in Matlab 2019a Database Toolbox?

Our shop just upgraded to Matlab 2019a, and I'm bumbling around the import of MySQL/MariaDB data (*.frm files). I found myself to the sqlread tutorial. I have yet to fully plumb the machinations behind the database command to set up a connection, but in messing around, I seem to have discovered that I don't have an sqlread function. This is odd, as I have the Database Toolbox:
>> ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.6.0.1072779 (R2019a)
MATLAB License Number: ______
Operating System: Microsoft Windows 7 Enterprise Version 6.1 (Build 7601: Service Pack 1)
Java Version: Java 1.8.0_181-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.6 (R2019a)
Database Toolbox Version 9.1 (R2019a)
<...snip...>
>> help sqlread
--- sqlread not found. Showing help for stlread instead. ---
<...snip...>
>> which database
C:\Program Files\MATLAB\R2019a\toolbox\database\database\database.m
>> which sqlread
'sqlread' not found.
Why would this not be available?
TMW investigated and reported that sqlread becomes available after setting up a data source.
Unfortunately, the next road block that I'm confronting is setting up the data source.
My question about a simpler alternative to import MySQL data into Matlab still stands.
Thanks.

How to Install the CUDA Driver for TensorFlow (installing from source)

I'm trying to build TensorFlow from source and run it with GPU support. To install the toolkit I use the runfile, to install the driver I used the Additional Drivers Tool, since I did not get Ubuntu to boot into Text mode as specified in the CUDA documentation and stop lightdm and start lightdm does not work either, it gives me (also with sudo):
Name com.ubuntu.Upstart does not exist
So far I could build a release from the TensorFlow repository. However, when I'm trying to run the example as specified in the how-to
bazel-bin/tensorflow/cc/tutorials_example_trainer --use_gpu
the GPU apparently cannot be found:
jonas#jonas-Aspire-V5-591G:~/Documents/repos/tensoflow_fork$ bazel-bin/tensorflow/cc/tutorials_example_trainer --use_gpu
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcurand.so locally
E tensorflow/stream_executor/cuda/cuda_driver.cc:491] failed call to cuInit: CUDA_ERROR_UNKNOWN
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:153] retrieving CUDA diagnostic information for host: jonas-Aspire-V5-591G
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:160] hostname: jonas-Aspire-V5-591G
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:185] libcuda reported version is: 352.63.0
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:356] driver version file contents: """NVRM version: NVIDIA UNIX x86_64 Kernel Module 352.63 Sat Nov 7 21:25:42 PST 2015 GCC version: gcc version
4.9.2 (Ubuntu 4.9.2-10ubuntu13) """
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:189] kernel reported version is: 352.63.0
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:293] kernel version seems to match DSO: 352.63.0
I tensorflow/core/common_runtime/gpu/gpu_init.cc:81] No GPU devices available on machine.
F tensorflow/cc/tutorials/example_trainer.cc:125] Check failed: ::tensorflow::Status::OK() == (session->Run({{"x", x}}, {"y:0", "y_normalized:0"}, {}, &outputs)) (OK vs. Invalid argument: Cannot assign a device to node 'y': Could not satisfy explicit device specification '/gpu:0' because no devices matching that specification are registered in this process; available devices: /job:localhost/replica:0/task:0/cpu:0
[[Node: y = MatMul[T=DT_FLOAT, transpose_a=false, transpose_b=false, _device="/gpu:0"](Const, x)]])
Aborted
I'm using a clean Ubuntu 15.04 installation on an Acer Notebook with the GTX950M.
Can anybody tell me how to properly install the driver?
Can you run deviceQuery (comes with cuda installation)? Can you see nvidia present in lspci/lsmod/nvidia-smi?
lsmod |grep nvidia
dmesg | grep -i nvidia
lspci | grep -i nvidia
nvidia-smi
You can reload nvidia module and look for error messages
modprobe -r nvidia
dmesg | tail
sudo dmesg | grep NVRM
Related issue https://github.com/tensorflow/tensorflow/issues/601

CUDA Installation for NVidia Quadro FX 3800

I'm having trouble installing CUDA 7.0 (to use with TensorFlow) on a workstation with the Nvidia Quadro FX 3800. I'm wondering if this is because the GPU is no longer supported.
Installation of the driver (340.96) seems to work fine:
$ sh ./NVIDIA-Linux-x86_64-340.96.run
Installation of the NVIDIA Accelerated Graphics Driver for Linux-x86_64
(version: 340.96) is now complete. Please update your XF86Config or
xorg.conf file as appropriate; see the file
/usr/share/doc/NVIDIA_GLX-1.0/README.txt for details.
However, I think I may be having trouble with the following:
$ ./cuda_7.0.28_linux.run --kernel-source-path=/usr/src/linux-headers-3.13.0-76-generic
The driver installation is unable to locate the kernel source. Please make sure
that the kernel source packages are installed and set up correctly. If you know
that the kernel source packages are installed and set up correctly, you may pass
the location of the kernel source with the '--kernel-source-path' flag.
...
Logfile is /tmp/cuda_install_1357.log
$ vi /tmp/cuda_install_1357.log
WARNING: The NVIDIA Quadro FX 3800 GPU installed in this system is
supported through the NVIDIA 340.xx legacy Linux graphics drivers.
Please visit http://www.nvidia.com/object/unix.html for more
information. The 346.46 NVIDIA Linux graphics driver will ignore
this GPU.
WARNING: You do not appear to have an NVIDIA GPU supported by the 346.46
NVIDIA Linux graphics driver installed in this system. For
further details, please see the appendix SUPPORTED NVIDIA GRAPHICS
CHIPS in the README available on the Linux driver download page at
www.nvidia.com.
...
ERROR: Unable to load the kernel module 'nvidia.ko'. This happens most
frequently when this kernel module was built against the wrong or
improperly configured kernel sources, with a version of gcc that
differs from the one used to build the target kernel, or if a driver
such as rivafb, nvidiafb, or nouveau is present and prevents the
NVIDIA kernel module from obtaining ownership of the NVIDIA graphics
device(s), or no NVIDIA GPU installed in this system is supported by
this NVIDIA Linux graphics driver release.
...
Please see the log entries 'Kernel module load error' and 'Kernel
messages' at the end of the file '/var/log/nvidia-installer.log' for
more information.
Is the installation failure due to CUDA dropping support for this graphics card?
I followed the link trail: https://developer.nvidia.com/cuda-gpus > https://developer.nvidia.com/cuda-legacy-gpus > http://www.nvidia.com/object/product_quadro_fx_3800_us.html and I would have thought the Quadro FX 3800 supported CUDA (at least at the beginning).
Yes, the Quadro FX 3800 GPU is no longer supported by CUDA 7.0 and beyond.
The last CUDA version that supported that GPU was CUDA 6.5.
This answer and this answer may be of interest. Your QFX 3800 is a compute capability 1.3 device.
If you review the release notes that come with CUDA 7, you will find a notice of the elimination of support for these earlier GPUs. Likewise, the newer CUDA driver versions also don't support those GPUs.

CUDA Toolkit 4.1/4.2: nvcc Crashes with an Access Violation

I am developing a CUDA application for GTX 580 with Visual Studio 2010 Professional on Windows 7 64bit. My project builds fine with CUDA Toolkit 4.0, but nvcc crashes when I choose CUDA Toolkit 4.1 or 4.2 with the following error:
1> Stack dump:
1> 0. Running pass 'Promote Constant Global' on module 'moduleOutput'.
1>CUDACOMPILE : nvcc error : 'cicc' died with status 0xC0000005 (ACCESS_VIOLATION)
Strangely enough, the program compiles OK with "compute_10,sm_10" specified for "Code Generation", but "compute_20,sm_20" does not work. The code in question can be downloaded here:
http://www.meriken2ch.com/files/CUDA_SHA-1_Tripper_MERIKENs_Branch_0.04_Alpha_1.zip
(README.txt is in Japanese, but comments in source files are in English.)
I am suspecting a newly introduced bug in CUDA Toolkit 4.1/4.2. Has anybody encountered this issue? Is there any workaround for it? Any kind of help will be much appreciated.
This appears to have been a compiler bug in CUDA 4.x that is fixed in CUDA 5.0 (according to a comment from #meriken2ch, the project builds fine with CUDA 5.0 RC).