Thursday, 26 June 2008

GPULIB Trials (and Tribulations)

With active and friendly help from Tech-X Corporation I've been experimenting with GPULIB, an IDL/Matlab/Python ... interface to NVIDIA's CUDA. I was (and still am) hoping to speed up some of the ENVI/IDL extensions for remote sensing image analysis described in my book.

So I've started blogging (at my age!) to document my experiences for anyone who wants to take a similar plunge into the world of "massively parallel computing" on his or her home PC.

Mine is:

Intel Pentium 4 650, 3400 MHz (17 x 200)
Intel Lakeport-G i945G
2048 MB (DDR2 SDRAM)
NVIDIA GeForce 8600 GT (512 MB)

Having gotten a Windows XP build from Tech-X (I evidently don't have the right C++ compiler to do my own builds), I did the following

-Copied GPULIB.DLM and GPULIB.DLL to C:\Programme\ITT\IDL70\bin\bin.x86 (my DLL/DLM Path)

-Placed GPUINIT.PRO in my IDL path

-Downloaded and installed the latest NVIDIA drivers for my graphics card

-Downloaded the CUDA Toolkit version 1.1 for Windows XP 32bit

-Copied the DLLs (including CUDART.DLL) to C:\Programme\ITT\IDL70\bin\bin.x86

-Started IDL 7.0 (with ENVI 4.5)

-Ran the benchmark program BENCH.PRO

Here's what it said:

% Compiled module: BENCH.
0.756607 2.33993 0.196372 0.516154 0.0442747 0.839950
0.756607 2.33993 0.196372 0.516154 0.0442747 0.839950
N iter = 50
CPU Time = 9.2029998
GPU Time = 0.10900021
Speedup = 84.431032 (emphasis added)

Wow! If that isn't exciting I don't know what is. This with a cheap, passively-cooled graphics card!

Of course, what BENCH.PRO actually does is calculate the log gamma function of a 1000000-element array 50 times, something I seldom have occasion to do in my ENVI extensions.

And that's where the story starts. Stay tuned.

1 comments:

Thejll said...

I am glad you started this blog - I am about to try to get IDL to use GPUlib, but have as yet not gotten very far. I have installed everything, but some pixie dust must be missing so there is nothing to show yet. More later!

Cheers,

Peter Thejll
Denmark