CUDA missing library libcuda.so.1
Show older comments
Hi, im trying to use GPU but when i try to run some command a get this error:
Error using gpuDevice (line 26)
There is a problem with the CUDA driver associated with this GPU device. See
www.mathworks.com/gpudriver to find and install the latest supported driver.
Caused by:
The CUDA driver could not be loaded. The library name used was: libcuda.so.1. The error was:
libcuda.so.1: cannot open shared object file: No such file or directory.
My Matlab client is on server called "mdcstest" and the GPU on another called "comp01", im using Matlab Job Scheduler. Normal task, matlabpool is running without problem. On "comp01" i have cuda 5.0.
What i need to do, to use the GPU on "comp01" ?
Thanks.
8 Comments
Thomas Ibbotson
on 20 Nov 2012
Can you show the code you were trying to run when you got this error? Specifically what commands were you using on 'mdcstest' to run the code on 'comp01', did you use 'batch' or a script with 'spmd' or did you create your own jobs and tasks?
Ivan
on 21 Nov 2012
Thomas Ibbotson
on 21 Nov 2012
If you are running that code from the command line on "mdcstest" then it will run on "mdcstest" not "comp01". When you ran 'batch', what profile were you using? You need to make sure that your profile for MJS is set as the default, otherwise the code will run using the local scheduler, and will again fail as it will be running on "mdcstest" not "comp01".
Ivan
on 21 Nov 2012
Thomas Ibbotson
on 21 Nov 2012
Ok, just to double check that the code is running on the correct machine can you run:
mjs = parcluster
mjs.matlabpool
spmd, gpuDevice, end
matlabpool close
and paste the results here?
Ivan
on 22 Nov 2012
Ben Tordoff
on 24 Dec 2012
If you didn't put the gpuDevice call inside SPMD then it will run on your client machine (which presumably does not have a GPU or the CUDA drivers). Putting it inside SPMD causes it to run on the worker(s). Equally, trying to use the GPU inside a PARFOR or from within a task function would probably have worked fine as that also happens on the worker.
I believe Thomas's answer below is the correct one.
rahul srivastava
on 14 May 2014
in my case this error is shown ..nd when i use gpudevice count it is showing 0.please solve my problem > mjs = parcluster mjs.matlabpool spmd, gpuDevice, end matlabpool close
mjs =
Local Cluster Information
=========================
Profile: local
Modified: false
Host: robo-PC
NumWorkers: 2
JobStorageLocation: C:\Users\robo\AppData\Roaming\MathWorks\MATLAB\local_cluster_jobs\R2012b
ClusterMatlabRoot: C:\Program Files\MATLAB\R2012b
OperatingSystem: windows
RequiresMathWorksHostedLicensing: false
- Assigned Jobs
Number Pending: 0
Number Queued: 1
Number Running: 1
Number Finished: 0
Error using parallel.Cluster/matlabpool (line 64) Failed to open matlabpool. (For information in addition to the causing error, validate the profile 'local' in the Cluster Profile Manager.)
Caused by: Error using distcomp.interactiveclient/start (line 11) Found an interactive session. You cannot have multiple interactive sessions open simultaneously. To terminate the existing session, use 'matlabpool close'.
>>
Answers (2)
Jason Ross
on 19 Nov 2012
Edited: Jason Ross
on 19 Nov 2012
It sounds like the GPU driver is not installed correctly on comp01. Perhaps you installed the SDK and toolkit and not the driver?
nVidia ships a utility called "nvidia-smi" (by default, in /usr/bin) that will list all the installed GPUs in a system. I'm betting you'll get the same error at the command line as you do in MATLAB if you run nvidia-smi. If things are working properly, you should see something like the following:
% nvidia-smi
Mon Nov 19 15:33:41 2012
+------------------------------------------------------+
| NVIDIA-SMI 4.304.54 Driver Version: 304.54 |
|-------------------------------+----------------------+----------------------+
| GPU Name | Bus-Id Disp. | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Quadro FX 370 | 0000:01:00.0 N/A | N/A |
| 60% 60C N/A N/A / N/A | 4% 11MB / 255MB | N/A Default |
+-------------------------------+----------------------+----------------------+
| 1 Tesla C1060 | 0000:08:00.0 Off | N/A |
| 35% 56C P8 N/A / N/A | 0% 3MB / 4095MB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Compute processes: GPU Memory |
| GPU PID Process name Usage |
|=============================================================================|
| 0 Not Supported |
+-----------------------------------------------------------------------------+
3 Comments
Ivan
on 20 Nov 2012
Edric Ellis
on 22 Nov 2012
As you can see, that nvidia-smi output shows that MATLAB is already accessing the GPU. Perhaps the device is in exclusive mode? (Can I also just confirm that you ran this command on the cluster node "comp01"). If you run
nvidia-smi -q
You should be able to see what compute mode the device is in.
Ivan
on 22 Nov 2012
Thomas Ibbotson
on 23 Nov 2012
When you open a matlabpool and use 'spmd', the code in that block is run on all the workers in the pool. As your workers are running on 'comp01', which has the GPU, this means that the GPU code will be able to run. Without the 'spmd' any code you run will run on your local machine (in your case this did not have the GPU driver and a supported GPU and it failed.)
Note that spmd is not the only way to run code on the cluster, you can also use the 'batch' function. In this case you give 'batch' the name of a script you want to run, and that will run on one of the workers on the cluster. For example:
mjs = parcluster;
job = mjs.batch('myScript');
wait(job);
load(job);
Where 'myScript' has the code you want to run on the GPU on 'comp01'.
For more information about 'batch' see the batch processing documentation, and for 'spmd' see the spmd documentation.
Categories
Find more on Manage MATLAB Job Scheduler Processes in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!