Cool new benchmark program, SpikeFun - Biological Neural Network Simulator.

grimpr

Golden Member
Aug 21, 2007
1,095
7
81
SpikeFun - Biological Neural Network Simulator

http://www.dimkovic.com/node/1
http://www.dimkovic.com/distrib/SpikeFun_Latest.zip

SpikeFun is a small simulator of the biological neuron networks, which I am writing as a hobby and which is implementing Eugene Izhikevich’s phenomenological model of spiking neurons, AMPA, NMDA and GABA synaptic receptor kinetics as well as long-term and short-term synaptic plasticity. SpikFun is using information obtained from Diffusion Spectrum Imaging (DSI) for guiding of pyramidal neuron axons through the white matter. Neurons have multiple compartments and axonal bifurcations (where applicaple).

SpikeFun is currently in a very early phase of development so expect lots of updates in the near future.

Please note that SpikeFun is very resource intensive - especially in terms of memory bandwidth (for example: even mild bumps in DDR3 speed would significantly speed-up the simulation). Current speed limits are mostly due to the memory I/O (e.g. ~0.25x real-time for a simulation of 32768 multi-compartment neurons and 1.8 million synapses on the modern Intel Xeon E5 2690 with DDR3 RAM operating @2133 MHz) . I plan to implement support for heterogeneous architectures (CPU + GPU) as well as support for Intel's FMA instructions (for 2013 CPUs) in the near future.

In order to perform system performance testing, SpikeBenchmark is
using DigiCortex engine which is simulating mammalian cortex (to be
more precise: thalamocortical system). Neuron modeling is
phenomenological and biophysically accurate to the level of spike
responses.

As large-scale biological simulation such as this is extremely CPU and
even more so memory intensive, SpikeBenchmark can be used as a good
tool for system performance measurement, especially regarding memory
bandwidth and, to some extent, CPU floating point calculation
performance.

There are 4 default benchmarks offered by SpikeBenchmark:
- [1] Small-scale simulation (32768 neurons, ~1.8 million
synapses): recommended for benchmarking desktop PCs
[2] Small-scale simulation benchmark (same as 1) with maximum
memory bandwidth tested (basically running the simulation in
‘silent’ state with no active neurons): recommended for
benchmarking of the memory subsystem of the desktop PC
[3] Large-scale simulation benchmark (262144 neurons, ~37 million
synapses): recommended for benchmarking servers/workstations.
Please note: this preset requires at least 6 GB of RAM
[4] Large-scale simulation benchmark (same as 3) with maximum
memory bandwidth tested (basically running the simulation in
‘silent’ state with no active neurons): recommended for
benchmarking of the memory subsystem of the server/workstation
system. Please note: this preset requires at least 6 GB of RAM
SpikeBenchmark is also able to measure and log consumed memory
bandwidth on Intel(r) Sandy Bridge EP (‘Jaketown’) CPUs. During the
benchmark, CPU power draw as well as IPC rate will be logged on
supported Intel(r) CPUs, using hardware performance monitoring unit
(PMU).

Some notes:

For CPUs without AVX support, 32-bit builds are typically ~5-10% faster than 64-bit builds
For CPUs with AVX support, 64-bit builds are typically ~10% faster than 32-bit builds
64-bit builds require 64-bit Windows™ OS to run and allow simulations that require more than 4 GB of RAM
AVX support requires AVX-aware OS (Windows 7 SP1, Windows Server 2008 R2 SP1 or with hotfix 2517374)
SpikeFun can also run on Linux using Wine adaptation layer (OpenGL compatibility might vary). AVX support requires Linux Kernels 2.6.30 or later
SpikeFun requires CPUs with at least SSE3 instruction set (such as Intel Pentium™ 4 or compatible CPUs)
OpenGL visualizations require GPU supporting OpenGL 2.0 (including shaders)
 

psyq321

Junior Member
Jun 18, 2012
11
1
71
Wow, I did not believe my little pet project would be mentioned @AnandTech forums... Thanks @grimpr!

SpikeFun basically models cortical and thalamic neurons to the level of spike response - as it also models synaptic receptors it requires enormous amounts of RAM.

To achieve high accuracy, the simulation process requires "touching" every synaptic receptor during each simulation step, this means that truly gigantic levels of memory bandwidth are needed.

Just as an example - simulation of mere 32768 neurons with ~2 million synaptic receptors would require ~120 GB/s of raw memory bandwidth to achieve real-time performance. My home test rig, dual-Xeon 2687W with overclocked ECC RAM (running @2133 MHz) can achieve ~69 GB/s.

This means that SpikeFun can be very good at benchmarking of the memory subsystem.

This is not to say that SpikeFun is not able to stress a CPU - unless you have 8 cores, it is still possible to pin the 6-core 3930K or 3960X to 100% with DDR3 1866 RAM... If you have a 4-core CPU and not some crazy DDR3-2800 or smth RAM, it will be the CPU which is a bottleneck.

All in all, a simple rule applies:

- If you have very high number of cores (8 or more) SpikeFun will be memory-I/O bound, and therefore it will most likely completely saturate CPU's IMC - making it very nice memory subsystem benchmark test case. With my 16-core system, CPU utilization is ~90% for all cores as it is impossible to get enough data from the IMC to keep the CPUs 100% busy.

- If you have low number of cores (e.g. 2, 4) and fast DDR3 memory, SpikeFun will be CPU-bound and it will utilize CPU completely (100%, all cores). In this case, it is a very good CPU benchmarking tool for floating-point intensive tasks.

In general, SpikeFun benchmark is a good indicator of performance of the system for neuroinformatics / biological simulations-type of tasks where data sets are large.

Thanks to its heavy usage of AVX instruction set and massive multi-threading, it is able to reliably saturate even the latest generation Intel CPUs (either cores themselves, or IMC - depending on the system, see above).
 

grimpr

Golden Member
Aug 21, 2007
1,095
7
81
Awesome! I saw that you use Intels Performance Counter Monitor for monitoring realtime the CPU, can you make it a separate package from Spikefun? a small nifty monitoring program with a nice gui using Intels Performance Counter Monitor would be so awesome, thanks for all the code Ivan.
 

psyq321

Junior Member
Jun 18, 2012
11
1
71
I though about this idea! I think I will do it but it might take some time because the OpenGL code used in SpikeFun is very coupled with the rest of the code, so I might have to write something from the scratch just for performance monitoring purposes.

By the way, I just released v0.75 which now includes support for Ivy Bridge hardware monitoring in benchmark mode.

I also benchmarked my new laptop (2012 Sony Vaio Z with quad core Ivy Bridge):

http://www.dimkovic.com/node/20

Interesting fact is that Ivy Bridge 3612QM (the only 35W quad-core part) is not much slower compared to its "big brother" 3820QM. In Sony Vaio Z, it can run indefinitely at 2.7 GHz (max 4-core turbo) without breaking a sweat, unless you do not stress the GPU (in which case CPU turbo drops to ~2.4-2.5 GHz). I ran it for ~10 minutes, and it stayed at 2.7 GHz and ~85 C.
 

psyq321

Junior Member
Jun 18, 2012
11
1
71
v1.20 has been released, with support for Skylake EP/EX ("Purley") with AVX-512, more than 64 CPUs and hardware performance monitoring support for Broadwell, Broadwell-EP/EX and Skylake (desktop/notebook).

There is also support for memory bandwidth measurement on select desktop/notebook platforms (in addition to Xeon EP/EX line), this should run on Haswell, Broadwell and Skylake desktop/notebook products.
 
  • Like
Reactions: thepaleobiker

psyq321

Junior Member
Jun 18, 2012
11
1
71
V1.33 now has a new benchmark (spikebenchmark_v104_ws_server.bat) which simulates 1 million neurons with 210 million synapses. Just for comparison, AnandTech is using 32768 neurons with ~1.8 million synapses in their current test suite.

The new benchmark is aimed more towards very high end systems (so 16+ core HEDT, dual-socket workstations and 4S/8S servers).

Here are some results based on several Skylake SP, Haswell EP and Broadwell EX systems with up to 160 cores:

http://www.digicortex.net/node/20

If someone wants to give it a try, download the latest DigiCortex from http://www.digicortex.net/node/7 and run spikebenchmark_v104_ws_server.bat

It will output results in a CSV file spikebenchmark_bench_results.txt - where two last columns are the actual performance results (network creation time in ms and simulation speed).