: cudaSafeCall() Runtime API error 2: out of memory.

I get the following error. Does anybody know what is wrong with my installation?

/Developer/GPU Computing/C/bin/darwin/release$ ./bandwidthTest
[bandwidthTest] starting…
./bandwidthTest Starting…

Running on…

Device 0: GeForce 9400M
Quick Mode : cudaSafeCall() Runtime API error 2: out of memory.

Here is my graphics card info and cpu info.

Hardware Overview:

Model Name: MacBook Pro
Model Identifier: MacBookPro5,5
Processor Name: Intel Core 2 Duo
Processor Speed: 2.53 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache: 3 MB
Memory: 8 GB
Bus Speed: 1.07 GHz
Boot ROM Version: MBP55.00AC.B03
SMC Version (system): 1.47f2
Sudden Motion Sensor:
State: Enabled

NVIDIA GeForce 9400M:

Chipset Model: NVIDIA GeForce 9400M
Type: GPU
Bus: PCI
VRAM (Total): 256 MB
Vendor: NVIDIA (0x10de)
Device ID: 0x0863
Revision ID: 0x00b1
ROM Revision: 3427
Color LCD:
Resolution: 1280 x 800
Pixel Depth: 32-Bit Color (ARGB8888)
Mirror: Off
Online: Yes
Built-In: Yes
Resolution: 1920 x 1200 @ 60 Hz
Pixel Depth: 32-Bit Color (ARGB8888)
Main Display: Yes
Mirror: Off
Online: Yes
Rotation: Supported
Adapter Type: Mini DisplayPort To VGA Adapter
Adapter Firmware Version: 1.03

bandwidthTest by default tries to transfer 32MB of data, which might be more than fits on your GPU. Try smaller transfers with an invocation similar to this one, which will test 1MB to 16MB in 1MB increments:

[font=“Courier New”]./bandwidthTest --mode=range --start=1048576 --end=16777216 --increment=1048576[/font]

BTW, the 9400M is an integrated GPU that does not need any host<->device transfers at all. Use mapped memory to avoid the unnecessary copy.

hhm, why are the examples not tuned to use the smallest ammount of data or even better shouldn’t they detect the available amount of RAM like any other application?