GPU programming has been seeing increased attention recently for research computing applications—check out a recent Ars Technica article talking about this.
I’ve started looking into this for combustion-modeling applications, and to get started I wanted to install NVIDIA’s CUDA toolkit (C-based programming language and drivers to enable computing on GPUs) on my personal MacBook Pro. The baseline MacBook Pros come with an NVIDIA GeForce 320M GPU, and according to the CUDA website this is not a CUDA-supported GPU… however, I found that with not too much work it actually is supported!
Here are the steps I followed:
- Download CUDA version 3.2 drivers, toolkit (& GFEC patch), SDK, from here
- Install the drivers
- Install the toolkit
- Install the SDK
- Ensure that your current gcc version is the Apple 4.2 (through
sudo gcc_selectif you’ve installed any others through MacPorts, for instance)
- Add the following lines to your bash profile (.bashrc, .profile, etc):
- Open Terminal
cd /Developer/GPU Computing/C
make x86_64=1(this will compile everything, and should proceed without error, just some notification messages)
- Now to check that everything is working,
- Then execute
./deviceQueryto have it check your system
- Now play around with some of the demos in that directory! There are some neat ones (including some fluids simulations)
According to deviceQuery, my MacBook Pro has a CUDA capability version 1.2, and a total of 48 cores (6 processors x 8 cores each).