You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2024-10-17-improving-performance-of-biodynamo-using-cpp-modules.md
+22-7Lines changed: 22 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -41,14 +41,16 @@ these performance issues. C++ Modules offer an efficient on-disk representation
41
41
reducing the need for repeated parsing of invariant code. By implementing these modules,
42
42
the project aimed to optimize runtime memory usage and improve overall performance
43
43
44
-
## Key steps undertaken include:
44
+
## What I did?:
45
45
1.**Reworking CMake Rules:** The project incorporated ROOT and another packages
46
46
efficiently using FetchContent, modifying CMake rules accordingly (e.g., PR [#365](https://github.com/BioDynaMo/biodynamo/pull/365)
47
-
and [#387](https://github.com/BioDynaMo/biodynamo/pull/387))
47
+
and [#387](https://github.com/BioDynaMo/biodynamo/pull/387), both merged)
48
48
2.**Replacing genreflex with rootcling:** This switch was crucial to enable C++ Modules and
49
49
streamline the generation of reflection information (PR [#379](https://github.com/BioDynaMo/biodynamo/pull/379))
50
-
3.**Automatic Modules Map Generation:** Using relative paths, the CMake system was modified to
51
-
automate module map creation, ensuring smooth integration with BioDynaMo's libraries.
50
+
3.**C++ Modules changes** Among other things, I used automatic generation for the module map with relative paths,
51
+
modified the `selection.xml` file to support the new dictionaries and fixed headers with missing includes (PR [#385](https://github.com/BioDynaMo/biodynamo/pull/385).
52
+
4.**Updated some CI workflows** I fixed some failing workflows in PR [#377](https://github.com/BioDynaMo/biodynamo/pull/377).
53
+
Also, I did some minor changes in some flags in PR's [#378](https://github.com/BioDynaMo/biodynamo/pull/378) and [#367](https://github.com/BioDynaMo/biodynamo/pull/367)
52
54
53
55
### Promising Results
54
56
The results have been promising, showcasing significant performance gains. Benchmarking revealed
@@ -66,10 +68,10 @@ As expected, the simulation time did not show an appreciable improvement. Howeve
66
68
unit tests, the time was 33% lower. I believe this is because unit tests involve a lot of parsing and Cling calls.
67
69
68
70
### Future Steps and Challenges Ahead
69
-
Despite these advances, several challenges remain. For instance, memory leaks have been observed when using the new
71
+
Despite these advances, several challenges remain. PR's #365 is ready to merge and #385 needs some changes. For instance, memory leaks have been observed when using the new
70
72
`ROOT_GENERATE_DICTIONARY`, even with C++ Modules disabled. Additionally, the build system for individual demos has
71
-
caused compatibility issues with the main build system. Resolving these issues and finalizing the integration of C++
72
-
Modules will be essential for ensuring long-term stability and reliability.
73
+
caused compatibility issues with the main build system. Also, there is a problem with the Jupyter notebooks.
74
+
Resolving these issues and finalizing the integration of C++ Modules will be essential for ensuring long-term stability and reliability.
73
75
74
76
Looking ahead, further optimizations are planned, including potential module-based optimizations for BioDynaMo’s
75
77
core components. Collaboration with the BioDynaMo team continues, with upcoming meetings scheduled
@@ -80,6 +82,19 @@ The integration of C++ Modules has proven effective in reducing memory usage and
80
82
Continued collaboration and testing will be crucial to fully realize the performance potential of BioDynaMo,
81
83
enabling more efficient simulations for researchers in computational biology.
82
84
85
+
### Acknowledges
86
+
First of all, I would like to thank Google Summer of Code for the opportunity to work on this project.
87
+
But above all, my most sincere gratitude goes to Vassil. He has been an exceptional mentor, always attentive
88
+
and ready to help with anything I needed. His encouragement during weekly meetings and his constant support in all areas,
89
+
from soft skills to technical expertise, have truly inspired me and earned my admiration.
90
+
91
+
Many thanks also to the BioDynaMo team: to Lukas Breitweiser for guiding me through the final stages and helping
92
+
me understand the complexities of BioDynaMo; to Tobias Duswald for reviewing my PRs and assisting me in analyzing
93
+
my results; and to Fons Rademakers for his support when I faced challenges compiling ROOT in debug mode.
94
+
95
+
Lastly, a special thanks to my colleagues from Compiler Research, particularly David, Attel and Maksym, whom I had
96
+
the pleasure of meeting at the Fourth MODE in Valencia, for making this experience unforgettable.
0 commit comments