using GpuLib in IDL [message #60761] |
Thu, 05 June 2008 08:38 |
wita
Messages: 43 Registered: January 2005
|
Member |
|
|
Dear all,
After Davids report on the Numerical Analysis Techniques Session, I
have been trying to get the GpuLib from TechX working on linux (Fedora
6). I post my findings here, maybe they are useful to others.
1. First of all you may want to check if your NVIDIA GPU is supported
(http://www.nvidia.com/object/cuda_learn_products.html), in the end I
found out mine wasn't ;-(.
2. Install the CUDA library from http://www.nvidia.com/object/cuda_get.html,
I used the CUDA Toolkit version 1.1 for Fedora 7. Add '/usr/local/cuda/
bin' to your shell path and '/usr/local/cuda/lib' to your ldconfig
path.
3. Untar the gpulib package. You will end up with folder
'gpulib-0.3p1' with a couple of folders in there related to MatLab,
IDL, Python and some library routines. There is also a folder 'doc'
which contains the install-notes. Please ignore these, Peter Messner
from TechX told me they are a leftover from another project. Instead
relevant installation details are in the 'IDL/doc' folder
4. Run the configure script in the gpulib root folder, then run the
make command. In my case the make failed at the following statement
because of some dependencies to OpenGL:
g++ -fPIC -shared -Bsymbolic --warn-once -o gpulib.so gpulib.o ./../
vectorOp/gpuVectorOp.o ./../vectorOp/gpuMT.o ./../physicsOp/
gpuPhysicsOp.o -L/usr/local/cuda/lib -lcudart -lcublas -lcufft -lGL -
lGLU
According to Peter Messner the dependency on OpenGL wasn't necessary,
therefore I run the following command manually (-lGL and -lGLU
depencies removed):
g++ -fPIC -shared -Bsymbolic --warn-once -o gpulib.so gpulib.o ./../
vectorOp/gpuVectorOp.o ./../vectorOp/gpuMT.o ./../physicsOp/
gpuPhysicsOp.o -L/usr/local/cuda/lib -lcudart -lcublas -lcufft
This compiled succesfully.
5. Move to the 'IDL' folder and add it to your IDL_DLM_PATH variable.
Start IDL and compile 'gpuinit.pro'. Check whether your device is
recognized with:
IDL> Print, gpuDectectDevice()
In my case IDL printed -1, showing that no GPU was detected and
hardware emulation was enabled. Therefore I cannot show you any
performance tests.
Peter Messner made the following remark on suitable hardware:
"Regarding hardware: We have had pretty good experience with the
GeForce 8800 GTX or Ulra models. They are a bit on the expensive side
($400-$600) but they are worth the money. You would probably also need
to upgrade your power supply."
Hope this is useful.
Allard
|
|
|