-
Notifications
You must be signed in to change notification settings - Fork 17
Home
About BrainGrid
Acknowledgements
FAQ
Multiple simulation architectures:
- Single-threaded
- Multi-threaded
- GPU (CUDA)
- GPU (AMP)
- GPU (OpenMP) --not yet implemented--
- GPU (IOCP) --not yet implemented--
- GPU (OpenCL) --not yet implemented--
Supported operating systems:
- Microsoft Windows
- Linux Distributions
Running the simulator
To run the simulator, invoke the exe you just built. BrainGrid requires at least one parameter:
./growth -t input.xml.
This input file provides simulation parameters and the name of the output file. If you wish to provide the output file name on the command line, you can use this syntax:
- ./growth -t input.xml -o output.xml.
- “-w” option specifies the name of an output file, which saves the memory image of neurons, synapses, firing rate, and radii of the final state.
- “-r” option specifies the name of an input files, which was saved by “-w” option. When the option is added, the simulator restores the previous state and continues simulation.
- “-d” option is for the GPU version only, and specifies the device ID of GPU.
- “-s” option specifies the name of stimulus input file that provides parameters for external stimulus input.
Tools
- GitHub
- MATLAB
Linux Distributions
Upon downloading and extracting the contents of the project, the following steps should be followed to run the simulation.
- In a terminal window, navigate to the main project folder.
- Run the
|make growth|
command, which will compile the entire project. - Upon completion, run the command
|./growth -t <input file>|
where|<input file>|
is the full address of the configuration file, examples of which were in the|config|
folder. - The program will then run and display the current step and epoc of the simulation. The output of the simulation (after the end of the simulation) will be saved in the
|output|
folder.
Advanced Use
Use of the UNIX command |screen|
is recommended in order to allow the process to run in the background. As the simulation is running, the |Ctrl+A and D|
keys will detach the currently running screen. The simulation will continue running in the background, while recording the output of the simulation to the seperate screen. At this point the user is free to log out of the machine. To resume viewing the seperate screen, log back into the machine and use the command |screen -r|
. This reattaches the screen. As you might imagine using the unix |screen|
tool is essential to running the simulation on a remote machine.
For advanced users, the GCC compiler offers multiple optimization options that may provide some additional speed boost for the CPU-side simulation. It is recommended that, for each level of optimization, the output be verified against less optimized output. The BrainGrid team DOES NOT recommend using any optimization levels above -02. This level of optimization seems to be unstable, and does not seem to maintain consistent output results.
Microsoft Windows
TODO
This installation guideline will assume that you are using Ubuntu as your primary Linux (sorry, GNU/Linux) operating system. The basic steps however, should translate across most distros.
- Download CUDA from nVidia
- Install any needed libraries and tools (e.g. gcc, linux-source, etc.)
- Install nVidia Driver
- Update your PATH, and LD_LIBRARY_PATH prior to installing
- Install CUDA
GitHub is a source-control system oriented towards the open source community. It offers multiple different >features that are advantageous for the project, the most important of which the ability to manage multiple >separate versions of the project’s code. This allows the project’s developers the ability to tackle >multiple different features and/or bugs.
In order to use GitHub, several tools have been released. The Microsoft Windows, Apple Macintosh software >are available on their website. On Linux distributions, the console is used to manipulate code. As such, >the following are instructions on how to install and use GitHub on Linux distributions, focusing on the >Ubuntu variety. These instructions assume that the user has already registered with GitHub.
First, the operating system must be updated, and then use apt-get to install GitHub:
sudo apt-get update
sudo apt-get install git
Next, the username and email settings must be configured properly.
git config --global user.name <USERNAME HERE>
git config --global user.email <EMAIL HERE>
This is when the source code needs to be downloaded from the remote repository. Navigate to the folder where the source code is to be held:
git clone git://github.com/UWB-Biocomputing/BrainGrid.git
Once the source code is downloaded, the BrainGrid subfolder will be where all the code modifications will occur. Navigate to this subfolder, and use:
git branch -r
To view the multiple available remote branches (different variations of the code that exist outside the local computer). The GitHub webpage will contain more information about each branch, and how the source code varies in between them. In order to checkout a remote branch, use:
git branch <LOCAL NAME> origin/<REMOTE BRANCH NAME>
Where \verb|| is the name that will represent the local copy of the code. Once this is done, switching in between different local branches can be done by using:
git checkout <LOCAL NAME>
To update a local branch with code on the remote version of the branch, use:
git pull
To save the modifications to the local branch, use:
git commit -a -m "`<MESSAGE HERE>"'
To move those changes to the remote branch, use:
git push
Note that Git will prompt the user for additional information.
Additional information can be found here:
Git Crash Course
MatLab
For users with MathWork's MATLAB, a subfolder is included with the some sample files that correctly parse BrainGrid's output for use in MATLAB. The project currently only supports output generation during the end of the simulation, but pseudo real-time output may be implemented in the future.
Linux Crash Course
Getting Things Running
Udacity Introduction to Parallel Programming
Udacity Introduction to Parallel Programming Wiki