flatironinstitute / ironclust

Spike sorting software being developed at Flatiron Institute, based on JRCLUST (Janelia Rocket Cluster)
Apache License 2.0
28 stars 7 forks source link

Strange error when running ironclust #37

Closed alejoe91 closed 4 years ago

alejoe91 commented 4 years ago

Hi @jamesjun

I get an error when running IC (through spikeinterface):

                            < M A T L A B (R) >
                  Copyright 1984-2018 The MathWorks, Inc.
                   R2018b (9.5.0.944444) 64-bit (glnxa64)
                              August 28, 2018

To get started, type doc.
For product information, visit www.mathworks.com.

===================================================
IronClust Version: 2
===================================================
irc2: cleared all
Running irc2.m (v5.5.12)
    nTime_batch = 15 (batch_sec_drift = 300.0 s)
    nTime_drift = 6 (step_sec_drift = 20.0 s)
Created /home/torkel/apps/spikeinterface/tmp_ironclust/tmp/raw_geom.prm
Read /home/torkel/apps/spikeinterface/tmp_ironclust/ironclust_dataset/raw.mda (1/1), took 0.4s (1146.1 MB/s, 460.8 MB)
    get_prinvec_: took 0.1s
    Detecting 1/1: 4266 spikes found (1246.8 spikes/s, 134.7 MB/s, took 3.4 s)
Detection took 3.5s and used 0.651 GiB (fParfor=0, fGpu=1)
Saving a struct to /home/torkel/apps/spikeinterface/tmp_ironclust/tmp/raw_geom_irc.mat...
    took 0.0s.
Clustering
Calculating drift similarity...
    took 0.0s
get_pc_sort_: feature trimmed 48->45
sort_page_: calculating Rho...
Page 1/1 ----------------------------------------Array indices must be positive integers or logical values.

This is even before running irc install. When I run irc install I get the follwoing:

Installing ironclust (irc.m)
Compiling CUDA codes...
GPU compute capability: 7.5
    /usr/local/cuda/bin/nvcc -ptx -m 64 -arch sm_75 "/home/torkel/apps/sorters/ironclust/matlab/search_min_drift.cu"
    nvcc fatal   : Value 'sm_75' is not defined for option 'gpu-architecture'
    /usr/local/cuda/bin/nvcc -ptx -m 64 -arch sm_75 "/home/torkel/apps/sorters/ironclust/matlab/search_delta_drift.cu"
    nvcc fatal   : Value 'sm_75' is not defined for option 'gpu-architecture'
    /usr/local/cuda/bin/nvcc -ptx -m 64 -arch sm_75 "/home/torkel/apps/sorters/ironclust/matlab/cuda_knn_full.cu"
    nvcc fatal   : Value 'sm_75' is not defined for option 'gpu-architecture'
    /usr/local/cuda/bin/nvcc -ptx -m 64 -arch sm_75 "/home/torkel/apps/sorters/ironclust/matlab/cuda_knn_index.cu"
    nvcc fatal   : Value 'sm_75' is not defined for option 'gpu-architecture'
    /usr/local/cuda/bin/nvcc -ptx -m 64 -arch sm_75 "/home/torkel/apps/sorters/ironclust/matlab/irc_cuda_delta.cu"
    nvcc fatal   : Value 'sm_75' is not defined for option 'gpu-architecture'
    /usr/local/cuda/bin/nvcc -ptx -m 64 -arch sm_75 "/home/torkel/apps/sorters/ironclust/matlab/irc_cuda_rho.cu"
    nvcc fatal   : Value 'sm_75' is not defined for option 'gpu-architecture'
    /usr/local/cuda/bin/nvcc -ptx -m 64 -arch sm_75 "/home/torkel/apps/sorters/ironclust/matlab/irc_cuda_delta_drift.cu"
    nvcc fatal   : Value 'sm_75' is not defined for option 'gpu-architecture'
    /usr/local/cuda/bin/nvcc -ptx -m 64 -arch sm_75 "/home/torkel/apps/sorters/ironclust/matlab/irc_cuda_rho_drift.cu"
    nvcc fatal   : Value 'sm_75' is not defined for option 'gpu-architecture'
    /usr/local/cuda/bin/nvcc -ptx -m 64 -arch sm_75 "/home/torkel/apps/sorters/ironclust/matlab/cuda_knn.cu"
    nvcc fatal   : Value 'sm_75' is not defined for option 'gpu-architecture'
    /usr/local/cuda/bin/nvcc -ptx -m 64 -arch sm_75 "/home/torkel/apps/sorters/ironclust/matlab/cuda_delta_knn.cu"
    nvcc fatal   : Value 'sm_75' is not defined for option 'gpu-architecture'
    Warning: CUDA could not be compiled but IronClust may work fine.
    If not, install CUDA toolkit v9.1 and run "irc install".
    If you encounter error:  nvcc fatal   : Microsoft Visual Studio configuration file 'vcvars64.bat' could not be found...
      1. Copy $VS12/VC/bin/x86_amd64 to $VS12/VC/bin/amd64
      2. Rename $VS12/VC/bin/amd64/vcvarsx86_amd64.bat to vcvars64.bat
    Finished compiling, took 0.6s

