fraimondo / cudaica

GNU General Public License v3.0
10 stars 8 forks source link

Encounter ERROR: no kernel image is available for execution on the device #7

Open CloudyDory opened 6 years ago

CloudyDory commented 6 years ago

Hi, thanks for the toolbox. When I run it in Matlab, I met the following error: ERROR::no kernel image is available for execution on the device (30) in src/centering.cu at line 130

The full output in MATLAB is:

cudaica: using source file '/mnt/D/Users/Yunhui/Program/MATLAB/Add-Ons/Toolboxes/eeglab14_1_1b/plugins/CudaICA1.0/cudaica.sc'
cudaica(): using binary ica file '/mnt/D/Users/Yunhui/Program/MATLAB/Add-Ons/Toolboxes/eeglab14_1_1b/plugins/CudaICA1.0/cudaica.m'
cudaica(): processing one (flag, arg) pair.
   setting extended, 1
scriptfile = cudaica8147.sc

cudaica(): ica script file cudaica8147.sc data /home/yunhui/Downloads/Subj10/cudaica8147.fdt pwd /home/yunhui/Downloads/Subj10.

Running ica from script file cudaica8147.sc
Starting CUDAICA v-1 with floating point numbers size = 8 bytes
=====================
List of cuda devices:
=====================

Device: 0
CUDA Device capabilities:
    Name: GeForce GTX 1050 Ti
    Global Mem: 4235001856
    Mem: 4235001856
    Mem per Block: 49152
    Regs per Block: 65536
    Warp size: 32
    Mem pitch: 2147483647
    Max Threads per Block: 1024
    Max Threads Dim: 1024 x 1024 x 64
    Max Grid Size: 2147483647 x 65535 x 65535
    Total Const Mem: 65536
    Major: 6
    Minor: 1
    Clock Rate: 1620000
    Texture Alignment: 512
    Device Overlap: 1
    Multiprocessor Count: 6
    Kernel Timeout Enabled: 1
    Integrated: 0
    Can Map host mem: 1
    Compute mode: 0
    Concurrent kernels: 1
    ECC Enabled: 0
    PCI Bus ID: 1
    PCI Device ID: 0
    TCC Driver: 0

Selecting device 0 Success!
Max linear free mem = 3766441984 bytes (aprox 3678166 samples, 128 channels)
=====================

====================================
 Opening config file 
====================================

====================================
          Configuration

    datafile = /home/yunhui/Downloads/Subj10/cudaica8147.fdt
    nchannels = 64
    nsamples = 174375
    weightsoutfile = /home/yunhui/Downloads/Subj10/cudaica8147.wts
    sphereoutfile = /home/yunhui/Downloads/Subj10/cudaica8147.sph
    sphering = on
    biasing = on
    extblocks = 1
    pca = 0
    weightsinfile = (null)
    lrate = 0.0001000000000000
    block = 0
    nochange = 0.0000001000000000
    maxsteps = 512
    posact = off
    annealstep = 0.9800000000000000
    annealdeg = 60.0000000000000000
    momentum = 0.0000000000000000
    nsub = 1
    pdfsize = 6000
    urextblocks = 1
    signsbias = 0.0200000000000000
    extended = on
    verbose = 2
    seed = 1524831701
    activationsfile = (null)
    biasfile = (null)
    signfile = (null)
====================================

====================================
 Pre processing
====================================

Loading dataset...Done!
ERROR::no kernel image is available for execution on the device (30) in src/centering.cu at line 130
Centering dataset...Error using floatread (line 148)
floatread() fopen() error.
Error in cudaica (line 340)
    wts = floatread(weightsfile,[ncomps Inf],[],0);

I am using Ubuntu 16.04.4 on a machine with NVIDIA GTX 1050 Ti. The NVIDIA driver version is 384.111, and the installed CUDA Toolkit version is 9.0.

Can anyone help me on this problem?

CloudyDory commented 6 years ago

Well I add a line 61 = Compute Capability 6.1 to the configure.ac file and the compiled binary seems to work. Don't know if it can produce the correct result.

fraimondo commented 6 years ago

Hi,

So far I have not tested this with 6.1.

After modifying configure.ac, did you specify --with-cuda-arch=61 when configuring?

CloudyDory commented 6 years ago

Yes, I specify --with-cuda-arch=61 when configuring.

Also I need the change line 133 of configure.ac from: NVCCFLAGS="-DDEBUG=${DEBUG} -G -g -gencode=arch=compute_${CUDA_COMPUTE_ARCH},code=sm_${CUDA_ARCH} --ptxas-options=\"-v\" " to NVCCFLAGS="-DDEBUG=${DEBUG} -G -g -gencode=arch=compute_${CUDA_COMPUTE_ARCH},code=sm_${CUDA_ARCH} --ptxas-options=-v " to configure it successfully. Otherwise it will produce to following error if I specify --enable-debug=2 option:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... none
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... none
checking gcc version... 5.4.0
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for g77... no
checking for xlf... no
checking for f77... f77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether f77 accepts -g... yes
checking how to get verbose linking output from f77... -v
checking for Fortran 77 libraries of f77...  -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. -lgfortran -lm -lquadmath
checking for dummy main to link with Fortran 77 libraries... none
checking for Fortran 77 name-mangling scheme... lower case, underscore, no extra underscore
checking if sgemm_ is being linked in already... no
checking for ATL_xerbla in -latlas... no
checking for sgemm_ in -lblas... yes
checking for dgemm_ in -ldgemm... no
checking for sgemm_ in -lmkl... no
checking for sgemm_ in -lcxml... no
checking for sgemm_ in -ldxml... no
checking for sgemm_ in -lscs... no
checking for sgemm_ in -lcomplib.sgimath... no
checking for sgemm_ in -lblas... (cached) yes
checking for sgemm_ in -lessl... no
checking for sgemm_ in -lblas... (cached) yes
checking for cheev_... no
checking for cheev_ in -llapack... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking size of long... 8
Architecture 61 61 61
./evalrev: 1: ./evalrev: git: not found
checking for nvcc... /usr/local/cuda/bin/nvcc
checking nvcc version... 9.0
checking cuda toolkit version... 9
checking whether nvcc works... ptxas fatal   : Input file '"-v"' could not be opened
ptxas fatal   : Ptx assembly aborted due to errors
configure: error: CUDA compiler is not working right.