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 addition, there are some corner cases where activating parallelization can lead to incorrect results (this is why OpenMP support is still marked as “experimental”).
The aim of this project is to finalize the OpenMP support, by:
deciding whether parallelization can be safely used based on information about the respective code fragment (which variables are read/written in what way)
identifying and implementing additional opportunities for parallelization
extensive testing
Optional (“stretch goal”): transferring the OpenMP support to other code generation targets (Cython)
Skills: C++ and Python programming, experience with OpenMP or other parallelization techniques helpful
Hey,
I am a final year student from BIT, Mesra. This project seems interesting and I would like to work on it. However, I only have theoritical knowledge about the subject in general. How should I develop the required skills and proceed forward in contributing to this project.
Hi Manish,
thank you for the interest in our project. There’s quite a lot of material out there teaching about OpenMP, e.g. this tutorial: https://bisqwit.iki.fi/story/howto/openmp/ Note that we are only using OpenMP in a very basic way (at least so far), e.g. only for multithreading (no offloading/use of other devices).
Hi, I’m currently taking a class on Parallel Computing and have some experience in using OpenMP for optimizing C++ code for fluid simulations and processing sparse matrices. I’d love to discuss some details and bounce off ideas for using OpenMP for the Brian simulator.
Hi @ayushwashere, sorry for the late reply, I was out of town for a few days. Thanks for your interest in the project, I am happy to discuss details either here or directly by email (marcel.stimberg@inserm.fr).
Hello everyone, I am Rahul Gupta. I am a final year student of Mathematics and Computing from IIT Guwahati, India. I am currently doing a course in parallel computing and have programming experience of shared memory using OpenMp. I found this problem really interesting and want to work in this.
Dear students interested in this project. I just opened an issue on github (https://github.com/brian-team/brian2/issues/1162) that I invite all students to work on. The issue does not necessarily require advanced programming skills, what we are more interested in is that you show that: 1) you are able to navigate and (at least partially) understand the Brian2 code base so that you can implement and test a small feature for it, and 2) that you are at ease working with github and contributing via its pull request feature.
Note that this is of course a bit of an artificial situation, usually we wouldn’t have multiple developers working on the same feature in parallel (I wish having too many developers were a common problem ). This is not a race, do not worry about being the first to open a pull request, but maybe do not wait until the last day of the application period either. Since everything is done in the open you are of course free to look at the work the other students are doing, but please do things the way you think they should be done, regardless of whether others are taking a different approach. Also of course feel free to ask questions in the pull request and/or in the issue if you are unsure about something.
Please refer to the pull request you open as part of your GSoC application (I will give some more information about what we expect to see in that application later), we will not merge any of them before the end of the application period.
@mstimberg@malin I’m going through the papers that are mentioned above but I am not able to understand it fully because of too many technical terms involved. Is the understanding of these papers necessary or else understanding only the code through documentation good enough to work in this project?
Hi @rahul_gupta. Are you referring to the papers about Brian? There are certainly a lot of things in these papers that are not necessary for the project. The basic starting point should be to generate C++ standalone code for one of the simpler examples (e.g. https://brian2.readthedocs.io/en/stable/examples/CUBA.html) and look at the generated code to understand what each of the files is doing (at least roughly). I think some parts of the paper could be helpful for that, but code & documentation might be enough. You could also have a look at the section about Brian in the review paper about code generation (https://www.frontiersin.org/articles/10.3389/fninf.2018.00068/full) which has a shorter more general overview over our approach.
Dear students. As you all know, the application period for this year’s GSoC has started. I hope you are all doing well and are able to cope with the issues around the ongoing pandemic. Since GSoC is an online-only program it is obviously much less affected than other activities; at the moment no changes to the schedule (e.g. deadline extension) are planned. For some of you it might be difficult to get the necessary proof of enrolment from your university at a time of lockdowns and office closures. Google has updated their guidelines, hopefully you can find a solution that works for you. From the GSoC program lead: “We know some of you may need to get creative to show us forms and that’s okay. Submit what you have before the March 31 deadline and if there is a problem with the form you will be emailed the first week of April and can submit a different proof at that point.”
Regarding your applications for this specific project:
please include a link to any Brian contribution you made (e.g. to the Brian issue I linked earlier)
the most important thing about the application is not so much the detailed timeline (it’s always hard to plan these things in advance), but rather that you show that you understand the task and its potential problems. I have uploaded two examples that could be helpful in a discussion:
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?
For all of these questions, we are not interested in actual solutions (this is what the summer is for). Rather, we’d like you to discuss the general approach and what a solution could look like. For example, you could include something like an “imagined” generated code snippet. I.e., try show the outcome of what your code should do in the end.
Hopefully this makes things a bit clearer, let me know if you have any further questions.