Why does gpuArray() error out?

What does the error mean?
>> A = gpuArray( rand(1024) );
There is a problem with the graphics driver or with this GPU
device. Be sure that you have a supported GPU and that the latest
driver is installed.
Caused by:
The CUDA driver could not be loaded. The library name used was
'/usr/local/cuda/lib/libcuda.dylib'. The error was:
dlopen(/usr/local/cuda/lib/libcuda.dylib, 10): image not found
>>

2 Kommentare

Jackson Burns
Jackson Burns am 13 Aug. 2019
I would reccomend updating/re-installing your graphics driver to see if that solves the problem.
madhan ravi
madhan ravi am 13 Aug. 2019
Will do that and see if it works, thanks.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Joss Knight
Joss Knight am 13 Aug. 2019

1 Stimme

13 Kommentare

madhan ravi
madhan ravi am 14 Aug. 2019
Indeed thank you for the link Joss, I'm currently on version 10.12.6 , let me try if upgrading to mojave 10.13 works out.
Joss Knight
Joss Knight am 14 Aug. 2019
Crikey, that's the opposite of my point. Upgrading to Mojave (which is 10.14 not 10.13) will prevent you ever using your card for computation in MATLAB. If you are still on Sierra then great, the only issue is downloading a valid driver: https://www.nvidia.com/en-us/drivers/cuda/mac-driver-archive/
You may of course have to upgrade your OS to High Sierra (10.13) if you have a more recent version of MATLAB since it will demand a driver with a certain minimum version.
madhan ravi
madhan ravi am 14 Aug. 2019
Bearbeitet: madhan ravi am 14 Aug. 2019
Oops! So just to be clear , I use 2018b , .
Could you recommend a suitable valid driver from the above link?
Joss Knight
Joss Knight am 14 Aug. 2019
18b is on CUDA 9.2, and there doesn't appear to be a MacOS 10.12-compatible driver that supports CUDA 9.2. You'll need to downgrade MATLAB or upgrade your OS.
madhan ravi
madhan ravi am 15 Aug. 2019
Thank you, Joss. I see in the above link that versions of the drivers are 9.0.197, 9.0.214 9.0.222. so any of the three would suffice , right?
Joss Knight
Joss Knight am 16 Aug. 2019
No, because you have MATLAB R2018b, which requires a driver that supports CUDA 9.2. You can do worse than try every driver and look for one that works. But, as I said, you will probably have to either upgrade your OS to 10.13 or get an earlier version of MATLAB.
The version compatibility issues between MATLAB and MacOS are just an artifact of the restrictions on NVIDIA driver version/MacOS compatibility and affect any application attempting to use the GPU for computation, not just MATLAB.
madhan ravi
madhan ravi am 16 Aug. 2019
Thanks, Joss. Will do as suggested.
madhan ravi
madhan ravi am 17 Aug. 2019
Bearbeitet: madhan ravi am 17 Aug. 2019
I have upgraded to 10.13.6 but with no success. In case if it helps:
MATLAB Version: 9.5.0.944444 (R2018b)
MATLAB License Number: XXXXXXX
Operating System: Mac OS X Version: 10.13.6 Build: 17G65
Java Version: Java 1.8.0_152-b16 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Intel HD Graphics 4000:
Chipset Model: Intel HD Graphics 4000
Type: GPU
Bus: Built-In
VRAM (Dynamic, Max): 1536 MB
Vendor: Intel
Device ID: 0x0166
Revision ID: 0x0009
Metal: Supported, feature set macOS GPUFamily1 v3
Walter Roberson
Walter Roberson am 17 Aug. 2019
? Only NVIDIA GPUs are supported, not even one Intel GPU.
Joss Knight
Joss Knight am 17 Aug. 2019
Yes. Do you not actually have an NVIDIA GPU?
madhan ravi
madhan ravi am 17 Aug. 2019
No, as pasted in the comment above all I have is just Intel HD Graphics 4000. So no way to use GPU in MATLAB?
Walter Roberson
Walter Roberson am 17 Aug. 2019
Note: eGPU on Mac only officially supports some AMD Radeon .
However: Your MacPro mid 2012 13" appears to be model MacBookPro9,2 with 1280 by 800 resolution internal. That model has two USB3.0 connectors, and a Firewire 800 connector, and a Thunderbolt 1 connector. You would therefore not be able to use any of the external GPUs that need Thunderbolt 3 connectors.
I happen to have the very next model up, the mid 2012 15.4 inch, which I took the upgraded display resolution on. It has a GeForce GT 650M as well as HD 4000. However, I effectively do not use that system now; the memory limitations (8 Gb) were getting tiresome, and the hard drive started to whine.
madhan ravi
madhan ravi am 17 Aug. 2019
Thank you , sir Walter.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Get Started with GPU Coder finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2018b

Gefragt:

am 13 Aug. 2019

Kommentiert:

am 17 Aug. 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by