Code Monkey home page Code Monkey logo

monsteer's Introduction

Monsteer

Overview

Monsteer is a library for Interactive Supercomputing in the neuroscience domain. Monsteer facilitates the coupling of running simulations (currently NEST) with interactive visualization and analysis applications. Monsteer supports streaming of simulation data to clients (currenty only spikes) as well as control of the simulator from the clients (also kown as computational steering). Monsteer's main components are a C++ library, a MUSIC-based application and Python helpers.

Features

Monsteer provides the following functionality:

  • A brion::SpikeReportPlugin for streaming spike data using ZeroEQ. The plugin accepts URIs with the format "monsteer://[host[:port]]".
  • A MUSIC application called music_proxy to be used as the runtime gateway to simulators that support MUSIC, e.g. NEST.
  • A small Python library to interface the Simulator in the client side and MUSIC proxy on the simulator side. This library also activates the Brion plugin when imported.

Examples

The directory examples/nest contains two simple examples using NEST. For each example there is Python script (the simulator code) and a MUSIC configuration file. The music configuration files have instructions on how to run them. The first example, (files minimal.py and nest2music_proxy.music), is a minimal simulation with streaming enabled. The second example (minimal_steered.py and nest2music_proxy_with_steering.music) is an extended version of the first one that adds basic steering support.

This package does not provide any client code example at the moment. As a streaming client you can use the spikeConverter tool from Brion as a reference.

Building from Source

Monsteer is a cross-platform library, designed to run on any modern operating system, including all Unix variants. It requires a C++11 compiler and uses CMake to create a platform-specific build environment. The following platforms and build environments are tested:

  • Linux: Ubuntu 16.04, RHEL 6.8 (Makefile, Ninja)
  • Mac OS X: 10.9 (Makefile, Ninja)

Building from source is as simple as:

git clone --recursive https://github.com/BlueBrain/Monsteer.git
mkdir Monsteer/build
cd Monsteer/build
cmake -GNinja -DCLONE_SUBPROJECTS=ON ..
ninja

Funding & Acknowledgment

The development of this software was supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss government’s ETH Board of the Swiss Federal Institutes of Technology.

This project has received funding from the European Union’s FP7-ICT programme under Grant Agreement No. 604102 (Human Brain Project RUP).

This project has received funding from the European Union's Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement No. 720270 (Human Brain Project SGA1).

This project is based upon work supported by the King Abdullah University of Science and Technology (KAUST) Office of Sponsored Research (OSR) under Award No. OSR-2017-CRG6-3438.

License

Monsteer is licensed under the LGPL, unless noted otherwise, e.g., for external dependencies. See file LICENSE.txt for the full license.

Copyright (c) 2015-2022 Blue Brain Project/EPFL, King Abdullah University of Science and Technology and contributors.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

monsteer's People

Contributors

bbpgithubaudit avatar chevtche avatar eile avatar jplanasc avatar kaabimg avatar tribal-tec avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

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

monsteer's Issues

Online training with nest and troubles compiling monsteer

Hi,
I'm trying to control the flight dynamic of a micro robot which uses flapping wings to generate lift end the three torques. I'm already using MUSIC to feed the neural network written in NEST. Relying on the suggestion of a NEST user I created two file C++ embedding MUSIC input and output ports. The first file takes the state coming from the robot. It transforms this continuous signal in a sequence of spikes (with a poisson generator) and transmits data to the neural network through an output port. The second file, through an input port, takes as input the spikes generated by the network and transforms them in a continuous signal (with a basic firing rate method) which will be used to control the robot. My big problem, right now, is the training/learning. Is it possible with this package changing weights during the simulation without stop it? Or, at least, is there a way to communicate to the network if it is performing well or not (transmitting the error between the actual and desired output or a reward)?

I installed the package but I can't see the music_proxy binary or the bbp python package. When I did cmake I got this messagge:
Configured Monsteer [0] with Boost Brion FlatBuffers Lunchbox MPI Qt5Widgets PythonInterp PythonLibs vmmlib zeq WITHOUT BBPTestData music

