Bugfix : Fix performance of collisional conservation terms in le_lo
David Dickinson
Branch: bugfix/performance_collision_conservation_le_lo
Branch: 8.1.1-RC
Merged
Merged pull request
Merged in bugfix/performance_collision_conservation_le_lo (pull request #573)
For an example ballooning space input file with ntheta = 64, nperiod = 2, npassing = 15, negrid = 16, nspec = 2 and naky=ntheta0=1 the run time for a collisionless run was ~6s but for the collisional equivalent it was over two minutes. Profiling on archer2 showed that the extra time was primarily in the conservation terms calculation. It seems that there are a few loops which were not parallelised and that refactoring these out greatly improves the run time of such collisional runs and reduces peak memory consumption, although does lead to duplicated calculations. A low theta resolution nonlinear test case (essentially swapping large vspace resolution for large wavenumber space) does not show a significant difference with or without this change.
Â