Code Monkey home page Code Monkey logo

uci-carl / carlsim3 Goto Github PK

View Code? Open in Web Editor NEW
57.0 19.0 67.0 34.22 MB

CARLsim is an efficient, easy-to-use, GPU-accelerated software framework for simulating large-scale spiking neural network (SNN) models with a high degree of biological detail.

Home Page: http://uci-carl.github.io/CARLsim3

License: GNU General Public License v3.0

Makefile 2.33% C++ 82.78% C 1.81% Cuda 11.70% MATLAB 1.38%
spiking-neural-networks gpu cuda simulation-framework

carlsim3's Introduction

CARLsim 3

Build Status Coverage Status Docs Google group License: GPL v3

CARLsim is an efficient, easy-to-use, GPU-accelerated library for simulating large-scale spiking neural network (SNN) models with a high degree of biological detail. CARLsim allows execution of networks of Izhikevich spiking neurons with realistic synaptic dynamics on both generic x86 CPUs and standard off-the-shelf GPUs. The simulator provides a PyNN-like programming interface in C/C++, which allows for details and parameters to be specified at the synapse, neuron, and network level.

The present release, CARLsim 3, builds on the efficiency and scalability of earlier releases (Nageswaran et al., 2009; Richert et al., 2011). The functionality of the simulator has been greatly expanded by the addition of a number of features that enable and simplify the creation, tuning, and simulation of complex networks with spatial structure. New features include:

  • improved platform compatibility (Linux, Mac OS X, and Windows)
  • real-time and offline data analysis tools
  • a more complete STDP implementation which includes dopaminergic neuromodulation
  • an automated parameter tuning interface that utilizes evolutionary algorithms to construct functional SNNs
  • a test suite for functional code verification
  • an exhaustive User Guide and Tutorials

If you use CARLsim 3 in a scholarly publication, please cite as follows:

Beyeler, M., Carlson, K.D., Chou, T.-S., Dutt, N., Krichmar, J.L. (2015). CARLsim 3: A user-friendly and highly optimized library for the creation of neurobiologically detailed spiking neural networks. Proceedings of the International Joint Conference on Neural Networks, doi:10.1109/IJCNN.2015.7280424

Or use the following bibtex:

