After an unfortunate incident we had to reinstall the OS on our Linux server. The installation instructions I posted back in September I now realize were a bit sparse; below follows a full blow-by-blow. This is for installation on Ubuntu 16.04 64bit with a NVIDIA GTX 1080 GPU. The reason this is so convoluted is that the current version of MatLab (R2016b) does not support the current version of CUDA (8), and instead only supports an older version (7.5), which in turn does not support the default gcc that ships with 16.04.
By the way apologies to Marius for butchering the name of his software in the post title; and THANK YOU for sharing it!
-Carl
Install the NVIDIA drivers
Install a version of gcc that is supported by CUDA 7.5
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9 g++-4.9Some of these libraries are needed to compile the CUDA samples to test successful CUDA installation (I'm not entirely sure which are necessary, can always uninstall after testing)
sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-devDownload CUDA 7.5 from
https://developer.nvidia.com/cuda-75-downloads-archive For ubuntu 16.04 64bit choose:
- Operating System: Linux
- Architecture: x86_64
- Distribution: Ubuntu
- Version: 15.04 (note that there is no 16.04 version available for CUDA 7.5; however, this version works fine on our system)
- Installer type: runfile(local)
After downloading, navigate to the directory containing the downloaded file and run
sudo sh cuda_7.5.18_linux.run --override- type accept to accept the EULA
- ignore the warning that you are attempting to install on an unsupported configuration by typing y
- type n to decline the graphics driver (the one you've installed is more recent)
- type y to install the CUDA 7.5 toolkit (notes below assumes you accept the default installation folder)
- type y to install the symbolic link
- type y to install the samples (can be used to test that installation was successful; notes assume default installation folder; this folder can be moved or deleted after testing without affecting CUDA)
Edit .bashrc
nano ~/.bashrc
and add this line:
PATH=$PATH:/usr/local/cuda-7.5/binSave, exit and run
source ~/.bashrcCreate and edit a new file:
sudo nano /etc/ld.so.conf.d/CUDAlibs.confand add this line:
/usr/local/cuda-7.5/lib64Save, exit and run (the second command is to confirm all is in order)
sudo ldconfig
/sbin/ldconfig -p | grep cuda-7.5Tell CUDA to use gcc-4.9 instead of the default gcc
Confirm that CUDA installation worked
cd ~/NVIDIA_CUDA-7.5_Samples/5_Simulations/nbody
make
./nbodyKiloSort installation instructions in the readme on GitHub
https://github.com/cortex-lab/KiloSort, reproduced here.
Clone KiloSort and npy-matlab in your code folder
git clone https://github.com/cortex-lab/KiloSort.git
git clone https://github.com/kwikteam/npy-matlab.git
Open Matlab and navigate to KiloSort/CUDA/ folder, run mexGPUall.m
Test successful installation by navigating to KiloSort/eMouse.
First, set correct fpath (line 3) and paths for KiloSort, npy-matlab and config file (lines 7-9). Note that the config file is in KiloSort/eMouse
Then run master_eMouse.m and check output in phy.