Adaptive Edge Color Group Size by jblueh · Pull Request #2167 · su2code/SU2

Proposed Changes

Edge coloring tends to perform better than reductions for the hybrid parallel discrete adjoint because it uses less memory and enables the shared reading optimization. This PR puts two additional strategies in place for the discrete adjoint that help with obtaining a coloring before resorting to reductions, making successful coloring more likely.

  1. If the requested edge color group size does not produce an efficient coloring, the maximum edge color group size that still produces an efficient coloring is chosen instead. This decision is made per rank.
  2. The discrete adjoint is allowed to use more colors.

Related Work

work on hybrid parallel AD, like #2039

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.