-
Notifications
You must be signed in to change notification settings - Fork 36
Consumption benchmarking #443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Consumption benchmarking #443
Conversation
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
See minor comment to remove unused variable warning.
Can merge after we successfully ran it in the frameworks
|
||
AdePTTrackingManager::~AdePTTrackingManager() | ||
{ | ||
auto tid = G4Threading::G4GetThreadId(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto tid = G4Threading::G4GetThreadId(); |
Unused variable that caused a warning
Adds the
ENABLE_POWER_METER
cmake option in order to do power consumption measurements.If the option is enabled, we use the power meter library to launch a background thread taking measurements from CPU and GPU. The monitoring is started once AdePT initialization is finished, and ends when shutting down the application.
Note that if the option is enabled, simulations need to be run with root access, which is required in order to read the CPU's MSR registers.
Prior to Geant4 11.3 the specialized tracking managers were not deleted by Geant4. Since the power meter is stopped in the tracking manager destructor, this will lead to an error message in older geant4 versions when the program ends without joining the power meter thread. This should not cause a memory leak, since
terminate()
will be called on the unjoined thread.