quick_start
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
quick_start [2016/08/18 17:46] – [Running a second simulation] zenke | quick_start [2017/09/29 10:57] (current) – [Running a first simulation] Fixes example code zenke | ||
---|---|---|---|
Line 4: | Line 4: | ||
First, install cmake, git and some additional packages. Under Ubuntu or Debian simply | First, install cmake, git and some additional packages. Under Ubuntu or Debian simply | ||
< | < | ||
- | now download and compile Auryn with the following commands | + | on any other platform you will need to install a C++ compiler a few [[manual: |
< | < | ||
git clone https:// | git clone https:// | ||
Line 10: | Line 10: | ||
./ | ./ | ||
</ | </ | ||
- | This will checkout the '' | + | This will checkout the '' |
===== Running a first simulation ===== | ===== Running a first simulation ===== | ||
- | Now, let's run a first small Auryn simulation: | + | Now, let's run a first small Auryn simulation |
< | < | ||
- | cd examples | + | zenke@possum: |
- | ./ | + | zenke@possum: |
+ | zenke@possum: | ||
+ | [=========================] 100% t=1.0s | ||
+ | ( 0) Freeing ... | ||
</ | </ | ||
- | This will only take a few milliseconds and generate a bunch of Poisson spikes. If you have gnuplot installed (sudo apt-get install gnuplot) you can visualize them from the command line with | + | This will only take a few milliseconds and generate a bunch of Poisson spikes |
< | < | ||
echo "plot ' | echo "plot ' | ||
</ | </ | ||
- | {{ : | + | {{ : |
For more details on this example go [[examples: | For more details on this example go [[examples: | ||
- | ===== Running a second | + | ===== Running a network |
- | Okay nice, let's do the same again for an actual network. Let's run a small version of Vogels Abbott | + | Okay nice, let's do the same again for an actual network. Let's run a small balanced net, the [[examples: |
<code shell> | <code shell> | ||
zenke@possum: | zenke@possum: | ||
Line 63: | Line 66: | ||
{{ :: | {{ :: | ||
- | ===== Running a network | + | ===== Running a first parallel |
- | Now let's run the same using four CPUs in parallel: | + | Often your simulations will be slow to run, which is when it becomes important to run them using multiple CPUs or even multiple computers. |
<code shell> | <code shell> | ||
zenke@possum: | zenke@possum: | ||
Line 91: | Line 94: | ||
</ | </ | ||
You just ran your first parallel simulation. As you can see this has generated more output files. If you plot the same one as before, you will seee something like this: | You just ran your first parallel simulation. As you can see this has generated more output files. If you plot the same one as before, you will seee something like this: | ||
- | {{ :: | + | {{ :: |
there are fewer spikes. | there are fewer spikes. | ||
In fact, there are about one quarter of the spikes as compared to the plot above. | In fact, there are about one quarter of the spikes as compared to the plot above. | ||
The reason is that each CPU simulates a fraction of all the neurons and writes their spikes to independent output files. This way the simulation can run on physically different computers and the files can be written to independent disks. | The reason is that each CPU simulates a fraction of all the neurons and writes their spikes to independent output files. This way the simulation can run on physically different computers and the files can be written to independent disks. | ||
- | + | However, for your analysis you might want to merge them, which can be done easily on the Linux command line with the sort command | |
- | However, for your analysis you might want to merge them again: | + | |
< | < | ||
zenke@possum: | zenke@possum: | ||
</ | </ | ||
Plotting the spikes in '' | Plotting the spikes in '' | ||
- | {{ :: | + | {{ :: |
which should look similar to the network that was simulated using only a single CPU. In this case it won't look the same, because we used a different random seed for the connectivity matrix every time. | which should look similar to the network that was simulated using only a single CPU. In this case it won't look the same, because we used a different random seed for the connectivity matrix every time. | ||
- | ===== Next steps ===== | + | ====== Next steps ====== |
- | + | ||
- | After you have [[manual: | + | |
- | **Running in parallel with MPI.** | + | After you have [[manual: |
- | Auryn natively compiles against MPI and most of the time you will want to use in parallel to get good performance. Parallel execution is relatively simple. See [[manual:parallel_execution|how it's done]]. | + |
quick_start.txt · Last modified: 2017/09/29 10:57 by zenke