Skip to content

Conversation

@baperry2
Copy link
Contributor

@baperry2 baperry2 commented Feb 28, 2025

Draft PR with optimizations from the NREL/NOAA/NCAR Open Hackathon:

  1. Remove separate function that computs/stores k_f - just compute it on an as-needed basis (1% performance gain)
  2. Reuse values of qf and qr computed during QSS coefficient calculation instead of recomputing (10% cumulative performance gain)

Nsight Compute profiles of the reaction kernel, before, after (1), and after (2), respectively:
Screenshot 2025-02-27 at 8 57 37 AM
Screenshot 2025-02-27 at 8 57 54 AM
Screenshot 2025-02-27 at 2 34 40 PM

Another optimization that was tried by @SreejithNREL was adding #pragma unroll to various species loops - that didn't have an effect as the compiler seems to being doing it automatically without the pragma.

TODOs:

  • Verify correctness of commit that re-used qf and qr. That commit lead to diffs greater than machine precision, but small enough for still accurate simulations
  • Modify these changes so they don't interfere with symbolic analytical Jacobian stuff
  • Revert commit that removes scope because that didn't have an effect
  • Regenerate all chemical mechanisms (currently only dodecane_lu_qss is updated, and without analytical jacobian support)

Thanks @dappelha and @uumesh for the suggestions leading to this PR! Hopefully I got your github handles right.

@baperry2 baperry2 requested a review from malihass February 28, 2025 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant