-
Notifications
You must be signed in to change notification settings - Fork 215
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
Time tracing for the openPMD plugin #4909
Time tracing for the openPMD plugin #4909
Conversation
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.
Some todos for myself
@@ -102,6 +103,50 @@ namespace picongpu | |||
DataSpace<simDim> localWindowToDomainOffset; | |||
|
|||
std::vector<double> times; | |||
static constexpr bool do_trace_times = PIC_IO_TIMES_NUMBER_OF_FILES > 0; |
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.
maybe timeTraceEnabled
note: we use camel case for variables in PIConGPU
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.
I've used enableTimeTrace
now
std::chrono::duration_cast<std::chrono::milliseconds>(currentTime.time_since_epoch()).count()); | ||
} | ||
}; | ||
template<typename Clock> |
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.
= std::chrono::milliseconds
then we can remove it from a bunch of code but it still allows us to change the precision.
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.
I've restructured this to:
template<bool enable = true, typename Clock = std::chrono::system_clock>
class DumpTimes
{
public:
// ...
using TimeFormatter = typename TimeFormatters<Clock>::TimeFormatter;
3377bcb
to
3746ddf
Compare
fb51b2e
into
ComputationalRadiationPhysics:dev
This is something that I've been using for years now on a private branch of PIConGPU, but having an approachable way to get detailed timing information from the openPMD plugin is probably not only relevant for me.
This is disabled by default (via a no-op template specialization), but can be enabled in CMake via
-DPIC_IO_TIMES_NUMBER_OF_FILES
. The value of this parameter is an integer that specifies how many MPI ranks should participate in this time tracing. Every MPI rank writes its own output file with timing information, and at large scale only a subselection of MPI ranks should do that in order not to accidentally destroy the performance while trying to measure it.The output for one run of the plugin may look sth like this:
The first column is the UNIX time stamp, the second column the diff time in milliseconds to the previous event, the rest is description.