GSoC 2021 project idea 16.4: OpenMP for synaptic propagation

BRIAN can parallelize simulations over multiple processor cores by making use of the OpenMP framework. However, in its current state BRIAN does not yet make full use of the parallelization potential, in particular for synaptic propagation.

The aim of this project is to improve the OpenMP support, by:

  • analyzing the connectivity structure and type of synaptic interaction to decide whether trivial parallelization is safely possible
  • benchmarking and implementing parallelization approaches for non-trivial situations

Skills: C++ and Python programming, experience with OpenMP or other parallelization techniques helpful

Mentors: Marcel Stimberg @mstimberg , Dan Goodman @d.goodman

Tags: BRIAN, Python, C++

1 Like

Hi there!
I love the projects goals, though I have to admit I am not well versed in everything that might be required of the project!

Would there be a paper or documentation I could peruse to understand more in-depth the proceedings of what is to be achieved? Also, what specific topics should I begin to explore to be able to successfully work on the problem provided?

Some Experience Overview
I recently used the BRIAN library in python to implement a deterministic Hopfield Network from scratch similar to what is present in the library and would be willing to learn more for the same. I do have some applied experience in parallelization while working with genomics data previously at UTokyo, but would love to learn more in-depth as required.
About Me
I am currently studying at IIT Kanpur in the domain of Bioengineering as a final year student. I believe I am proficient with C++ and Python, so covered on that front.

Hi, thanks for your interest in the topic! As a first starting point, it would be important to get a good idea of Brian’s code generation approach, in particular the “C++ standalone” mode which is at the core of this project. You can find some general information about this in our 2014 and 2019 papers (for the 2019 paper in particular in the appendix), and of course in Brian’s documentation. If you want to get a bit more into algorithmic details, Dan and Romain’s papers on vectorization and GPU computing could be interesting – note that this project is not really about either topic, but many of the questions around spike propagation are related. Let me know if you have more detailed questions. I will talk about the application process in more detail at a later point.

1 Like

Thank you! If you don’t mind, I will go through these and revert back to you if I have any further questions.
Best Regards
Rishabh

1 Like

Dear students interested in this topic,
a few general words about the application process (the first points are general for all Brian projects, and the last is specific to this project):

  • when you start the application on the GSoC website, you will get a template for the general structure, so I’d recommend to wait for the official start of the application period before compiling the document.
  • don’t hesitate to share your draft application with me so that I can give you feedback, but please don’t wait until the very last day if you want to incorporate my feedback into the final version :slight_smile:
  • in the application, the detailed timeline does not matter that much (these things are always hard to predict); the important thing is to show that you 1) understand the project and its deliverables and 2) that you have the knowledge/skills to successfully finish this project.
  • for the second point, point to concrete proof of your experience, e.g. if you published code anywhere (e.g. for project work as part of your studies), please include a link to it.
  • this year, GSoC adds a bit of flexibility to the schedule: the official guideline is that over the 10 weeks of the project, “students are expected to spend on average 18 hours a week on the program”. Please include in your application how you’d like to organize time over the project, e.g. whether you prefer to do this “part-time work” over the full 10 weeks, or rather have fewer weeks with more hours, but include time off for vacation, etc. If several options work for you, you can of course write this as well. Finally, please mention any external constraints (e.g. exams) and how they fit into the schedule.
  • Here are two specific questions that I’d like you to discuss as part of the application:
  1. A (contrived) example where Brian gives an incorrected result – this is the main reason why we are currently showing a warning when the user uses OpenMP.
  2. Three examples of toy networks with synaptic events . This is one of the “low-hanging fruits” to improve OpenMP performance. Try to understand where OpenMP parallelization is used and where it isn’t, and try to figure out why this is the case (of course, feel free to look into Brian’s source code). Do you see any room for improvement, and how would you improve things?

Finally, a personal remark: I am about to be off on paternity leave any day now, so please don’t worry if I don’t reply right away, I might be busy with other things :baby_bottle: :wink:

1 Like

Hi there! @mstimberg . I have a query, is there any Github repo associated to this project where we can contribute

Hi, the general github repo for this project is GitHub - brian-team/brian2: Brian is a free, open source simulator for spiking neural networks.

hey, So can I try solving any of the open issues or just from a set of particular ones

Regards
Veer Shah

Hey @mstimberg. So I am having a lot of difficulties reading through the issues, So can you please guide me to any particular issue that can act as a pre-task for this project ?

Regards
Veer Shah

Hi @Veershah26. Sorry about being slow with replies, as I mentioned in my earlier message I am currently on paternity leave. You do not necessarily have to work on an issue as a pre-task for this project (in particular since I do not have a lot of time to review pull requests at the moment) – it is only mandatory to discuss the two questions/examples I linked above. If you want to work an issue you are of course more than welcome, though! One that is about C++ standalone mode (and therefore closely related to this project) and feasible to project newcomers could be this one: Allow separate code and results directories for standalone mode · Issue #1240 · brian-team/brian2 · GitHub
Best, Marcel

hey @mstimberg @d.goodman. I have shared a draft proposal on the gsoc website, I know this is a bit late, but I apologize for it. I have also send the links for the draft to you personally

Regards
Veer Shah

Hi @Veershah26 . It is indeed a bit late, but I will have a look at your draft and add comments and/or reply to your personal message.
Best,
Marcel