@inproceedings{CARLsim3,
	author = {M. Beyeler and K. D. Carlson and T.-S. Chou and N. Dutt and J. L. Krichmar}, 
 	booktitle = {2015 International Joint Conference on Neural Networks (IJCNN)}, 
	title = {{CARL}sim 3: {A} user-friendly and highly optimized library for the creation of neurobiologically detailed spiking neural networks}, 
	year = {2015}, 
	pages = {1-8}, 
	doi = {10.1109/IJCNN.2015.7280424},
	url = {http://dx.doi.org/10.1109/IJCNN.2015.7280424},
	ISSN = {2161-4393}, 
	month = {July}
}

Installation

Detailed instructions for installing the latest stable release of CARLsim on Mac OS X / Linux / Windows can be found in our User Guide.

In brief (OS X/Linux):

  1. Fork CARLsim 3 by clicking on the Fork box in the top-right corner.

  2. Clone the repo, where YourUsername is your actual GitHub user name:

    $ git clone --recursive https://github.com/YourUsername/CARLsim3
    $ cd CARLsim3
    

    Note the --recursive option: It will make sure Google Test gets installed.

  3. Choose between stable release and latest development version:

    • For the stable release, use the stable branch:
      $ git checkout stable
      
    • For the latest development branch, you are already on the right branch (master).
  4. Consider your options: You can choose the installation directory and whether you want GPU support.

    • Installation directory: By default, the CARLsim library lives in /usr/local/lib, and CARLsim include files live in /usr/local/include/carlsim. You can overwrite these by exporting an evironment variable called CARLSIM3_INSTALL_DIR:

      $ export CARLSIM3_INSTALL_DIR=/path/to/your/preferred/dir
      
    • GPU support: By default, CARLsim comes with CUDA support. Obviously, this requires CUDA to be installed first. If you want to run CARLsim without GPU support, you need to export an environment variable called CARLSIM3_NO_CUDA and set it to 1:

      $ export CARLSIM3_NO_CUDA=1
      
  5. Make and install:

    $ make -j4
    $ sudo -E make install
    

    Note the -E flag, which will cause sudo to remember any environment variables you set above (such as CARLSIM3_INSTALL_DIR and CARLSIM3_NO_CUDA).

  6. In order to make sure the installation was successful, you can run the regression suite:

    $ make test
    $ ./carlsim/test/carlsim_tests
    
  7. Start your own project! The "Hello World" project is a goot starting point for this. Make sure it runs:

    $ cd projects/hello_world
    $ make
    $ ./hello_world
    

On Windows 7/10: Simply download the code and open/run the "Hello World" project file projects\hello_world\hello_world.vcxproj.

Prerequisites

CARLsim 3.1 comes with the following requirements:

  • (Windows) Microsoft Visual Studio 2012 or higher.
  • (optional) CUDA Toolkit 5.0 or higher. For platform-specific CUDA installation instructions, please navigate to the NVIDIA CUDA Zone. This is only required if you want to run CARLsim in GPU_MODE. Make sure to install the CUDA samples, too, as CARLsim relies on the file helper_cuda.h.
  • (optional) A GPU with compute capability 2.0 or higher. To find the compute capability of your device please refer to the CUDA article on Wikipedia. This is only required if you want to run CARLsim in GPU_MODE.
  • (optional) MATLAB R2014a or higher. This is only required if you want to use the Offline Analysis Toolbox (OAT).

As of CARLsim 3.1 it is no longer necessary to have the CUDA framework installed. However, CARLsim development will continue to focus on the GPU implementation.

The current release has been tested on the following platforms:

  • Windows 7, 10
  • Ubuntu 12.04, 12.10, 13.04, 13.10, 14.04, 16.04
  • Arch Linux
  • CentOS 6
  • OpenSUSE 13.1
  • Mac OS X

carlsim3's People

Contributors

adfrose avatar eightdatabits avatar jkrichma avatar kobrs avatar kristoforcarlson avatar mbeyeler avatar sigmax avatar staslist avatar tingshuc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

carlsim3's Issues

Is the first argument of setESTDP() presynaptic group or postsynaptic group?

In the example in User Guide, the first argument of setESTDP is presynaptic group (g1) but described as postsynaptic group.

In the example in Tutorial, the first argument is postsynaptic group.

So which one is right? Presynaptic or postsynaptic?

And if it's postsynaptic group, how can I implement the following model:
There are three neuron groups A/B/C. Neuron group A connects to B, neuron group C also connects to B. How can I use plasticity on A->B synapses, and fix synapses of C->B?

Thanks a lot!

Fix Doxygen issues on Windows

Using Doxygen on Windows produces an error: Here is the error message when type "doxygen.exe CARLsim.config.doxy" in command prompt

Generating index page...
explicit link request to 'ch1_getting_started' in layout file 'CARLsimLayout.xml' could not be resolved
...

This might be caused by "@ref" in the layout file:

<tab type="usergroup" visible="yes" title="1. Getting Started" url="@ref ch1_getting_started">

Needs to be replaced with:

<tab type="usergroup" visible="yes" title="1. Getting Started" url="\\ref ch1_getting_started">

However, the double-backslash \\ doesn't work in Linux... There we need a single backslash.
Maybe we can have two different layout and config files; one for Windows, one for Unix.

Fix.

Document InteractiveSpikeGen

The InteractiveSpikeGen class (tools/spike_generators/interactive_spikegen.h) needs documentation and a corresponding section in User Guide Chapter 6, possibly 6.1.4 (make "Generating Custom Spikes" the last subsection of 6.1).

This SpikeGen is similar to PeriodicSpikeGenerator: It produces spike with a certain ISI. However, it's "interactive" because it lets you update the firing rates during the simulation. It also lets you set a different firing rate per neuron.
It also lets you set a "quota" (some number of spikes) to schedule. Each scheduled spike (with appropriate ISI) decrements the quota. Once the quota reaches zero, no more spikes will be scheduled.

Maybe we could also merge this functionality with the existing PeriodicSpikeGenerator...

User Guide Chapter 1: Update installation instructions for GitHub

Chapter 1 has outdated information re: installation as it still mentions the zip file from the CARL website. Update by explaining how to fork/clone the repo, and how to use stable vs master branch.
You can basically copy the installation instructions in the README.md.

Document PrePostGroupSpikeGen

The PrePostGroupSpikeGen class (tools/spike_generators/pre_post_spikegen.h) needs documentation.

I think it generates spikes with a specific pre-post delay (which is useful for STDP testing), but it is undocumented.
Also, it needs a short subsection in Chapter 6 of the User Guide, possibly subsection 6.1.4 (make "Genearting Custom Spikes" the last subsection of 6.1).

Add a Tutorial that shows off spatial connectivity pattern

It would be nice to have a Tutorial that focuses on spatial receptive fields (e.g., Gaussian) and how to investigate created connectivity patterns with the ConnectionMonitor class of the OAT.

Maybe implement a DOG edge detector as suggested by one of our users...

User Guide: Better explain how to set up STDP

It is still not clear how to set up STDP. The User Guide chapter barely mentions the different setSTDP flavors, and the only code snippet that is shown (on DA-STDP) uses the outdated CARLsim::setSTDP version. It is never explained what setSTDP does compared to setESTDP and setISTDP. We should include clear code examples to show which commands to use in which situations.

README: `make test` won't work before gtest is built

Since we include gtest as a submodule, building tests is easy and convenient.

But the README suggests that building the tests is as simple as running make test after checkout. This won't work until gtest has been built—that that takes a few steps.

We should update the README to direct users to the gtest README, and to build the gtest library in the designated path.

Make it easy to build/run JUnit tests for PTI

For a while now, we've had a Makefile for building gtest tests for the C++ component of the parameter-tuning interface (PTI).

The Java portion of PTI also has unit tests, however. I've only ever run them through Netbeans myself, but it would be nice to have a Makefile option so it's convenient for users to run the JUnit tests (if they feel so moved).

Update README for PTI

The README for the parameter-tuning interface is outdated and useless. It needs rewritten to provide installation instructions and pointers to the User's Guide/Tutorial.

User Guide Chapter 1: Tell users to install CUDA samples

Not having the CUDA samples installed will lead to an error at compile time, because we rely on the file helper_cuda.h, which usually resides in /usr/local/cuda/samples/common/inc. Just happened to one user.

We should mention this prominently in User Guide, Chapter 1.

Add Doxygen docs for PTI and include them in the general Doxygen build

To use the parameter-tuning interface, users have to make use of 3 or 4 C++ classes, all of which are undocumented.

There is also some (outdated) Javadoc buried in there somewhere for the Java side of the PTI framework. It's only relevant to people who are writing their own ECJ extensions (the User Guide chapter on ECJ covers all users really need to know), but, for the sake of completeness, there might be a way to merge that documentation with our doxygen build if we felt like it.

Improve User Guide Chapter 11

The Regression Suite chapter is a stub. It needs instructions on:

  • how to install Google Test (Unix/Windows)
  • how to run the tests and verify output (see all green, passing)
  • what the different test cases do and how to add a new one

Also, some of this stuff is outdated. For example, we only provide test cases to A) test core functionality of CARLsim. We don't provide test cases to B) test the reproducibility of published results, and C) to benchmark simulation speed within this context. Those are separate things.

User Guide, Chapter 10: ECJ installation info is out of date

  • Need to document about installing ECJ (basically the steps, after downloading the .jar file from the hyperlink, which include unzipping it, using 'make' on it, and moving it to the appropriate directory).
  • Need to mention the additional software tools required to support ECJ such as 'openjdk', 'ant' etc. Also mention the software VERSIONS that work and the ones that don't, since this is a very common issue.
  • Say how you can verify that ECJ is installed correctly, and if not, what steps to take in order to solve the issue or reinstall ECJ.
  • Remove comment about tools/ecj_pti/user.mk since in the current version of CARLsim there is only one 'user.mk' file which already contains the appropriately set ECJ environment variables. But should mention that the variables (specifically $ECJ_JAR) might need to be modified if a different or newer version of ECJ is installed other than ECJ 22 (or else the 'ec package not found' error persists).
  • Maybe add some general tips and troubleshooting techniques about download and installation

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.