GPUSVM, version 0.1 using CUDA Nvidia 9600 GT

The build process assumes that cuda is installed in /usr/local/cuda,
and that the CUDA SDK is installed at ~/cuda.  If this is not the
case, set your CUDA_INSTALL_PATH and CUDA_SDK_PATH variables
appropriately.

another way round
==>

$ln -s NVIDIA_GPU_Computing_SDK/ cuda

$/usr/bin/ld: can not find -lblas

install libblas-dev

$/usr/bin/ld: cannot find -lcutil

#vim /etc/ld.so.conf.d/nvidia-cuda-whatever.conf
Ensure that these following lines exist:
/usr/local/cuda/lib
/home/surya/cuda/common/lib/linux

#ldconfig

gpusvm-0.1$ make
gpusvm-0.1$ cd bin/linux/release/

$./svmTrain
Usage: svmTrain [options] trainingData.svm
Options:
-o outputFilename     Location of output file
Kernel types:
–gaussian    Gaussian or RBF kernel (default): Phi(x, y; gamma) = exp{-gamma*||x-y||^2}
–linear    Linear kernel: Phi(x, y) = x . y
–polynomial    Polynomial kernel: Phi(x, y; a, r, d) = (ax . y + r)^d
–sigmoid    Sigmoid kernel: Phi(x, y; a, r) = tanh(ax . y + r)
Parameters:
-c, –cost    SVM training cost C (default = 10)
-g    Gamma for Gaussian kernel (default = 1/l)
-a    Parameter a for Polynomial and Sigmoid kernels (default = 1/l)
-r    Parameter r for Polynomial and Sigmoid kernels (default = 1)
-d    Parameter d for Polynomial kernel (default = 3)
Convergence parameters:
–tolerance, -t    Termination criterion tolerance (default = 0.001)
–epsilon, -e    Support vector threshold (default = 1e-5)
Internal options:
–heuristic, -h    Working selection heuristic:
0: First order
1: Second order
2: Random (either first or second order)
3: Adaptive (default)

ERROR on TRIAL EXPERIMENT

