Open
Conversation
* Adds profiling tags, standardise seed and set num threads to 1 in issl_rhi140 example Co-authored-by: Coco Yeung <coco.yeung22@imperial.ac.uk>
Add input files for different weather conditions --------- Co-authored-by: Coco Yeung <coco.yeung22@imperial.ac.uk>
* Add profiling flags * Replaced pow() * Aerosol * Added more optimisations * Code clean-up --------- Co-authored-by: Coco Yeung <coco.yeung22@imperial.ac.uk>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the current version of the code running the issl_rhi140 example, around 20% of computational time is spent on the

pow()function when running on 1 thread: see perf profiling belowChanges have been made to the code to reduce the reliance on
pow(). The most notable changes were:nis only ever 0, 1, 2, or 3, and savinglog()results in the loop to prevent repeated calculationspow()as it is only called by LAGRIDPlumeModel.cpp where the powernis 0; it also returns the value before it is multiplied by thelogBinRatiosince the loop which calls it also calculates it.Other changes made are to compute
pow(x, 2)asx*xorpow(x, 1/3)ascbrt(x)instead, although I believe that made minimal difference as the compiler could already make those optimisations.This resulted in a decrease in % time spent in the functions


pow()andlog(): see perf profiling belowThe real time decrease for the different weather conditions are below:
<style> </style>The changes are also zero-diff with the current main branch, verified by taking the difference between the ice mass over time and the number of ice particles at each output time.