GSoC 2021 project idea 7.2: Benchmark and Optimize TVB areas

TVB has become a complex tool, with some generic areas and few very specific critical parts. Due to these, some parts are slow now. The team has identified some area with great potential to improve:

  1. Simulation wizard
  2. H5 files writing
  3. loading for visualizers from files

Starting from these critical parts (identifying others from the student tests would be much appreciated), writing or executing a flow, profiling the code usage and proposing improvements would be the goal of this project. We expect the student to start by accommodating with TVB documentation, understanding the main workflows, creating a work development setup, then use benchmark and profiling tools for identifying the critically slow areas in the code, as well as propose optimization solutions.

Expected results: A set of well described slow scenarios for benchmarking, profiling files with highlighted critical code areas, suggestions to improve (vectorize code, rewrite, use buffers, etc).

Skills: Python, Numpy, Numba, profiling tools

Mentors: Lia Domide @liadomide, Paula Popa @Popa_Paula

Tags: TVB, Python, NumPy, Numba

1 Like

hey I am interested in this project I have good knowledge of python,numpy , github and unit testing…can you please tell what more required for this project or links…
thanks…

Welcome! Let me tag the mentors for you; @liadomide @Popa_Paula

Hi. It is good to read about your interest!
Our code is open source here: GitHub - the-virtual-brain/tvb-root: Main TVB codebase
Documentation can be found here: http://docs.thevirtualbrain.org/
A demo installation for quick checks can be found online: https://www.thevirtualbrain.org/demo tester/pass1
(but I recommend you install the application locally if you intend to work on this project).
Let us know if you have further questions.

ok sure… i will do this

@liadomide have cloned it in my local system …can you explain little bit on which part of code should I focus for optimization I have also read about benchmarking, profiling…need some more guidance :slight_smile:

1 Like

Great news Raghib.

I suggest you try to run first, then benchmark this script:

ok…I will try this…


can you please explain this…I have downloaded bct and moved to tvb-root and installed octave…
but showing error as below…
@liadomide

have you set env var BCT_PATH, as written in the quoted sentence ?
alternatively, you could start tvb web gui (python -m tvb.interfaces.web.run WEB_PROFILE) and hit store settings button (appears when you first launch tvb web gui)


Still got this error when run python3 benchmark.py

@Popa_Paula I think you fixed this script in a different branch of tvb-root, which is not yet merge into master.
Could you pls point us to that branch?
Thanks!

Hi, and thank you Raghib for your interest. Indeed, the fix was not merged into master yet. Please, use the branch TVB-2528 until we do the merge.

Ok… thanks @liadomide and @Popa_Paula

All ran successfully so now I have to benchmark the script benchmark.py that is in branch tvb-2528??
@Popa_Paula @liadomide

I have created one PR ,its need some changes can you suggest on which part of code should I focus for optimisation…
I need more guidance in these topics…

Simulation wizard
H5 files writing
loading for visualizers from files

Hi Raghib.
I saw your PR, and just replied to it on Github. As written there, I find this a good start.
One of the next steps would be for you to familiarize with tvb concepts (by reading the documentation, trying the web GUI), so that you can find the “simulator wizard” in tvb web gui.
For the H5 writing part, I think that can be benchmarked with benchmark.py (as you already started).
For the 3rd point, each of the visualizer adapters will need benchmarking individually.
Please start writing your GSOC proposal, as you are documenting for these, and let us give you early feedback on it.

waiting for feedback just submitted draft…
Can u share ur mail id??

i am ldomide@gmail.com

your draft looks decent to submit as final