$./svmTrain -o keluaran data/abaloneData.svm
Input data found: 4177 points, 8 dimension
Using cuda device 0: GeForce 9600 GT
Controller: currentMethod: 1 (dynamic), inspectionPeriod: 6
Gaussian kernel: gamma = 0.000239
Cost: 10.000000, Tolerance: 0.001000, Epsilon: 0.000010
Realigning data to a pitch of 4192 floats
536543232 bytes of memory found on device, 303042560 bytes currently free
4177 rows of kernel matrix will be cached (16768 bytes per row)
Allocated arrays on GPU
Initialization complete
1723 iterations
bLow: -0.878006, bHigh: -0.878006
4014 accesses, 733 hits, 3281 compulsory misses, 0 capacity misses
*** glibc detected *** ./svmTrain: double free or corruption (out): 0x08c3fc18 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb77f5604]
/lib/tls/i686/cmov/libc.so.6(cfree+0x96)[0xb77f75b6]
/usr/lib/libstdc++.so.6(_ZdlPv+0x21)[0xb79d8231]
/usr/local/cuda/lib/libcudart.so.2(cudaFree+0x1f3)[0xb7be0c63]
./svmTrain[0x805e991]
./svmTrain[0x804cd25]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb779c775]
./svmTrain[0x804b391]
======= Memory map: ========
08048000-0819b000 r-xp 00000000 08:12 102242     /media/NTFS-HOME/sendai-july-2009/downloads/CUDA/GPU-TC-SVM/gpusvm-0.1/bin/linux/release/svmTrain
0819b000-0819c000 r–p 00152000 08:12 102242     /media/NTFS-HOME/sendai-july-2009/downloads/CUDA/GPU-TC-SVM/gpusvm-0.1/bin/linux/release/svmTrain
0819c000-0819d000 rw-p 00153000 08:12 102242     /media/NTFS-HOME/sendai-july-2009/downloads/CUDA/GPU-TC-SVM/gpusvm-0.1/bin/linux/release/svmTrain
08bc3000-08d04000 rw-p 08bc3000 00:00 0          [heap]
b5700000-b5721000 rw-p b5700000 00:00 0
b5721000-b5800000 —p b5721000 00:00 0
b58e5000-b59e5000 rw-s 22698000 00:0f 8606       /dev/nvidia0
b59e5000-b5ae5000 rw-s 1aea0000 00:0f 8606       /dev/nvidia0
b5ae5000-b5be5000 rw-s 22619000 00:0f 8606       /dev/nvidia0
b5be5000-b5ce5000 rw-s 00e72000 00:0f 8606       /dev/nvidia0
b5ce5000-b5ce6000 rw-s 00e6f000 00:0f 8606       /dev/nvidia0
b5ce6000-b5ce7000 rw-s d2c0a000 00:0f 8606       /dev/nvidia0
b5ce7000-b5ce8000 rw-s 00f03000 00:0f 8606       /dev/nvidia0
b5ce8000-b60ea000 rw-s 2e2cd000 00:0f 8606       /dev/nvidia0
b60ea000-b64ec000 rw-s 17980000 00:0f 8606       /dev/nvidia0
b64ec000-b64fd000 rw-s 2151f000 00:0f 8606       /dev/nvidia0
b64fd000-b6541000 rw-p b64fd000 00:00 0
b6541000-b6545000 r-xp 00000000 08:16 50754      /usr/lib/libXdmcp.so.6.0.0
b6545000-b6546000 rw-p 00003000 08:16 50754      /usr/lib/libXdmcp.so.6.0.0
b6546000-b655e000 r-xp 00000000 08:16 50736      /usr/lib/libxcb.so.1.1.0
b655e000-b655f000 r–p 00017000 08:16 50736      /usr/lib/libxcb.so.1.1.0
b655f000-b6560000 rw-p 00018000 08:16 50736      /usr/lib/libxcb.so.1.1.0
b6560000-b6562000 r-xp 00000000 08:16 50927      /usr/lib/libXau.so.6.0.0
b6562000-b6563000 r–p 00001000 08:16 50927      /usr/lib/libXau.so.6.0.0
b6563000-b6564000 rw-p 00002000 08:16 50927      /usr/lib/libXau.so.6.0.0
b6564000-b6565000 rw-p b6564000 00:00 0
b6565000-b6615000 r-xp 00000000 08:16 53880      /usr/lib/libgfortran.so.3.0.0
b6615000-b6616000 —p 000b0000 08:16 53880      /usr/lib/libgfortran.so.3.0.0
b6616000-b6617000 r–p 000b0000 08:16 53880      /usr/lib/libgfortran.so.3.0.0
b6617000-b6618000 rw-p 000b1000 08:16 53880      /usr/lib/libgfortran.so.3.0.0
b6618000-b6619000 rw-p b6618000 00:00 0
b6619000-b6703000 r-xp 00000000 08:16 49198      /usr/lib/libX11.so.6.2.0
b6703000-b6704000 —p 000ea000 08:16 49198      /usr/lib/libX11.so.6.2.0
b6704000-b6705000 r–p 000ea000 08:16 49198      /usr/lib/libX11.so.6.2.0
b6705000-b6707000 rw-p 000eb000 08:16 49198      /usr/lib/libX11.so.6.2.0
b6707000-b6708000 rw-p b6707000 00:00 0
b6708000-b6716000 r-xp 00000000 08:16 50742      /usr/lib/libXext.so.6.4.0
b6716000-b6717000 r–p 0000d000 08:16 50742      /usr/lib/libXext.so.6.4.0
b6717000-b6718000 rw-p 0000e000 08:16 50742      /usr/lib/libXext.so.6.4.0
b6718000-b6719000 r-xp 00000000 08:16 442369     /usr/lib/tls/libnvidia-tls.so.190.18
b6719000-b671a000 rw-p 00000000 08:16 442369     /usr/lib/tls/libnvidia-tls.so.190.18
b671a000-b76f8000 r-xp 00000000 08:16 51995      /usr/lib/libGLcore.so.190.18
b76f8000-b773b000 rwxp 00fdd000 08:16 51995      /usr/lib/libGLcore.so.190.18
b773b000-b7749000 rwxp b773b000 00:00 0
b7749000-b774a000 rw-p b7749000 00:00 0
b774a000-b7751000 r-xp 00000000 08:16 1049270    /lib/tls/i686/cmov/librt-2.9.so
b7751000-b7752000 r–p 00006000 08:16 1049270    /lib/tls/i686/cmov/librt-2.9.so
b7752000-b7753000 rw-p 00007000 08:16 1049270    /lib/tls/i686/cmov/librt-2.9.so
b7753000-b7755000 r-xp 00000000 08:16 1049257    /lib/tls/i686/cmov/libdl-2.9.so
b7755000-b7756000 r–p 00001000 08:16 1049257    /lib/tls/i686/cmov/libdl-2.9.so
b7756000-b7757000 rw-p 00002000 08:16 1049257    /lib/tls/i686/cmov/libdl-2.9.so
b7757000-b776b000 r-xp 00000000 08:16 1032215    /lib/libz.so.1.2.3.3
b776b000-b776c000 r–p 00013000 08:16 1032215    /lib/libz.so.1.2.3.3
b776c000-b776d000 rw-p 00014000 08:16 1032215    /lib/libz.so.1.2.3.3
b776d000-b7782000 r-xp 00000000 08:16 1049268    /lib/tls/i686/cmov/libpthread-2.9.so
b7782000-b7783000 r–p 00014000 08:16 1049268    /lib/tls/i686/cmov/libpthread-2.9.so
b7783000-b7784000 rw-p 00015000 08:16 1049268    /lib/tls/i686/cmov/libpthread-2.9.so
b7784000-b7786000 rw-p b7784000 00:00 0
b7786000-b78e2000 r-xp 00000000 08:16 1049254    /lib/tls/i686/cmov/libc-2.9.so
b78e2000-b78e3000 —p 0015c000 08:16 1049254    /lib/tls/i686/cmov/libc-2.9.so
b78e3000-b78e5000 r–p 0015c000 08:16 1049254    /lib/tls/i686/cmov/libc-2.9.so
b78e5000-b78e6000 rw-p 0015e000 08:16 1049254    /lib/tls/i686/cmov/libc-2.9.so
b78e6000-b78ea000 rw-p b78e6000 00:00 0
b78ea000-b78f7000 r-xp 00000000 08:16 1032213    /lib/libgcc_s.so.1
b78f7000-b78f8000 r–p 0000c000 08:16 1032213    /lib/libgcc_s.so.1
b78f8000-b78f9000 rw-p 0000d000 08:16 1032213    /lib/libgcc_s.so.1
b78f9000-b791d000 r-xp 00000000 08:16 1049258    /lib/tls/i686/cmov/libm-2.9.so
b791d000-b791e000 r–p 00023000 08:16 1049258    /lib/tls/i686/cmov/libm-2.9.so
b791e000-b791f000 rw-p 00024000 08:16 1049258    /lib/tls/i686/cmov/libm-2.9.so
b791f000-b7a03000 r-xp 00000000 08:16 49259      /usr/lib/libstdc++.so.6.0.10
b7a03000-b7a07000 r–p 000e3000 08:16 49259      /usr/lib/libstdc++.so.6.0.10
b7a07000-b7a08000 rw-p 000e7000 08:16 49259      /usr/lib/libstdc++.so.6.0.10
b7a08000-b7a0e000 rw-p b7a08000 00:00 0
b7a0e000-b7a94000 r-xp 00000000 08:16 53882      /usr/lib/libblas.so.3gf.0
b7a94000-b7a95000 r–p 00085000 08:16 53882      /usr/lib/libblas.so.3gf.0
b7a95000-b7a96000 rw-p 00086000 08:16 53882      /usr/lib/libblas.so.3gf.0
b7a96000-b7b05000 r-xp 00000000 08:16 50895      /usr/lib/libGLU.so.1.3.070300
b7b05000-b7b06000 —p 0006f000 08:16 50895      /usr/lib/libGLU.so.1.3.070300
b7b06000-b7b07000 r–p 0006f000 08:16 50895      /usr/lib/libGLU.so.1.3.070300
b7b07000-b7b08000 rw-p 00070000 08:16 50895      /usr/lib/libGLU.so.1.3.070300
b7b08000-b7b9b000 r-xp 00000000 08:16 51560      /usr/lib/libGL.so.190.18
b7b9b000-b7bb2000 rwxp 00093000 08:16 51560      /usr/lib/libGL.so.190.18
b7bb2000-b7bc1000 rwxp b7bb2000 00:00 0
b7bc1000-b7bc2000 rw-p b7bc1000 00:00 0
b7bc2000-b7c06000 r-xp 00000000 08:16 788082     /usr/local/cuda/lib/libcudart.so.2.3
b7c06000-b7c07000 r–p 00043000 08:16 788082     /usr/local/cuda/lib/libcudart.so.2.3
b7c07000-b7c08000 rw-p 00044000 08:16 788082     /usr/local/cuda/lib/libcudart.so.2.3
b7c08000-b7fed000 r-xp 00000000 08:16 49822      /usr/lib/libcuda.so.190.18
b7fed000-b7ff2000 rw-p 003e5000 08:16 49822      /usr/lib/libcuda.so.190.18
b7ff2000-b8018000 rw-p b7ff2000 00:00 0
b8026000-b8027000 rw-s d2c08000 00:0f 8606       /dev/nvidia0
b8027000-b8028000 rw-s 0e334000 00:0f 8606       /dev/nvidia0
b8028000-b8029000 r–s d2009000 00:0f 8606       /dev/nvidia0
b8029000-b802b000 rw-p b8029000 00:00 0
b802b000-b802d000 rwxp 00000000 00:0f 754        /dev/zero
b802d000-b802f000 rw-p b802d000 00:00 0
b802f000-b8030000 r-xp b802f000 00:00 0          [vdso]
b8030000-b804c000 r-xp 00000000 08:16 1032204    /lib/ld-2.9.so
b804c000-b804d000 r–p 0001b000 08:16 1032204    /lib/ld-2.9.so
b804d000-b804e000 rw-p 0001c000 08:16 1032204    /lib/ld-2.9.so
bfd38000-bfd4c000 rwxp bffeb000 00:00 0          [stack]
bfd4c000-bfd4d000 rw-p bffff000 00:00 0
Aborted

$export MALLOC_CHECK_=0
$ ./svmTrain -o t data/abaloneData.svm
Input data found: 4177 points, 8 dimension
Using cuda device 0: GeForce 9800 GT
Controller: currentMethod: 1 (dynamic), inspectionPeriod: 6
Gaussian kernel: gamma = 0.000239
Cost: 10.000000, Tolerance: 0.001000, Epsilon: 0.000010
Realigning data to a pitch of 4192 floats
536543232 bytes of memory found on device, 407134208 bytes currently free
4177 rows of kernel matrix will be cached (16768 bytes per row)
Allocated arrays on GPU
Initialization complete
1723 iterations
bLow: -0.878006, bHigh: -0.878006
4014 accesses, 733 hits, 3281 compulsory misses, 0 capacity misses
Segmentation fault

YEAH RITE! *DOH*

Advertisements
Posted in Programming/Notes

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: