optimad / bitpit

Open source library for scientific HPC
http://optimad.github.io/bitpit/
GNU Lesser General Public License v3.0
117 stars 34 forks source link

PABLO: simplify 2:1 balance #335

Closed andrea-iob closed 1 year ago

andrea-iob commented 1 year ago

I've rewritten some functions to reduce code duplication. The refactoring removed 1300 lines of code.

There are also some performance improvements. The biggest one is related to the last commit. After the latest code refactoring, it is no more necessary to relay the AUX bit for 2:1 balance. Moreover, that bit was not properly reset and 2:1 balance was check on many more octants than actually needed. This leads to a speed improvement of 25x for the function that perform load balance. All tests pass, however a thorough code review and some more test are needed to make sure the changes are fine.

Original profile of localBalance: original

Updated profile of localBalance: updated

andrea-iob commented 1 year ago

Rebased on current master.