I'm running on a Ubuntu 18.04, Matlab2018b, CUDA 9.1, GeForce RTX 2080Ti.

Thanks for the help! Alessio

jamesjun commented 4 years ago

The issue is that your GPU hardware is not supported by CUDA9.1. You should run "irc2 install" instead of "irc install" which is now deprecated. The new version (5.5.13) will compile for CUDA compute capability 3.5 by default which supports a wide range of GPUs. The code performance was similar when I compiled for cuda 3.5 when compared with later versions. The compute capability is set by cuda_arch='sm_35' in default.cfg.

alejoe91 commented 4 years ago

I used irc2 install and the installation runs fine. However I still get this error when running it:

                            < M A T L A B (R) >
                  Copyright 1984-2018 The MathWorks, Inc.
                   R2018b (9.5.0.944444) 64-bit (glnxa64)
                              August 28, 2018

To get started, type doc.
For product information, visit www.mathworks.com.

===================================================
IronClust Version: 2
===================================================
irc2: cleared all
Running irc2.m (v5.5.12)
    nTime_batch = 15 (batch_sec_drift = 300.0 s)
    nTime_drift = 6 (step_sec_drift = 20.0 s)
Created /home/torkel/apps/spikeinterface/tmp_ironclust/tmp/raw_geom.prm
Read /home/torkel/apps/spikeinterface/tmp_ironclust/ironclust_dataset/raw.mda (1/1), took 0.4s (1146.1 MB/s, 460.8 MB)
    get_prinvec_: took 0.1s
    Detecting 1/1: 4266 spikes found (1246.8 spikes/s, 134.7 MB/s, took 3.4 s)
Detection took 3.5s and used 0.651 GiB (fParfor=0, fGpu=1)
Saving a struct to /home/torkel/apps/spikeinterface/tmp_ironclust/tmp/raw_geom_irc.mat...
    took 0.0s.
Clustering
Calculating drift similarity...
    took 0.0s
get_pc_sort_: feature trimmed 48->45
sort_page_: calculating Rho...
Page 1/1 ----------------------------------------Array indices must be positive integers or logical values.

This is with a fresh clone and install of ironclust. Any idea? I haven't encountered this error with previous versions of ironclust. And I get the same error even if I don't run irc2 install.

jamesjun commented 4 years ago

Could you please pull the latest version (5.5.13)? If you still experience the same problem, could you please share the dataset with me?

-James

On Fri, Jan 24, 2020 at 12:10 PM Alessio Buccino notifications@github.com wrote:

I used irc2 install and the installation runs fine. However I still get this error when running it:

                        < M A T L A B (R) >
              Copyright 1984-2018 The MathWorks, Inc.
               R2018b (9.5.0.944444) 64-bit (glnxa64)
                          August 28, 2018

To get started, type doc. For product information, visit www.mathworks.com.

=================================================== IronClust Version: 2

irc2: cleared all Running irc2.m (v5.5.12) nTime_batch = 15 (batch_sec_drift = 300.0 s) nTime_drift = 6 (step_sec_drift = 20.0 s) Created /home/torkel/apps/spikeinterface/tmp_ironclust/tmp/raw_geom.prm Read /home/torkel/apps/spikeinterface/tmp_ironclust/ironclust_dataset/raw.mda (1/1), took 0.4s (1146.1 MB/s, 460.8 MB) getprinvec: took 0.1s Detecting 1/1: 4266 spikes found (1246.8 spikes/s, 134.7 MB/s, took 3.4 s) Detection took 3.5s and used 0.651 GiB (fParfor=0, fGpu=1) Saving a struct to /home/torkel/apps/spikeinterface/tmp_ironclust/tmp/raw_geom_irc.mat... took 0.0s. Clustering Calculating drift similarity... took 0.0s get_pcsort: feature trimmed 48->45 sortpage: calculating Rho... Page 1/1 ----------------------------------------Array indices must be positive integers or logical values.

This is with a fresh clone and install of ironclust. Any idea? I haven't encountered this error with previous versions of ironclust. And I get the same error even if I don't run irc2 install.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/flatironinstitute/ironclust/issues/37?email_source=notifications&email_token=ACEHBOAVSIHKBCCF5R3RL5TQ7MOIHA5CNFSM4KLF4EEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ3ORFY#issuecomment-578218135, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACEHBOHVVW7GNR4EQNOGKUTQ7MOIHANCNFSM4KLF4EEA .

alejoe91 commented 4 years ago

I used the latest master commit 5.5.14 and it works now :) Both with and without GPU. Thanks!