Showing posts with label glut. Show all posts
Showing posts with label glut. Show all posts

Friday, June 2, 2017

First learning into gpu sort with code compile on gpuqsortlib

Many articles recently showing using gpu to do arithmetic operation and with so many chips on a gpu in comparison with cpu, I thought it is worth while to spend sometime to look into gpu capabilities. Today I'm trying out gpu sort with gpusortlib.

Download the gpusortlib and extract it. Then let's start make command

 user@localhost:~/Desktop/gpuqsortlib$ make   
 nvcc -O3 -I/common/inc -Xcompiler -fPIC -Iinc -c src/gpuqsort.cu -o gpuqsort.o  
 make: nvcc: Command not found  
 Makefile:19: recipe for target 'gpuqsort.o' failed  
 make: *** [gpuqsort.o] Error 127  

nvcc compiler not install, so let's install it. Note that, this required 668MB of disk space!

 user@localhost:~/Desktop/gpuqsortlib$ sudo apt-get install nvidia-cuda-toolkit  
 Reading package lists... Done  
 Building dependency tree      
 Reading state information... Done  
 The following packages were automatically installed and are no longer required:  
  libgl1-nvidia-glx:i386 libgl1-nvidia-glx-i386:i386 libllvm3.5v5 libnvidia-glcore:i386 linux-image-4.1.0-2-amd64 linux-image-4.2.0-1-amd64 linux-source-4.3 python3-ecdsa syslinux  
  unetbootin-translations  
 Use 'sudo apt autoremove' to remove them.  
 The following additional packages will be installed:  
  libcublas7.5 libcuda1 libcuda1:i386 libcuda1-i386:i386 libcudart7.5 libcufft7.5 libcufftw7.5 libcuinj64-7.5 libcurand7.5 libcusolver7.5 libcusparse7.5 libegl1-nvidia libgl1-nvidia-glx  
  libgl1-nvidia-glx:i386 libgles1-nvidia libgles2-nvidia libnppc7.5 libnppi7.5 libnpps7.5 libnvblas7.5 libnvcuvid1 libnvidia-compiler libnvidia-eglcore libnvidia-glcore  
  libnvidia-glcore:i386 libnvidia-ml1 libnvidia-ml1:i386 libnvrtc7.5 libnvtoolsext1 libnvvm3 libthrust-dev libva-x11-1:i386 libvdpau-dev libvdpau-va-gl1:i386 libvdpau1 libvdpau1:i386  
  mesa-vdpau-drivers:i386 nvidia-alternative nvidia-cuda-dev nvidia-cuda-doc nvidia-cuda-gdb nvidia-driver nvidia-driver-bin nvidia-driver-libs nvidia-kernel-support nvidia-opencl-common  
  nvidia-opencl-dev nvidia-opencl-icd nvidia-profiler nvidia-smi:i386 nvidia-vdpau-driver nvidia-visual-profiler opencl-headers vdpau-driver-all:i386 xserver-xorg-video-nvidia  
 Suggested packages:  
  nvidia-cuda-mps nvidia-cuda-mps:i386 libvdpau-doc libcupti-dev nvidia-vdpau-driver:i386 nvidia-legacy-340xx-vdpau-driver:i386  
 Recommended packages:  
  nvidia-smi nvidia-settings nvidia-driver-libs-i386 libnvidia-cfg1  
 The following NEW packages will be installed:  
  libcublas7.5 libcuda1 libcuda1:i386 libcuda1-i386:i386 libcudart7.5 libcufft7.5 libcufftw7.5 libcuinj64-7.5 libcurand7.5 libcusolver7.5 libcusparse7.5 libnppc7.5 libnppi7.5 libnpps7.5  
  libnvblas7.5 libnvcuvid1 libnvidia-compiler libnvidia-glcore libnvidia-glcore:i386 libnvidia-ml1:i386 libnvrtc7.5 libnvtoolsext1 libnvvm3 libthrust-dev libva-x11-1:i386 libvdpau-dev  
  libvdpau-va-gl1:i386 mesa-vdpau-drivers:i386 nvidia-cuda-dev nvidia-cuda-doc nvidia-cuda-gdb nvidia-cuda-toolkit nvidia-driver-libs nvidia-opencl-common nvidia-opencl-dev  
  nvidia-opencl-icd nvidia-profiler nvidia-smi:i386 nvidia-visual-profiler opencl-headers vdpau-driver-all:i386  
 The following packages will be upgraded:  
  libegl1-nvidia libgl1-nvidia-glx libgl1-nvidia-glx:i386 libgles1-nvidia libgles2-nvidia libnvidia-eglcore libnvidia-ml1 libvdpau1 libvdpau1:i386 nvidia-alternative nvidia-driver  
  nvidia-driver-bin nvidia-kernel-support nvidia-vdpau-driver xserver-xorg-video-nvidia  
 15 upgraded, 41 newly installed, 0 to remove and 510 not upgraded.  
 Need to get 668 MB of archives.  
 After this operation, 1,329 MB of additional disk space will be used.  
 Do you want to continue? [Y/n] Y  
 Get:1 http://ftp.us.debian.org/debian testing/non-free amd64 libgles2-nvidia amd64 352.79-10 [170 kB]  
 Get:2 http://ftp.us.debian.org/debian testing/non-free amd64 libgles1-nvidia amd64 352.79-10 [165 kB]  
 Get:3 http://ftp.us.debian.org/debian testing/non-free amd64 nvidia-driver amd64 352.79-10 [435 kB]  
 Get:4 http://ftp.us.debian.org/debian testing/non-free amd64 nvidia-driver-bin amd64 352.79-10 [230 kB]  
 Get:5 http://ftp.us.debian.org/debian testing/non-free amd64 xserver-xorg-video-nvidia amd64 352.79-10 [3,188 kB]  
 Get:6 http://ftp.us.debian.org/debian testing/non-free amd64 nvidia-vdpau-driver amd64 352.79-10 [620 kB]                                            
 Get:7 http://ftp.us.debian.org/debian testing/non-free amd64 nvidia-kernel-support amd64 352.79-10 [150 kB]                                           
 Get:8 http://ftp.us.debian.org/debian testing/non-free amd64 libegl1-nvidia amd64 352.79-10 [291 kB]                                               
 Get:9 http://ftp.us.debian.org/debian testing/non-free amd64 libgl1-nvidia-glx amd64 352.79-10 [527 kB]                                             
 Get:10 http://ftp.us.debian.org/debian testing/non-free i386 libgl1-nvidia-glx i386 352.79-10 [518 kB]                                              
 Get:11 http://ftp.us.debian.org/debian testing/non-free amd64 nvidia-alternative amd64 352.79-10 [151 kB]                                            
 Get:12 http://ftp.us.debian.org/debian testing/non-free amd64 libnvidia-ml1 amd64 352.79-10 [452 kB]                                               
 Get:13 http://ftp.us.debian.org/debian testing/non-free i386 libnvidia-glcore i386 352.79-10 [6,549 kB]                                             
 Get:14 http://ftp.us.debian.org/debian testing/non-free amd64 libnvidia-glcore amd64 352.79-10 [6,841 kB]                                            
 Get:15 http://ftp.us.debian.org/debian testing/non-free amd64 nvidia-driver-libs amd64 352.79-10 [150 kB]                                            
 Get:16 http://ftp.us.debian.org/debian testing/main i386 libvdpau1 i386 1.1.1-3 [39.7 kB]                                                    
 Get:17 http://ftp.us.debian.org/debian testing/main amd64 libvdpau1 amd64 1.1.1-3 [41.1 kB]                                                   
 Get:18 http://ftp.us.debian.org/debian testing/non-free amd64 libnvidia-eglcore amd64 352.79-10 [6,715 kB]                                            
 Get:19 http://ftp.us.debian.org/debian testing/non-free i386 libcuda1 i386 352.79-10 [4,154 kB]                                                 
 Get:20 http://ftp.us.debian.org/debian testing/non-free amd64 libcuda1 amd64 352.79-10 [4,072 kB]                                                
 Get:21 http://ftp.us.debian.org/debian testing/non-free i386 libcuda1-i386 i386 352.79-10 [149 kB]                                                
 Get:22 http://ftp.us.debian.org/debian testing/non-free amd64 libnvcuvid1 amd64 352.79-10 [624 kB]                                                
 Get:23 http://ftp.us.debian.org/debian testing/non-free amd64 libnvidia-compiler amd64 352.79-10 [11.7 MB]                                            
 Get:24 http://ftp.us.debian.org/debian testing/non-free i386 libnvidia-ml1 i386 352.79-10 [426 kB]                                                
 Get:25 http://ftp.us.debian.org/debian testing/main i386 libva-x11-1 i386 1.7.1-2 [19.9 kB]                                                   
 Get:26 http://ftp.us.debian.org/debian testing/main amd64 libvdpau-dev amd64 1.1.1-3 [53.0 kB]                                                  
 Get:27 http://ftp.us.debian.org/debian testing/main i386 libvdpau-va-gl1 i386 0.4.0-2 [73.0 kB]                                                 
 Get:28 http://ftp.us.debian.org/debian testing/main i386 mesa-vdpau-drivers i386 11.2.2-1 [1,669 kB]                                               
 Get:29 http://ftp.us.debian.org/debian testing/non-free amd64 nvidia-opencl-common amd64 352.79-10 [150 kB]                                           
 Get:30 http://ftp.us.debian.org/debian testing/non-free amd64 nvidia-opencl-icd amd64 352.79-10 [4,141 kB]                                            
 Get:31 http://ftp.us.debian.org/debian testing/non-free i386 nvidia-smi i386 352.79-10 [301 kB]                                                 
 Get:32 http://ftp.us.debian.org/debian testing/main i386 vdpau-driver-all i386 1.1.1-3 [20.2 kB]                                                 
 Get:33 http://ftp.us.debian.org/debian testing/non-free amd64 libcublas7.5 amd64 7.5.18-3 [14.1 MB]                                               
 Get:34 http://ftp.us.debian.org/debian testing/non-free amd64 libcudart7.5 amd64 7.5.18-3 [113 kB]                                                
 Get:35 http://ftp.us.debian.org/debian testing/non-free amd64 libcufft7.5 amd64 7.5.18-3 [66.6 MB]                                                
 Get:36 http://ftp.us.debian.org/debian testing/non-free amd64 libcufftw7.5 amd64 7.5.18-3 [126 kB]                                                
 Get:37 http://ftp.us.debian.org/debian testing/non-free amd64 libcuinj64-7.5 amd64 7.5.18-3 [1,651 kB]                                              
 Get:38 http://ftp.us.debian.org/debian testing/non-free amd64 libcurand7.5 amd64 7.5.18-3 [37.8 MB]                                               
 Get:39 http://ftp.us.debian.org/debian testing/non-free amd64 libcusolver7.5 amd64 7.5.18-3 [16.0 MB]                                              
 Get:40 http://ftp.us.debian.org/debian testing/non-free amd64 libcusparse7.5 amd64 7.5.18-3 [19.2 MB]                                              
 Get:41 http://ftp.us.debian.org/debian testing/non-free amd64 libnppc7.5 amd64 7.5.18-3 [118 kB]                                                 
 Get:42 http://ftp.us.debian.org/debian testing/non-free amd64 libnppi7.5 amd64 7.5.18-3 [30.6 MB]                                                
 Get:43 http://ftp.us.debian.org/debian testing/non-free amd64 libnpps7.5 amd64 7.5.18-3 [2,667 kB]                                                
 Get:44 http://ftp.us.debian.org/debian testing/non-free amd64 libnvblas7.5 amd64 7.5.18-3 [124 kB]                                                
 Get:45 http://ftp.us.debian.org/debian testing/non-free amd64 libnvrtc7.5 amd64 7.5.18-3 [6,254 kB]                                               
 Get:46 http://ftp.us.debian.org/debian testing/non-free amd64 libnvtoolsext1 amd64 7.5.18-3 [41.3 kB]                                              
 Get:47 http://ftp.us.debian.org/debian testing/non-free amd64 libnvvm3 amd64 7.5.18-3 [4,203 kB]                                                 
 Get:48 http://ftp.us.debian.org/debian testing/main amd64 libthrust-dev all 1.8.1-1 [439 kB]                                                   
 Get:49 http://ftp.us.debian.org/debian testing/non-free amd64 nvidia-cuda-dev amd64 7.5.18-3 [201 MB]                                              
 Get:50 http://ftp.us.debian.org/debian testing/non-free amd64 nvidia-cuda-doc all 7.5.18-3 [73.5 MB]                                               
 Get:51 http://ftp.us.debian.org/debian testing/non-free amd64 nvidia-cuda-gdb amd64 7.5.18-3 [2,613 kB]                                             
 Get:52 http://ftp.us.debian.org/debian testing/non-free amd64 nvidia-profiler amd64 7.5.18-3 [2,253 kB]                                             
 Get:53 http://ftp.us.debian.org/debian testing/main amd64 opencl-headers all 2.0~svn32091-2 [57.1 kB]                                              
 Get:54 http://ftp.us.debian.org/debian testing/non-free amd64 nvidia-opencl-dev amd64 7.5.18-3 [28.2 kB]                                             
 Get:55 http://ftp.us.debian.org/debian testing/non-free amd64 nvidia-cuda-toolkit amd64 7.5.18-3 [15.3 MB]                                            
 Get:56 http://ftp.us.debian.org/debian testing/non-free amd64 nvidia-visual-profiler amd64 7.5.18-3 [118 MB]                                           
 Fetched 668 MB in 33min 21s (334 kB/s)                                                                              
 Reading changelogs... Done  
 Extracting templates from packages: 100%  
 (Reading database ... 275391 files and directories currently installed.)  
 Preparing to unpack .../libgles2-nvidia_352.79-10_amd64.deb ...  
 Unpacking libgles2-nvidia:amd64 (352.79-10) over (352.79-8) ...  
 Preparing to unpack .../libgles1-nvidia_352.79-10_amd64.deb ...  
 Unpacking libgles1-nvidia:amd64 (352.79-10) over (352.79-8) ...  
 Preparing to unpack .../nvidia-driver_352.79-10_amd64.deb ...  
 Unpacking nvidia-driver (352.79-10) over (352.79-8) ...  
 Preparing to unpack .../nvidia-driver-bin_352.79-10_amd64.deb ...  
 Unpacking nvidia-driver-bin (352.79-10) over (352.79-8) ...  
 Preparing to unpack .../xserver-xorg-video-nvidia_352.79-10_amd64.deb ...  
 Unpacking xserver-xorg-video-nvidia (352.79-10) over (352.79-8) ...  
 Preparing to unpack .../nvidia-vdpau-driver_352.79-10_amd64.deb ...  
 Unpacking nvidia-vdpau-driver:amd64 (352.79-10) over (352.79-8) ...  
 Preparing to unpack .../nvidia-kernel-support_352.79-10_amd64.deb ...  
 Unpacking nvidia-kernel-support (352.79-10) over (352.79-8) ...  
 Preparing to unpack .../libegl1-nvidia_352.79-10_amd64.deb ...  
 Unpacking libegl1-nvidia:amd64 (352.79-10) over (352.79-8) ...  
 Preparing to unpack .../libgl1-nvidia-glx_352.79-10_i386.deb ...  
 De-configuring libgl1-nvidia-glx:amd64 (352.79-8) ...  
 Unpacking libgl1-nvidia-glx:i386 (352.79-10) over (352.79-8) ...  
 Preparing to unpack .../libgl1-nvidia-glx_352.79-10_amd64.deb ...  
 Unpacking libgl1-nvidia-glx:amd64 (352.79-10) over (352.79-8) ...  
 Preparing to unpack .../nvidia-alternative_352.79-10_amd64.deb ...  
 Unpacking nvidia-alternative (352.79-10) over (352.79-8) ...  
 Preparing to unpack .../libnvidia-ml1_352.79-10_amd64.deb ...  
 Unpacking libnvidia-ml1:amd64 (352.79-10) over (352.79-8) ...  
 Selecting previously unselected package libnvidia-glcore:i386.  
 Preparing to unpack .../libnvidia-glcore_352.79-10_i386.deb ...  
 Unpacking libnvidia-glcore:i386 (352.79-10) ...  
 Selecting previously unselected package libnvidia-glcore:amd64.  
 Preparing to unpack .../libnvidia-glcore_352.79-10_amd64.deb ...  
 Unpacking libnvidia-glcore:amd64 (352.79-10) ...  
 Selecting previously unselected package nvidia-driver-libs:amd64.  
 Preparing to unpack .../nvidia-driver-libs_352.79-10_amd64.deb ...  
 Unpacking nvidia-driver-libs:amd64 (352.79-10) ...  
 Preparing to unpack .../libvdpau1_1.1.1-3_amd64.deb ...  
 De-configuring libvdpau1:i386 (1.1.1-1) ...  
 Unpacking libvdpau1:amd64 (1.1.1-3) over (1.1.1-1) ...  
 Preparing to unpack .../libvdpau1_1.1.1-3_i386.deb ...  
 Unpacking libvdpau1:i386 (1.1.1-3) over (1.1.1-1) ...  
 Preparing to unpack .../libnvidia-eglcore_352.79-10_amd64.deb ...  
 Unpacking libnvidia-eglcore:amd64 (352.79-10) over (352.79-8) ...  
 Selecting previously unselected package libcuda1:amd64.  
 Preparing to unpack .../libcuda1_352.79-10_amd64.deb ...  
 Unpacking libcuda1:amd64 (352.79-10) ...  
 Selecting previously unselected package libcuda1:i386.  
 Preparing to unpack .../libcuda1_352.79-10_i386.deb ...  
 Unpacking libcuda1:i386 (352.79-10) ...  
 Selecting previously unselected package libcuda1-i386:i386.  
 Preparing to unpack .../libcuda1-i386_352.79-10_i386.deb ...  
 Unpacking libcuda1-i386:i386 (352.79-10) ...  
 Selecting previously unselected package libnvcuvid1:amd64.  
 Preparing to unpack .../libnvcuvid1_352.79-10_amd64.deb ...  
 Unpacking libnvcuvid1:amd64 (352.79-10) ...  
 Selecting previously unselected package libnvidia-compiler:amd64.  
 Preparing to unpack .../libnvidia-compiler_352.79-10_amd64.deb ...  
 Unpacking libnvidia-compiler:amd64 (352.79-10) ...  
 Selecting previously unselected package libnvidia-ml1:i386.  
 Preparing to unpack .../libnvidia-ml1_352.79-10_i386.deb ...  
 Unpacking libnvidia-ml1:i386 (352.79-10) ...  
 Selecting previously unselected package libva-x11-1:i386.  
 Preparing to unpack .../libva-x11-1_1.7.1-2_i386.deb ...  
 Unpacking libva-x11-1:i386 (1.7.1-2) ...  
 Selecting previously unselected package libvdpau-dev:amd64.  
 Preparing to unpack .../libvdpau-dev_1.1.1-3_amd64.deb ...  
 Unpacking libvdpau-dev:amd64 (1.1.1-3) ...  
 Selecting previously unselected package libvdpau-va-gl1:i386.  
 Preparing to unpack .../libvdpau-va-gl1_0.4.0-2_i386.deb ...  
 Unpacking libvdpau-va-gl1:i386 (0.4.0-2) ...  
 Selecting previously unselected package mesa-vdpau-drivers:i386.  
 Preparing to unpack .../mesa-vdpau-drivers_11.2.2-1_i386.deb ...  
 Unpacking mesa-vdpau-drivers:i386 (11.2.2-1) ...  
 Selecting previously unselected package nvidia-opencl-common.  
 Preparing to unpack .../nvidia-opencl-common_352.79-10_amd64.deb ...  
 Unpacking nvidia-opencl-common (352.79-10) ...  
 Selecting previously unselected package nvidia-opencl-icd:amd64.  
 Preparing to unpack .../nvidia-opencl-icd_352.79-10_amd64.deb ...  
 Unpacking nvidia-opencl-icd:amd64 (352.79-10) ...  
 Selecting previously unselected package nvidia-smi:i386.  
 Preparing to unpack .../nvidia-smi_352.79-10_i386.deb ...  
 Unpacking nvidia-smi:i386 (352.79-10) ...  
 Selecting previously unselected package vdpau-driver-all:i386.  
 Preparing to unpack .../vdpau-driver-all_1.1.1-3_i386.deb ...  
 Unpacking vdpau-driver-all:i386 (1.1.1-3) ...  
 Selecting previously unselected package libcublas7.5:amd64.  
 Preparing to unpack .../libcublas7.5_7.5.18-3_amd64.deb ...  
 Unpacking libcublas7.5:amd64 (7.5.18-3) ...  
 Selecting previously unselected package libcudart7.5:amd64.  
 Preparing to unpack .../libcudart7.5_7.5.18-3_amd64.deb ...  
 Unpacking libcudart7.5:amd64 (7.5.18-3) ...  
 Selecting previously unselected package libcufft7.5:amd64.  
 Preparing to unpack .../libcufft7.5_7.5.18-3_amd64.deb ...  
 Unpacking libcufft7.5:amd64 (7.5.18-3) ...  
 Selecting previously unselected package libcufftw7.5:amd64.  
 Preparing to unpack .../libcufftw7.5_7.5.18-3_amd64.deb ...  
 Unpacking libcufftw7.5:amd64 (7.5.18-3) ...  
 Selecting previously unselected package libcuinj64-7.5:amd64.  
 Preparing to unpack .../libcuinj64-7.5_7.5.18-3_amd64.deb ...  
 Unpacking libcuinj64-7.5:amd64 (7.5.18-3) ...  
 Selecting previously unselected package libcurand7.5:amd64.  
 Preparing to unpack .../libcurand7.5_7.5.18-3_amd64.deb ...  
 Unpacking libcurand7.5:amd64 (7.5.18-3) ...  
 Selecting previously unselected package libcusolver7.5:amd64.  
 Preparing to unpack .../libcusolver7.5_7.5.18-3_amd64.deb ...  
 Unpacking libcusolver7.5:amd64 (7.5.18-3) ...  
 Selecting previously unselected package libcusparse7.5:amd64.  
 Preparing to unpack .../libcusparse7.5_7.5.18-3_amd64.deb ...  
 Unpacking libcusparse7.5:amd64 (7.5.18-3) ...  
 Selecting previously unselected package libnppc7.5:amd64.  
 Preparing to unpack .../libnppc7.5_7.5.18-3_amd64.deb ...  
 Unpacking libnppc7.5:amd64 (7.5.18-3) ...  
 Selecting previously unselected package libnppi7.5:amd64.  
 Preparing to unpack .../libnppi7.5_7.5.18-3_amd64.deb ...  
 Unpacking libnppi7.5:amd64 (7.5.18-3) ...  
 Selecting previously unselected package libnpps7.5:amd64.  
 Preparing to unpack .../libnpps7.5_7.5.18-3_amd64.deb ...  
 Unpacking libnpps7.5:amd64 (7.5.18-3) ...  
 Selecting previously unselected package libnvblas7.5:amd64.  
 Preparing to unpack .../libnvblas7.5_7.5.18-3_amd64.deb ...  
 Unpacking libnvblas7.5:amd64 (7.5.18-3) ...  
 Selecting previously unselected package libnvrtc7.5:amd64.  
 Preparing to unpack .../libnvrtc7.5_7.5.18-3_amd64.deb ...  
 Unpacking libnvrtc7.5:amd64 (7.5.18-3) ...  
 Selecting previously unselected package libnvtoolsext1:amd64.  
 Preparing to unpack .../libnvtoolsext1_7.5.18-3_amd64.deb ...  
 Unpacking libnvtoolsext1:amd64 (7.5.18-3) ...  
 Selecting previously unselected package libnvvm3:amd64.  
 Preparing to unpack .../libnvvm3_7.5.18-3_amd64.deb ...  
 Unpacking libnvvm3:amd64 (7.5.18-3) ...  
 Selecting previously unselected package libthrust-dev.  
 Preparing to unpack .../libthrust-dev_1.8.1-1_all.deb ...  
 Unpacking libthrust-dev (1.8.1-1) ...  
 Selecting previously unselected package nvidia-cuda-dev.  
 Preparing to unpack .../nvidia-cuda-dev_7.5.18-3_amd64.deb ...  
 Unpacking nvidia-cuda-dev (7.5.18-3) ...  
 Selecting previously unselected package nvidia-cuda-doc.  
 Preparing to unpack .../nvidia-cuda-doc_7.5.18-3_all.deb ...  
 Unpacking nvidia-cuda-doc (7.5.18-3) ...  
 Selecting previously unselected package nvidia-cuda-gdb.  
 Preparing to unpack .../nvidia-cuda-gdb_7.5.18-3_amd64.deb ...  
 Unpacking nvidia-cuda-gdb (7.5.18-3) ...  
 Selecting previously unselected package nvidia-profiler.  
 Preparing to unpack .../nvidia-profiler_7.5.18-3_amd64.deb ...  
 Unpacking nvidia-profiler (7.5.18-3) ...  
 Selecting previously unselected package opencl-headers.  
 Preparing to unpack .../opencl-headers_2.0~svn32091-2_all.deb ...  
 Unpacking opencl-headers (2.0~svn32091-2) ...  
 Selecting previously unselected package nvidia-opencl-dev:amd64.  
 Preparing to unpack .../nvidia-opencl-dev_7.5.18-3_amd64.deb ...  
 Unpacking nvidia-opencl-dev:amd64 (7.5.18-3) ...  
 Selecting previously unselected package nvidia-cuda-toolkit.  
 Preparing to unpack .../nvidia-cuda-toolkit_7.5.18-3_amd64.deb ...  
 Unpacking nvidia-cuda-toolkit (7.5.18-3) ...  
 Selecting previously unselected package nvidia-visual-profiler.  
 Preparing to unpack .../nvidia-visual-profiler_7.5.18-3_amd64.deb ...  
 Unpacking nvidia-visual-profiler (7.5.18-3) ...  
 Processing triggers for libc-bin (2.19-22) ...  
 Processing triggers for glx-alternative-nvidia (0.7.3) ...  
 Processing triggers for desktop-file-utils (0.23-1) ...  
 Processing triggers for gnome-menus (3.13.3-8) ...  
 Processing triggers for mime-support (3.60) ...  
 Processing triggers for man-db (2.7.5-1) ...  
 Processing triggers for update-glx (0.7.3) ...  
 Processing triggers for glx-alternative-nvidia (0.7.3) ...  
 update-alternatives: using /usr/lib/nvidia to provide /usr/lib/glx (glx) in auto mode  
 update-alternatives: warning: skip creation of /usr/lib/x86_64-linux-gnu/libEGL.so.1 because associated file /usr/lib/x86_64-linux-gnu/nvidia/libEGL.so.1 (of link group glx) doesn't exist  
 update-alternatives: warning: skip creation of /usr/lib/i386-linux-gnu/libGL.so.1 because associated file /usr/lib/i386-linux-gnu/nvidia/libGL.so.1 (of link group glx) doesn't exist  
 update-alternatives: warning: skip creation of /usr/lib/x86_64-linux-gnu/libGL.so.1 because associated file /usr/lib/x86_64-linux-gnu/nvidia/libGL.so.1 (of link group glx) doesn't exist  
 update-alternatives: warning: skip creation of /usr/lib/x86_64-linux-gnu/libGLESv1_CM.so.1 because associated file /usr/lib/x86_64-linux-gnu/nvidia/libGLESv1_CM.so.1 (of link group glx) doesn't exist  
 update-alternatives: warning: skip creation of /usr/lib/x86_64-linux-gnu/libGLESv2.so.2 because associated file /usr/lib/x86_64-linux-gnu/nvidia/libGLESv2.so.2 (of link group glx) doesn't exist  
 update-alternatives: warning: skip creation of /usr/lib/i386-linux-gnu/libnvidia-cfg.so.1 because associated file /usr/lib/i386-linux-gnu/nvidia/libnvidia-cfg.so.1 (of link group glx) doesn't exist  
 update-alternatives: warning: skip creation of /usr/lib/x86_64-linux-gnu/libnvidia-cfg.so.1 because associated file /usr/lib/x86_64-linux-gnu/nvidia/libnvidia-cfg.so.1 (of link group glx) doesn't exist  
 update-alternatives: warning: skip creation of /usr/lib/xorg/modules/linux/libglx.so because associated file /usr/lib/nvidia/libglx.so (of link group glx) doesn't exist  
 update-alternatives: warning: skip creation of /etc/modprobe.d/nvidia-blacklists-nouveau.conf because associated file /etc/nvidia/nvidia-blacklists-nouveau.conf (of link group glx) doesn't exist  
 update-alternatives: warning: skip creation of /usr/bin/nvidia-bug-report.sh because associated file /usr/lib/nvidia/nvidia-bug-report.sh (of link group glx) doesn't exist  
 update-alternatives: warning: skip creation of /usr/share/X11/xorg.conf.d/nvidia-drm-outputclass.conf because associated file /etc/nvidia/nvidia-drm-outputclass.conf (of link group glx) doesn't exist  
 update-alternatives: warning: skip creation of /etc/modules-load.d/nvidia.conf because associated file /etc/nvidia/nvidia-load.conf (of link group glx) doesn't exist  
 update-alternatives: warning: skip creation of /etc/modprobe.d/nvidia.conf because associated file /etc/nvidia/nvidia-modprobe.conf (of link group glx) doesn't exist  
 update-alternatives: warning: skip creation of /usr/lib/xorg/modules/drivers/nvidia_drv.so because associated file /usr/lib/nvidia/nvidia_drv.so (of link group glx) doesn't exist  
 update-alternatives: using /usr/lib/mesa-diverted to provide /usr/lib/glx (glx) in auto mode  
 Processing triggers for libc-bin (2.19-22) ...  
 Processing triggers for initramfs-tools (0.120) ...  
 update-initramfs: Generating /boot/initrd.img-4.6.0-1-amd64  
 Processing triggers for bumblebee (3.2.1-13) ...  
 Setting up nvidia-alternative (352.79-10) ...  
 Setting up libnvidia-eglcore:amd64 (352.79-10) ...  
 Setting up libnvidia-glcore:amd64 (352.79-10) ...  
 Setting up libnvidia-glcore:i386 (352.79-10) ...  
 Setting up libvdpau1:amd64 (1.1.1-3) ...  
 Setting up libvdpau1:i386 (1.1.1-3) ...  
 Setting up libnvidia-compiler:amd64 (352.79-10) ...  
 Setting up libva-x11-1:i386 (1.7.1-2) ...  
 Setting up libvdpau-dev:amd64 (1.1.1-3) ...  
 Setting up libvdpau-va-gl1:i386 (0.4.0-2) ...  
 Setting up mesa-vdpau-drivers:i386 (11.2.2-1) ...  
 Setting up nvidia-opencl-common (352.79-10) ...  
 Setting up vdpau-driver-all:i386 (1.1.1-3) ...  
 Setting up libcublas7.5:amd64 (7.5.18-3) ...  
 Setting up libcudart7.5:amd64 (7.5.18-3) ...  
 Setting up libcufft7.5:amd64 (7.5.18-3) ...  
 Setting up libcufftw7.5:amd64 (7.5.18-3) ...  
 Setting up libcurand7.5:amd64 (7.5.18-3) ...  
 Setting up libcusolver7.5:amd64 (7.5.18-3) ...  
 Setting up libcusparse7.5:amd64 (7.5.18-3) ...  
 Setting up libnppc7.5:amd64 (7.5.18-3) ...  
 Setting up libnppi7.5:amd64 (7.5.18-3) ...  
 Setting up libnpps7.5:amd64 (7.5.18-3) ...  
 Setting up libnvblas7.5:amd64 (7.5.18-3) ...  
 Setting up libnvrtc7.5:amd64 (7.5.18-3) ...  
 Setting up libnvtoolsext1:amd64 (7.5.18-3) ...  
 Setting up libnvvm3:amd64 (7.5.18-3) ...  
 Setting up libthrust-dev (1.8.1-1) ...  
 Setting up nvidia-cuda-doc (7.5.18-3) ...  
 Setting up nvidia-cuda-gdb (7.5.18-3) ...  
 Setting up opencl-headers (2.0~svn32091-2) ...  
 Setting up nvidia-opencl-dev:amd64 (7.5.18-3) ...  
 Processing triggers for nvidia-alternative (352.79-10) ...  
 update-alternatives: using /usr/lib/nvidia/current to provide /usr/lib/nvidia/nvidia (nvidia) in auto mode  
 Setting up libgles2-nvidia:amd64 (352.79-10) ...  
 Setting up libgles1-nvidia:amd64 (352.79-10) ...  
 Setting up libgl1-nvidia-glx:amd64 (352.79-10) ...  
 Setting up libgl1-nvidia-glx:i386 (352.79-10) ...  
 Setting up libegl1-nvidia:amd64 (352.79-10) ...  
 Setting up nvidia-driver-libs:amd64 (352.79-10) ...  
 Setting up libnvidia-ml1:amd64 (352.79-10) ...  
 Setting up libnvidia-ml1:i386 (352.79-10) ...  
 Setting up nvidia-driver-bin (352.79-10) ...  
 Setting up xserver-xorg-video-nvidia (352.79-10) ...  
 Setting up nvidia-vdpau-driver:amd64 (352.79-10) ...  
 Setting up nvidia-driver (352.79-10) ...  
 Setting up nvidia-kernel-support (352.79-10) ...  
 Setting up libcuda1:amd64 (352.79-10) ...  
 Setting up libcuda1:i386 (352.79-10) ...  
 Setting up libcuda1-i386:i386 (352.79-10) ...  
 Setting up libnvcuvid1:amd64 (352.79-10) ...  
 Setting up nvidia-opencl-icd:amd64 (352.79-10) ...  
 Setting up nvidia-smi:i386 (352.79-10) ...  
 Setting up libcuinj64-7.5:amd64 (7.5.18-3) ...  
 Setting up nvidia-cuda-dev (7.5.18-3) ...  
 Setting up nvidia-profiler (7.5.18-3) ...  
 Setting up nvidia-cuda-toolkit (7.5.18-3) ...  
 Setting up nvidia-visual-profiler (7.5.18-3) ...  
 Processing triggers for libc-bin (2.19-22) ...  
 Processing triggers for glx-alternative-nvidia (0.7.3) ...  
 Processing triggers for update-glx (0.7.3) ...  
 Processing triggers for glx-alternative-nvidia (0.7.3) ...  
 update-alternatives: using /usr/lib/nvidia to provide /usr/lib/glx (glx) in auto mode  
 update-alternatives: using /usr/lib/nvidia/bumblebee to provide /usr/lib/glx (glx) in auto mode  
 Processing triggers for libc-bin (2.19-22) ...  
 Processing triggers for initramfs-tools (0.120) ...  
 update-initramfs: Generating /boot/initrd.img-4.6.0-1-amd64  
 Processing triggers for bumblebee (3.2.1-13) ...  

Let's run the make command again.

 user@localhost:~/Desktop/gpuqsortlib$ make  
 nvcc -O3 -I/common/inc -Xcompiler -fPIC -Iinc -c src/gpuqsort.cu -o gpuqsort.o  
 src/gpuqsort.cu(429): warning: conversion from a string literal to "char *" is deprecated  
   
 src/gpuqsort.cu(429): warning: conversion from a string literal to "char *" is deprecated  
   
 mkdir -p lib/linux/static  
 mkdir -p lib/linux/shared  
 nvcc -o lib/linux/static/libgpuqsort.a -lib gpuqsort.o  
 nvcc -o lib/linux/shared/libgpuqsort.so -shared gpuqsort.o  
 gcc -O3 -Iinc -c testbench/main.cpp -o main.o  
 testbench/main.cpp:33:21: fatal error: sqlite3.h: No such file or directory  
  #include "sqlite3.h"  
            ^  
 compilation terminated.  
 Makefile:22: recipe for target 'main.o' failed  
 make: *** [main.o] Error 1  

So sqlite3 header is not install, you can comment out define HASSQLITE3 in testbench/defs.h or install it. For me, I have install it

 user@localhost:~/Desktop/gpuqsortlib$ sudo apt-get install libsqlite3-dev  
 Reading package lists... Done  
 Building dependency tree      
 Reading state information... Done  
 The following packages were automatically installed and are no longer required:  
  libgl1-nvidia-glx:i386 libgl1-nvidia-glx-i386:i386 libllvm3.5v5 libnvidia-glcore:i386 linux-image-4.1.0-2-amd64 linux-image-4.2.0-1-amd64 linux-source-4.3 python3-ecdsa syslinux  
  unetbootin-translations  
 Use 'sudo apt autoremove' to remove them.  
 Suggested packages:  
  sqlite3-doc  
 The following NEW packages will be installed:  
  libsqlite3-dev  
 0 upgraded, 1 newly installed, 0 to remove and 510 not upgraded.  
 Need to get 689 kB of archives.  
 After this operation, 2,041 kB of additional disk space will be used.  
 Get:1 http://ftp.us.debian.org/debian testing/main amd64 libsqlite3-dev amd64 3.14.1-1 [689 kB]  
 Fetched 689 kB in 2s (256 kB/s)             
 Selecting previously unselected package libsqlite3-dev:amd64.  
 (Reading database ... 280685 files and directories currently installed.)  
 Preparing to unpack .../libsqlite3-dev_3.14.1-1_amd64.deb ...  
 Unpacking libsqlite3-dev:amd64 (3.14.1-1) ...  
 Setting up libsqlite3-dev:amd64 (3.14.1-1) ...  
   

and try again.

 user@localhost:~/Desktop/gpuqsortlib$ make  
 mkdir -p lib/linux/static  
 mkdir -p lib/linux/shared  
 nvcc -o lib/linux/static/libgpuqsort.a -lib gpuqsort.o  
 nvcc -o lib/linux/shared/libgpuqsort.so -shared gpuqsort.o  
 mkdir -p bin/linux  
 nvcc -o bin/linux/testbench main.o dists.o -lgpuqsort -lglut -L./lib/linux/static -lsqlite3  
 /usr/bin/ld: cannot find -lglut  
 collect2: error: ld returned 1 exit status  
 Makefile:15: recipe for target 'testbench' failed  
 make: *** [testbench] Error 1  
 user@localhost:~/Desktop/gpuqsortlib$ nvcc --version  
 nvcc: NVIDIA (R) Cuda compiler driver  
 Copyright (c) 2005-2015 NVIDIA Corporation  
 Built on Tue_Aug_11_14:27:32_CDT_2015  
 Cuda compilation tools, release 7.5, V7.5.17  

so the library glut (opengl utility toolkit) is not install,

 $ sudo apt-get install freeglut3-dev  
 Reading package lists... Done  
 Building dependency tree      
 Reading state information... Done  
 The following packages were automatically installed and are no longer required:  
  libgl1-nvidia-glx:i386 libgl1-nvidia-glx-i386:i386 libllvm3.5v5 libnvidia-glcore:i386 linux-image-4.1.0-2-amd64 linux-image-4.2.0-1-amd64 linux-source-4.3 python3-ecdsa syslinux  
  unetbootin-translations  
 Use 'sudo apt autoremove' to remove them.  
 The following additional packages will be installed:  
  freeglut3 libice-dev libsm-dev libxt-dev  
 Suggested packages:  
  libice-doc libsm-doc libxt-doc  
 The following NEW packages will be installed:  
  freeglut3 freeglut3-dev libice-dev libsm-dev libxt-dev  
 0 upgraded, 5 newly installed, 0 to remove and 510 not upgraded.  
 Need to get 826 kB of archives.  
 After this operation, 2,941 kB of additional disk space will be used.  
 Do you want to continue? [Y/n] Y  
 Get:1 http://ftp.us.debian.org/debian testing/main amd64 freeglut3 amd64 2.8.1-2 [124 kB]  
 Get:2 http://ftp.us.debian.org/debian testing/main amd64 libice-dev amd64 2:1.0.9-1+b1 [66.3 kB]  
 Get:3 http://ftp.us.debian.org/debian testing/main amd64 libsm-dev amd64 2:1.2.2-1+b1 [35.8 kB]  
 Get:4 http://ftp.us.debian.org/debian testing/main amd64 libxt-dev amd64 1:1.1.5-1 [423 kB]  
 Get:5 http://ftp.us.debian.org/debian testing/main amd64 freeglut3-dev amd64 2.8.1-2 [177 kB]  
 Fetched 826 kB in 2s (373 kB/s)      
 Selecting previously unselected package freeglut3:amd64.  
 (Reading database ... 280696 files and directories currently installed.)  
 Preparing to unpack .../freeglut3_2.8.1-2_amd64.deb ...  
 Unpacking freeglut3:amd64 (2.8.1-2) ...  
 Selecting previously unselected package libice-dev:amd64.  
 Preparing to unpack .../libice-dev_2%3a1.0.9-1+b1_amd64.deb ...  
 Unpacking libice-dev:amd64 (2:1.0.9-1+b1) ...  
 Selecting previously unselected package libsm-dev:amd64.  
 Preparing to unpack .../libsm-dev_2%3a1.2.2-1+b1_amd64.deb ...  
 Unpacking libsm-dev:amd64 (2:1.2.2-1+b1) ...  
 Selecting previously unselected package libxt-dev:amd64.  
 Preparing to unpack .../libxt-dev_1%3a1.1.5-1_amd64.deb ...  
 Unpacking libxt-dev:amd64 (1:1.1.5-1) ...  
 Selecting previously unselected package freeglut3-dev:amd64.  
 Preparing to unpack .../freeglut3-dev_2.8.1-2_amd64.deb ...  
 Unpacking freeglut3-dev:amd64 (2.8.1-2) ...  
 Processing triggers for man-db (2.7.5-1) ...  
 Setting up freeglut3:amd64 (2.8.1-2) ...  
 Setting up libice-dev:amd64 (2:1.0.9-1+b1) ...  
 Setting up libsm-dev:amd64 (2:1.2.2-1+b1) ...  
 Setting up libxt-dev:amd64 (1:1.1.5-1) ...  
 Setting up freeglut3-dev:amd64 (2.8.1-2) ...  
 Processing triggers for libc-bin (2.19-22) ...  

and one more try!

 user@localhost:~/Desktop/gpuqsortlib$ make  
 mkdir -p lib/linux/static  
 mkdir -p lib/linux/shared  
 nvcc -o lib/linux/static/libgpuqsort.a -lib gpuqsort.o  
 nvcc -o lib/linux/shared/libgpuqsort.so -shared gpuqsort.o  
 mkdir -p bin/linux  
 nvcc -o bin/linux/testbench main.o dists.o -lgpuqsort -lglut -L./lib/linux/static -lsqlite3  
 jason@JasonLaptop:~/Desktop/gpuqsortlib$ ./bin/linux/testbench   
   
 Usage:  
    testbench -[m|d|p] uniqueid  
 jason@JasonLaptop:~/Desktop/gpuqsortlib$ ./bin/linux/testbench -m 1  
 Testing 'models'  
 Unable to open file: norm-dragon.dat  

so finally got it compile and run fine.... but looks like there is no input sample file available! If you got beyond this point, leave your comment below and I would like to run on my workstation gpu too!

I have upload source code and compile code here.