I've music installed in /usr/local instead of /usr (I installed monsteer in /usr). Is that the problem?

Thank you very much

Segmentation fault on importing Nesteer

A segmentation fault is occuring when importing monsteer.Nesteer in python, for example with the provided steering example.

Computer specs:
4 cores, 16 GB ram
Ubuntu 14
64 bit
With python2.7 running in a virtual environment (mpi4py, scipy, numpy, etc.)

I am not sure if Monsteer causes the actual problem but maybe somebody got the same issue and knows a solution. In contrast to the minimal steering example, the non-steering example works fine along with the monsteer_spike_receiver app (which indicates that MUSIC works in general). Moreover, I tried both, the EPFL MUSIC repository and the official MUSIC repository. For both the same segmentation fault occurs. With nest 2.8 this segmentation fault did not occur (!) but python API mismatches due to changes in Nest.

If I import nest first and then monsteer.Nesteer, the segmentation fault does not occur, however other issues occur:
" python: ../nestkernel/scheduler.h:736: librandom::RngPtr nest::Scheduler::get_rng(nest::thread) const: Assertion `thrd < static_cast(rng_.size())' failed." (probably because music must set up the mpi environment at first)

Here is the traceback:

(neuro_64)[email protected].... $ mpirun -np 2 which music nest2music_proxy_with_steering.music
[lada:30199] *** Process received signal ***
[lada:30199] Signal: Segmentation fault (11)
[lada:30199] Signal code: Address not mapped (1)
[lada:30199] Failing at address: 0x38
[lada:30199] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x10340) [0x7f1120113340]
[lada:30199] [ 1] /fzi/ids/schulze/local_setups/nest-2.6.0_64/lib/python2.7/site-packages/nest/pynestkernel.so(+0x43d7ab) [0x7f11016e77ab]
[lada:30199] [ 2] /fzi/ids/schulze/local_setups/nest-2.6.0_64/lib/python2.7/site-packages/nest/pynestkernel.so(+0x43f223) [0x7f11016e9223]
[lada:30199] [ 3] /fzi/ids/schulze/local_setups/nest-2.6.0_64/lib/python2.7/site-packages/nest/pynestkernel.so(lt_dlopenadvise+0x52) [0x7f11016e9bf2]
[lada:30199] [ 4] /usr/lib/x86_64-linux-gnu/hwloc/hwloc_xml_libxml.so(+0x13b3) [0x7f10fd3da3b3]
[lada:30199] [ 5] /usr/lib/x86_64-linux-gnu/hwloc/hwloc_xml_libxml.so(+0x1ec3) [0x7f10fd3daec3]
[lada:30199] [ 6] /usr/lib/x86_64-linux-gnu/libhwloc.so.5(+0x22056) [0x7f111b25b056]
[lada:30199] [ 7] /usr/lib/x86_64-linux-gnu/libhwloc.so.5(+0x13e9f) [0x7f111b24ce9f]
[lada:30199] [ 8] /usr/lib/x86_64-linux-gnu/libhwloc.so.5(hwloc_topology_set_xmlbuffer+0x49) [0x7f111b245858]
[lada:30199] [ 9] /usr/lib/libmpi.so.1(opal_hwloc_unpack+0x8e) [0x7f111ad873fe]
[lada:30199] [10] /usr/lib/libmpi.so.1(opal_dss_unpack_buffer+0x5e) [0x7f111ad82dbe]
[lada:30199] [11] /usr/lib/libmpi.so.1(opal_dss_unpack+0x9a) [0x7f111ad83caa]
[lada:30199] [12] /usr/lib/libmpi.so.1(orte_util_nidmap_init+0x291) [0x7f111ad4fef1]
[lada:30199] [13] /usr/lib/openmpi/lib/openmpi/mca_ess_env.so(+0x1a49) [0x7f10ff901a49]
[lada:30199] [14] /usr/lib/libmpi.so.1(orte_init+0x193) [0x7f111ad38843]
[lada:30199] [15] /usr/lib/libmpi.so.1(ompi_mpi_init+0x174) [0x7f111acf8024]
[lada:30199] [16] /usr/lib/libmpi.so.1(PMPI_Init_thread+0x16f) [0x7f111ad0f88f]
[lada:30199] [17] /fzi/ids/schulze/local_setups/music_EPFL_64/lib/libmusic.so.100(_ZN3MPI11Init_threadERiRPPci+0x2a) [0x7f1100760ce6]
[lada:30199] [18] /fzi/ids/schulze/local_setups/music_EPFL_64/lib/libmusic.so.100(_ZN5MUSIC5SetupC2ERiRPPciPi+0x102) [0x7f110075f932]
[lada:30199] [19] /fzi/ids/schulze/local_setups/nest-2.6.0_64/lib/python2.7/site-packages/nest/pynestkernel.so(_ZN4nest12Communicator4initEPiPPPc+0x145) [0x7f1101688d75]
[lada:30199] [20] /fzi/ids/schulze/local_setups/nest-2.6.0_64/lib/python2.7/site-packages/nest/pynestkernel.so(_Z11neststartupiPPcR14SLIInterpreterRPN4nest7NetworkESs+0x31) [0x7f11014fd899]
[lada:30199] [21] /fzi/ids/schulze/local_setups/nest-2.6.0_64/lib/python2.7/site-packages/nest/pynestkernel.so(+0x218f52) [0x7f11014c2f52]
[lada:30199] [22] /fzi/ids/schulze/local_setups/nest-2.6.0_64/lib/python2.7/site-packages/nest/pynestkernel.so(+0x21841d) [0x7f11014c241d]
[lada:30199] [23] python(PyEval_EvalFrameEx+0x40d) [0x49968d]
[lada:30199] [24] python(PyEval_EvalFrameEx+0xc72) [0x499ef2]
[lada:30199] [25] python(PyEval_EvalCodeEx+0x2ac) [0x4a090c]
[lada:30199] [26] python(PyEval_EvalCode+0x32) [0x588d42]
[lada:30199] [27] python(PyImport_ExecCodeModuleEx+0xaa) [0x588dfa]
[lada:30199] [28] python() [0x5b1f0f]
[lada:30199] [29] python() [0x44d4d2]

