Skip to content
Neurokernel Project
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
benchmarks Moving code for timing communication performance to benchmarks/ Mar 9, 2016
examples/neuroml Moving code for timing communication performance to benchmarks/ Mar 9, 2016
neurokernel fixed graph_to_df for networkx < 2.0 and remove attempts to make node… Jul 26, 2018
tests Fixed tests and added support for mpi4py version 3 (#57) Apr 10, 2018
.gitignore fixed bug in photoreceptor, added option for simulation of image with… Jul 25, 2014
CHANGES.rst Tweak CHANGES.rst. Nov 23, 2014
LICENSE.rst Update copyright date. Feb 9, 2015 removed untracked files from Nov 24, 2015
README.rst Add script for checking installed CUDA version. Nov 21, 2014 Modify to avoid hacky installation of namespace,… Nov 17, 2015 Don't need pytables anymore. Mar 8, 2016
tox.ini Add tox.ini. Sep 30, 2014



Package Description

Project Website | GitHub Repository | Online Documentation | Mailing List | Forum

Neurokernel is a Python framework for developing models of the fruit fly brain and executing them on multiple NVIDIA GPUs.

Support the project


Neurokernel requires

  • Linux (other operating systems may work, but have not been tested);
  • Python 2.7 (Python 3.0 is not guaranteed to work);
  • at least one NVIDIA GPU with Fermi architecture or later;
  • NVIDIA's GPU drivers;
  • CUDA 5.0 or later;
  • OpenMPI 1.8.4 or later compiled with CUDA support.

To check what GPUs are in your system, you can use the inxi command available on most Linux distributions:

inxi -G

You can verify that the drivers are loaded as follows:

lsmod | grep nvidia

If no drivers are present, you may have to manually load them by running something like:

modprobe nvidia

as root.

Although some Linux distributions do include CUDA in their stock package repositories, you are encouraged to use those distributed by NVIDIA because they often are more up-to-date and include more recent releases of the GPU drivers. See this page for download information.

If you install Neurokernel in a virtualenv environment, you will need to install OpenMPI. See this page for OpenMPI installation information. Note that OpenMPI 1.8 cannot run on Windows.

Some of Neurokernel's demos require either ffmpeg or libav installed to generate visualizations (see Examples).


Download the latest Neurokernel code as follows:

git clone

Since Neurokernel requires a fair number of additional Python packages to run, it is recommended that it either be installed in a virtualenv or conda environment. Follow the relevant instructions below.


See this page for virtualenv installation information.

Create a new virtualenv environment and install several required dependencies:

cd ~/
virtualenv NK
~/NK/bin/pip install numpy cython numexpr pycuda

If installation of PyCUDA fails because some of the CUDA development files or libraries are not found, you may need to specify where they are explicitly. For example, if CUDA is installed in /usr/local/cuda/, try installing PyCUDA as follows:

CUDA_ROOT=/usr/local/cuda/ CFLAGS=-I${CUDA_ROOT}/include \
LDFLAGS=-L${CUDA_ROOT}/lib64 ~/NK/bin/pip install pycuda

Replace ${CUDA_ROOT}/lib with ${CUDA_ROOT}/lib64 if your system is running 64-bit Linux. If you continue to encounter installation problems, see the PyCUDA Wiki for more information.

Run the following to install the remaining Python package dependencies listed in

cd ~/neurokernel
~/NK/bin/python develop


Note that conda packages are currently only available for 64-bit Ubuntu Linux 14.04. If you would like packages for another distribution, please submit a request to the Neurokernel developers.

First, install the following Ubuntu packages:

  • libibverbs1
  • libnuma1
  • libpmi0
  • libslurm26 (libslurm29 for Ubuntu 16.04)
  • libtorque2

These are required by the conda OpenMPI packages prepared for Neurokernel. Ensure that the stock Ubuntu OpenMPI packages are not installed because they may interfere with the ones that will be installed by conda. You also need to ensure that CUDA has been installed in /usr/local/cuda.

Install conda by either installing Anaconda or Miniconda. Make sure that the following lines appear in your ~/.condarc file so that conda can find the packages required by Neurokernel:

- neurokernel/channel/ubuntu1404
- defaults

Create a new conda environment containing the packages required by Neurokernel by running the following command:

conda create -n NK neurokernel_deps

PyCUDA packages compiled against several versions of CUDA are available. If you need one compiled against a specific version that differs from the one automatically installed by the above command, you will need to manually install it afterwards as follows (replace cuda75 with the appropriate version):

source activate NK
conda install pycuda=2015.1.3=np110py27_cuda75_0
source deactivate

Activate the new environment and install Neurokernel in it as follows:

source activate NK
cd ~/neurokernel
python develop


Introductory examples of how to use Neurokernel to build and integrate models of different parts of the fly brain are available in the Neurodriver package. To install it run the following:

git clone
cd ~/neurodriver
python develop

Other models built using Neurokernel are available on GitHub.

Building the Documentation

To build Neurokernel's HTML documentation locally, you will need to install

Once these are installed, run the following:

cd ~/neurokernel/docs
make html

Authors & Acknowledgements

See the included AUTHORS file for more information.


This software is licensed under the BSD License. See the included LICENSE file for more information.


The Neurokernel Project is independent of the NeuroKernel Operating System developed by NeuroDNA Computer.

You can’t perform that action at this time.