Skip to content

Commit

Permalink
Merge branch 'release-v0.8.0' for beta release
Browse files Browse the repository at this point in the history
Conflicts:
	examples/sim_coba_binmon.cpp
	tools/aube.cpp
  • Loading branch information
Friedemann Zenke committed Aug 11, 2016
2 parents 1576b45 + 1982206 commit 9992f3d
Show file tree
Hide file tree
Showing 215 changed files with 330,692 additions and 4,866 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
*.l[oa]
*/.libs

*.pyc


# Ignore docs
docs/*

Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ install:
- sudo apt-get install -y -qq libboost-all-dev openmpi-bin libopenmpi-dev
- sudo apt-get install -y -qq cmake
script:
- mkdir build && cd build && cmake ../ -DCMAKE_BUILD_TYPE=Release && make
- cd build/release && cmake ../../ -DCMAKE_BUILD_TYPE=Release && make && cd ../../test && ./run_tests.sh

notifications:
email:
Expand Down
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ project (Auryn)

# The version number.
set (Auryn_VERSION_MAJOR 0)
set (Auryn_VERSION_MINOR 6)
set (Auryn_VERSION_MINOR 7)

# Important GCC Compiler flags for Auryn's performance
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native -ffast-math")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native -ffast-math -pipe")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pedantic")

# Display flags (for debugging only)
Expand All @@ -18,7 +18,11 @@ FIND_PACKAGE(MPI REQUIRED)

# Required Boost libraries
SET(BOOST_MIN_VERSION "1.41.0")
FIND_PACKAGE(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS mpi serialization program_options date_time)
FIND_PACKAGE(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS mpi serialization program_options date_time unit_test_framework)

# Recommended: Doxygen
FIND_PACKAGE(Doxygen)


INCLUDE_DIRECTORIES( ${MPI_CXX_INCLUDE_PATH} )
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIRS} )
Expand All @@ -28,3 +32,5 @@ ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(examples)
ADD_SUBDIRECTORY(tools)

# Unit tests
ADD_SUBDIRECTORY(test/src)
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ To download and compile the examples try:

```
sudo apt-get install cmake git build-essential libboost-all-dev
git clone https://github.com/fzenke/auryn.git && cd auryn
mkdir build && cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release && make
git clone https://github.com/fzenke/auryn.git && cd auryn/build/release
./bootstrap.sh && make
```

Documentation & Installation/Use
Expand Down Expand Up @@ -60,6 +59,6 @@ Bibtex:
```


Copyright 2014-2015 Friedemann Zenke.
Copyright 2014-2016 Friedemann Zenke.
Copying and distribution of this file, with or without modification, are
permitted provided the copyright notice and this notice are preserved.
4 changes: 4 additions & 0 deletions build/debug/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

cmake ../../ -DCMAKE_BUILD_TYPE=Debug && make

4 changes: 4 additions & 0 deletions build/profiling/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

cmake ../../ -DCMAKE_CXX_FLAGS=-pg -DCMAKE_BUILD_TYPE=Release && make

4 changes: 4 additions & 0 deletions build/release/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

cmake ../../ -DCMAKE_BUILD_TYPE=Release

41 changes: 41 additions & 0 deletions build/release/plot_benchmark_results.gnu
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/gnuplot

set out 'benchmark_results.pdf'
set term pdf size 7.0, 2.4

unset key

set border 3
set xtics nomirror out
set ytics nomirror out
set xtics rotate # by -45

set boxwidth 0.8



set boxwidth 1.0
set style histogram errorbars gap 1.0 lw 1
set style data histograms
# set style fill solid border -1

# set yrange [0:]

revname(x) = sprintf("%s",x[1:6])

set multiplot layout 1,3

set label 1 at screen 0.001, screen 0.1 'Commit:' left
set title 'Vogels \& Abbott benchmark'
set ylabel 'Wall time (s)'
plot 'benchmark_results.dat' using 3:4:xticlabels(revname(strcol(2))) lc -1

unset ylabel
unset label 1


set title 'Zenke et al. benchmark, single'
plot 'benchmark_results.dat' using 5:6:xticlabels(revname(strcol(2))) lc -1
set title 'Zenke et al. benchmark, parallel'
plot 'benchmark_results.dat' using 7:8:xticlabels(revname(strcol(2))) lc -1
unset multiplot
55 changes: 55 additions & 0 deletions build/release/run_benchmark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash

# Compile code
make clean
./bootstrap.sh && make
sleep 2

# Benchmark parameters
SIMTIME=100
STATRUNS="1 2 3 4 5"
HOSTNAME=`hostname`
DATE=`date +"%Y-%m-%d"`
REVISION=`git log --pretty=oneline -1 | cut -d " " -f 1`
TMPDIR=`mktemp -d`

# Function declaration
function fun_benchmark()
{
echo $1
> $TMPDIR/times.dat
for VARIABLE in $STATRUNS; do
$1
cat $TMPDIR/elapsed.dat >> $TMPDIR/times.dat
done

awk '{ for (i=1;i<=NF;i++) { sum[i] += 1.0*$i; sum2[i] += 1.0*$i*$i; } } \
END { for (i=1;i<=NF;i++) { mean = 1.*sum[i]/NR; var = 1.*sum2[i]/NR-mean*mean; std = sqrt(var + 1.0/12); \
printf "%f %f\t",mean,std } printf "\n" }' $TMPDIR/times.dat > $TMPDIR/result.dat

FUNCTION_RESULT=`cat $TMPDIR/result.dat`
cp $TMPDIR/result.dat last_benchmark_result.dat
}


# Vogels-Abbott benchmark, single core
CMD_BENCHMARK1="examples/sim_coba_benchmark --fast --simtime $SIMTIME --dir $TMPDIR"
fun_benchmark "$CMD_BENCHMARK1"
RESULT_BENCHMARK1=$FUNCTION_RESULT

# Zenke plasticity benchmark, single core
CMD_BENCHMARK2="examples/sim_background --fast --tau 10 --simtime $SIMTIME --dir $TMPDIR"
fun_benchmark "$CMD_BENCHMARK2"
RESULT_BENCHMARK2=$FUNCTION_RESULT

# Zenke plasticity benchmark, two cores
CMD_BENCHMARK3="mpirun -n 2 examples/sim_background --fast --tau 10 --simtime $SIMTIME --dir $TMPDIR"
fun_benchmark "$CMD_BENCHMARK3"
RESULT_BENCHMARK3=$FUNCTION_RESULT


# Writ result to file
echo "$HOSTNAME $REVISION $RESULT_BENCHMARK1 $RESULT_BENCHMARK2 $RESULT_BENCHMARK3 $DATE" >> benchmark_results.dat

# Clean up
rm -r $TMPDIR
8 changes: 4 additions & 4 deletions src/Doxyfile → doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ PROJECT_NAME = Auryn
# This could be handy for archiving the generated documentation or
# if some version control system is used.

PROJECT_NUMBER = 0.7
PROJECT_NUMBER = $(AURYNVERSIONSTRING)

# Using the PROJECT_BRIEF tag one can provide an optional one line description for a project that appears at the top of each page and should give viewer a quick idea about the purpose of the project. Keep the description short.

Expand All @@ -42,14 +42,14 @@ PROJECT_BRIEF = "Plastic Spiking Neural Network Simulator"
# exceed 55 pixels and the maximum width should not exceed 200 pixels.
# Doxygen will copy the logo to the output directory.

PROJECT_LOGO = ../doc/auryn_logo_small.png
PROJECT_LOGO = ./auryn_logo_small.png

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.

OUTPUT_DIRECTORY = ../doc
OUTPUT_DIRECTORY = .

# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
Expand Down Expand Up @@ -598,7 +598,7 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.

INPUT =
INPUT = ../src ../examples/

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
Expand Down
44 changes: 7 additions & 37 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,38 +1,8 @@
ADD_EXECUTABLE( sim_background sim_background.cpp )
TARGET_LINK_LIBRARIES( sim_background auryn ${MPI_C_LIBRARIES} ${Boost_LIBRARIES} )
file( GLOB SIM_SOURCES *.cpp )
foreach( sourcepath ${SIM_SOURCES} )
get_filename_component( sourcefile ${sourcepath} NAME )
string( REPLACE ".cpp" "" simname ${sourcefile} )
add_executable( ${simname} ${sourcefile} )
target_link_libraries( ${simname} auryn ${MPI_C_LIBRARIES} ${Boost_LIBRARIES} )
endforeach( sourcepath ${SIM_SOURCES} )

ADD_EXECUTABLE( sim_bg_lowpass sim_bg_lowpass.cpp )
TARGET_LINK_LIBRARIES( sim_bg_lowpass auryn ${MPI_C_LIBRARIES} ${Boost_LIBRARIES} )

ADD_EXECUTABLE( sim_bg_static sim_bg_static.cpp )
TARGET_LINK_LIBRARIES( sim_bg_static auryn ${MPI_C_LIBRARIES} ${Boost_LIBRARIES} )

ADD_EXECUTABLE( sim_brunel2k sim_brunel2k.cpp )
TARGET_LINK_LIBRARIES( sim_brunel2k auryn ${MPI_C_LIBRARIES} ${Boost_LIBRARIES} )

ADD_EXECUTABLE( sim_brunel2k_pl sim_brunel2k_pl.cpp )
TARGET_LINK_LIBRARIES( sim_brunel2k_pl auryn ${MPI_C_LIBRARIES} ${Boost_LIBRARIES} )

ADD_EXECUTABLE( sim_coba_benchmark sim_coba_benchmark.cpp )
TARGET_LINK_LIBRARIES( sim_coba_benchmark auryn ${MPI_C_LIBRARIES} ${Boost_LIBRARIES} )

ADD_EXECUTABLE( sim_dense sim_dense.cpp )
TARGET_LINK_LIBRARIES( sim_dense auryn ${MPI_C_LIBRARIES} ${Boost_LIBRARIES} )

ADD_EXECUTABLE( sim_epsp sim_epsp.cpp )
TARGET_LINK_LIBRARIES( sim_epsp auryn ${MPI_C_LIBRARIES} ${Boost_LIBRARIES} )

ADD_EXECUTABLE( sim_epsp_stp sim_epsp_stp.cpp )
TARGET_LINK_LIBRARIES( sim_epsp_stp auryn ${MPI_C_LIBRARIES} ${Boost_LIBRARIES} )

ADD_EXECUTABLE( sim_isp_big sim_isp_big.cpp )
TARGET_LINK_LIBRARIES( sim_isp_big auryn ${MPI_C_LIBRARIES} ${Boost_LIBRARIES} )

ADD_EXECUTABLE( sim_isp_orig sim_isp_orig.cpp )
TARGET_LINK_LIBRARIES( sim_isp_orig auryn ${MPI_C_LIBRARIES} ${Boost_LIBRARIES} )

ADD_EXECUTABLE( sim_poisson sim_poisson.cpp )
TARGET_LINK_LIBRARIES( sim_poisson auryn ${MPI_C_LIBRARIES} ${Boost_LIBRARIES} )

ADD_EXECUTABLE( sim_coba_binmon sim_coba_binmon.cpp )
TARGET_LINK_LIBRARIES( sim_coba_binmon auryn ${MPI_C_LIBRARIES} ${Boost_LIBRARIES} )
Loading

0 comments on commit 9992f3d

Please sign in to comment.