[lada:30199] *** End of error message ***

mpirun noticed that process rank 0 with PID 30199 on node lada exited on signal 11 (Segmentation fault).

Compilation Error with MUSIC

Machine specs:
32 bit
Ubuntu 14.04

When building Monsteer against the official MUSIC, the following issue pops up, this does not happen with the EPFL Music though but I would like to know whether the official Repro is working for others or if this a local problem. I am installing everything as non-admin, thus I use a CMake script for Monsteer and set the MUSIC_ROOT_DIR such that it can find MUSIC:


"# Variables defined by this module:
"#
"# MUSIC_FOUND System has music libs/headers
"# MUSIC_LIBRARIES The music libraries
"# MUSIC_INCLUDE_DIR The location of music headers
"# MUSIC_INCLUDE_DIRS The location of music headers

find_path(MUSIC_ROOT_DIR
NAMES include/music.hh
HINTS $ENV{MUSIC_ROOT_DIR}
)

find_library(MUSIC_LIBRARY
NAMES music libmusic
HINTS ${MUSIC_ROOT_DIR}/lib
)

find_path(MUSIC_INCLUDE_DIR
NAMES music-c.h music.hh
HINTS ${MUSIC_ROOT_DIR}/include
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MUSIC DEFAULT_MSG
MUSIC_LIBRARY
MUSIC_INCLUDE_DIR
)

set(MUSIC_INCLUDE_DIRS ${MUSIC_INCLUDE_DIR})
set(MUSIC_LIBRARIES ${MUSIC_LIBRARY})

mark_as_advanced(
MUSIC_ROOT_DIR
MUSIC_LIBRARY
MUSIC_LIBRARY_DEBUG
MUSIC_LIBRARY_RELEASE
MUSIC_INCLUDE_DIR

)

Here the Traceback:

Scanning dependencies of target music_spike_writer
[ 70%] Building CXX object Brion/brion/CMakeFiles/Brion.dir/morphology.cpp.o
[ 70%] Building CXX object apps/CMakeFiles/music_spike_writer.dir/music_spike_writer.cpp.o
[ 72%] Building CXX object Brion/brion/CMakeFiles/Brion.dir/plugin/compartmentReportBinary.cpp.o
In file included from /disk/no_backup/schulze/builds_32/MUSIC/include/music/index_map.hh:22:0,
from /disk/no_backup/schulze/builds_32/MUSIC/include/music/data_map.hh:24,
from /disk/no_backup/schulze/builds_32/MUSIC/include/music/port.hh:26,
from /disk/no_backup/schulze/builds_32/MUSIC/include/music/setup.hh:27,
from /disk/no_backup/schulze/builds_32/MUSIC/include/music/runtime.hh:26,
from /disk/no_backup/schulze/builds_32/MUSIC/include/music.hh:21,
from /fzi/ids/schulze/Packages/Monsteer/apps/music_spike_writer.cpp:25:
/disk/no_backup/schulze/builds_32/MUSIC/include/music/interval.hh: In member function ‘void MUSIC::Interval::setBegin(int)’:
/disk/no_backup/schulze/builds_32/MUSIC/include/music/interval.hh:34:31: error: declaration of ‘begin’ shadows a member of 'this' [-Werror=shadow]
void setBegin (int begin) { begin_ = begin; }
^
/disk/no_backup/schulze/builds_32/MUSIC/include/music/interval.hh: In member function ‘void MUSIC::Interval::setEnd(int)’:
/disk/no_backup/schulze/builds_32/MUSIC/include/music/interval.hh:35:27: error: declaration of ‘end’ shadows a member of 'this' [-Werror=shadow]
void setEnd (int end) { end_ = end; }
^
In file included from /disk/no_backup/schulze/builds_32/MUSIC/include/music/port.hh:26:0,
from /disk/no_backup/schulze/builds_32/MUSIC/include/music/setup.hh:27,
from /disk/no_backup/schulze/builds_32/MUSIC/include/music/runtime.hh:26,
from /disk/no_backup/schulze/builds_32/MUSIC/include/music.hh:21,
from /fzi/ids/schulze/Packages/Monsteer/apps/music_spike_writer.cpp:25:
/disk/no_backup/schulze/builds_32/MUSIC/include/music/data_map.hh: In constructor ‘MUSIC::DataMap::DataMap(void_)’:
/disk/no_backup/schulze/builds_32/MUSIC/include/music/data_map.hh:43:26: error: declaration of ‘base’ shadows a member of 'this' [-Werror=shadow]
DataMap (void_ base) : base_ (base) { };
^
In file included from /disk/no_backup/schulze/builds_32/MUSIC/include/music/port.hh:28:0,
from /disk/no_backup/schulze/builds_32/MUSIC/include/music/setup.hh:27,
from /disk/no_backup/schulze/builds_32/MUSIC/include/music/runtime.hh:26,
from /disk/no_backup/schulze/builds_32/MUSIC/include/music.hh:21,
from /fzi/ids/schulze/Packages/Monsteer/apps/music_spike_writer.cpp:25:
/disk/no_backup/schulze/builds_32/MUSIC/include/music/event.hh: At global scope:
/disk/no_backup/schulze/builds_32/MUSIC/include/music/event.hh:33:9: error: ‘class MUSIC::EventHandlerGlobalIndex’ has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor]
class EventHandlerGlobalIndex {
^
/disk/no_backup/schulze/builds_32/MUSIC/include/music/event.hh:38:9: error: ‘class MUSIC::EventHandlerGlobalIndexDummy’ has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor]
class EventHandlerGlobalIndexDummy : public EventHandlerGlobalIndex {
^
compilation terminated due to -fmax-errors=5.
cc1plus: all warnings being treated as errors
make[2]: *** [apps/CMakeFiles/music_spike_writer.dir/music_spik

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.