sst-core
sst-core copied to clipboard
getTimeLord deprecation warning
Hello, I note that under SST 12 if your code called getTimeLord() from SST::Simulation, there is now a deprecation warning. Unfortunately, the warning is not very clear about what to call instead. Based on the message, I tried to grep the sst core course code for an alternative getTimeLord() function but found nothing. What is the recommended replacement for this function going forward?
Which API functions from the TimeLord are you trying to access? We are working on a new parallelization scheme for threading and have to limit access to some of the core features through static functions. The features in TimeLord should be available through the BaseComponent class. If you are trying to access the features through a class that doesn't inherit from BaseComponent or the feature you want isn't available in BaseComponent, let us know. This is likely just an oversight and we can add it into the API before SST13 when the static functions will be removed.
I'm also interested in this issue. I use the TimeLord to get the TimeConverter used by the Simulator. I see that it has moved to Simulator_impl, but there's not public access to that class.
BaseComponent::getCoreTimeBase() will give you the timebase used by the Simulation object. If you need a TimeConverter, you can then call BaseComponent::getTimeConverter() to create a TimeConverter from it (by definition, it will have a factor of 1). If you’re trying to get these from a class inheriting from a different core class, let me know what class. We are getting rid of the static functions to allow greater flexibility in parallelization in the future. All access to time elements in the core will have to go through other classes that the models inherit from. The time functions are part of the public const BaseComponent API, so you can also access the time functions through a pointer to a Component or BaseComponent.
Are these BaseComponent API calls sufficient for you use cases? If so, can I close this issue?
Yes, they're sufficient. Thank you.
Thank you for your quick response! It’s going to take me a couple days to get the information you need but I will get back to you.
From: Scott Hemmert @.> Sent: Tuesday, May 24, 2022 2:34 PM To: sstsimulator/sst-core @.> Cc: Stevens, Kelly E. M. @.>; Author @.> Subject: Re: [sstsimulator/sst-core] getTimeLord deprecation warning (Issue #860)
Which API functions from the TimeLord are you trying to access? We are working on a new parallelization scheme for threading and have to limit access to some of the core features through static functions. The features in TimeLord should be available through the BaseComponent class. If you are trying to access the features through a class that doesn't inherit from BaseComponent or the feature you want isn't available in BaseComponent, let us know. This is likely just an oversight and we can add it into the API before SST13 when the static functions will be removed.
— Reply to this email directly, view it on GitHubhttps://github.com/sstsimulator/sst-core/issues/860#issuecomment-1136301457, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACIGYGCG7RR6DGSE2H5TRYLVLUOHXANCNFSM5W2PQ4UA. You are receiving this because you authored the thread.Message ID: @.@.>>
Currently, there is not any deprecation warning for calling getTimeLord(), and the required functionality exists within BaseComponent (by utilizing the simulation_impl.h file). The simulation.h file indicates that it will be removed by SST 14. I spoke to kemstevens and she is satisfied with the update, so we are good to close this issue.
Just to be clear, the simulation_impl.h file will not be available outside of the core starting with SST 14. Do you still have the functionality you need from the BaseComponent API? Want to make sure you have the functionality you need when SST 14 drops.
Yes, the BaseComponent API sufficiently contains the desired functionality
Thanks. Closing.