Skip to content

nawrotlab/SNN_GeNN_Nest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository contains all accompanying code to reproduce the figures of the following paper:

Felix Schmitt, Vahid Rostami, Martin Nawrot, Efficient parameter calibration and real-time simulation of large scale spiking neural networks with GeNN and NEST

If you use any parts of this code for your own work, please acknowledge us by citing the above paper.

If you have questions or encounter any problems while using this code base, feel free to file a Github issue here and we'll be in touch !

Project layout

  • Data/ contains all simulated data used for the figures of the paper except the spiking data of the gridsearch due to the limitation of filesize. It's split into data of the gridsearches, the simulations of small networks for long periods of time and the simulation of large networks.
  • Docker/ contains a build script for our supplied docker images to run the supplied source code without setting up the enviroment. We did not use these docker files to run our simulations
  • Figures/ containes the scripts togenerate the figures of the paper from the data and the generated figures
  • Source/ containes the Source code of the simulations.
    • Helper/ contains classes for the clustered model in GeNN and NEST, the user speific GeNN models (Neuron models, current sources, ...) and a class to perform gridsearches. The classes of the clustered model can be run directly to test the software enviroment.
    • Defaults/ contains the default parameters of the simulation. It consists of two induvidual files, one for the gridsearch and one for the independent simulatins. All values can be overwritten in the specific simulation scripts.
    • Gridsearch_$Simulator$ contains the gridsearch with the specific $Simulator$ and a folder which contains neccessary scripts to submit the gridsearch as a jo to htcondor.
    • Simulate_$Simulator$ contains the simulation script with the specific $Simulator$ and a folder which contains neccessary scripts to submit the jobs to reproduce the data of figure 3 and 4.

Docker Images

We supply docker images to run our code without installing NEST and GeNN. Images can be found under: https://hub.docker.com/repository/docker/fschmitt/snn_genn_nest. All images contain htcondor as a scheduler and an anconda basic installation. The images are not optimized like containers used in production environments.

The relevant tags to test our code are:

  • genn: Image with htcondor and GeNN with single-threaded CPU support. GeNN is severly limited in this mode, but can be tested without a GPU.

  • nest Image with htcondor and NEST with OpenMP multi-threading, no MPI

  • genn_nest Image with htcondor and both simulators NEST(OpenMP multi-threading, no MPI) and GeNN (single-threaded CPU support)

  • gpu_genn Image with htcondor and GeNN with full support of CPU and GPU. Cuda is installed.

  • gpu_nest Image with htcondor and NEST with OpenMP multi-threading, no MPI. Cuda is installed.

  • gpu_genn_nest Image with htcondor and both simulators NEST(OpenMP multi-threading, no MPI) and GeNN (full support). Cuda is installed.

All tags with a "gpu" prefix contain the CUDA drivers needed to use GeNN on the GPU. GPU drivers can be only used in Docker if the nvidia-container-runtime is installed. We recommend using either the images with GPU support or the ones without as we had to change the base image for the GPU support and thus these two families do not share layers. We decided to not include the source code in the image as it would increase their size and make it harder to edit parameters and collect results. We use a bind-mount to mount the directory with the source code into the image. Unfortunately this creates some problems with the file permission.

Please follow the following steps to run the images:

  1. git clone https://github.com/nawrotlab/SNN_GeNN_Nest.git
  2. chmod -R 777 Source
  3. select a TAG from the list above suitable to your needs and replace it in the following commands.
  4. docker pull fschmitt/snn_genn_nest:TAG
  5. Replace RepoPath/Source with the abolute path to the Source directory in the cloned repository. You can also change the NAME in all following commands, if you like.
  6. GPU: docker run --rm --gpus all --detach --mount type=bind,source=RepoPath/Source,target=/Benchmark --name=NAME fschmitt/snn_genn_nest:TAG
  7. No-GPU: docker run --detach --mount type=bind,source=RepoPath/Source,target=/Benchmark --name=NAME fschmitt/snn_genn_nest:TAG
  8. docker exec -ti NAME /bin/bash
  9. Test the code. You can exit the container by typing exit (if you switched to submituser you have to do this two times)
  10. If you have run some code and you're not member of the sudoers, please run chmod -R 777 /Benchmark from within the docker container. Otherwise you're not able to delete the files later on without restarting the container.
  11. docker stop NAME to stop the container after usage.

You can enter the Benchmark folder and the subfolder of the different experiments. Now you can run the simulation by python SourceCode.py. If you want to reproduce our results, please make sure all previously written data *.pkl is writable by all users (chmod 777 *.pkl) and for GeNN simulation no folder EICluster_CODE exists (rm -RI EICluster_CODE). Now you can enter the appropriate CondorSubmission folder and run su submituser. Experiments can be scheduled by python CondorSubmission.py. By running condor_q you can see the currently scheduled jobs and by condor_history you get the information about finished jobs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published