Skip to content
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

Missing the number of replicas in performance estimate #578

Merged
merged 5 commits into from May 27, 2022

Conversation

ijpulidos
Copy link
Contributor

@ijpulidos ijpulidos commented Apr 19, 2022

Description

The number of replicas was a factor missing in the estimation of the raw performance for the real time analysis output.

Todos

  • Implement feature / fix bug

Status

  • Ready to go

@@ -1759,7 +1759,8 @@ def _update_timing(self, iteration_time, partial_total_time, run_initial_iterati
# TODO: use units for timing information to easily convert between seconds and days
# there are some mcmc_moves that have no timestep attribute, catch exception
try:
current_simulated_time = self.mcmc_moves[0].timestep * self._iteration * self.mcmc_moves[0].n_steps
current_simulated_time = self.mcmc_moves[0].timestep * self._iteration * self.mcmc_moves[0].n_steps * \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we actually be summing over all mcmc_moves, in case there are multiple MCMCMove objects with dynamics involved, or appearing in different order?

And something still seems off here---do we want to use the estimate from average_seconds_per_iteration instead of the partial_total_time (which is the accumulated time since run() was started)?

Copy link
Contributor

@mikemhenry mikemhenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the change log?

@@ -1774,6 +1772,15 @@ def _display_cuda_devices():
cuda_devices_list = [entry.split(',') for entry in cuda_query_output.split('\n')]
logger.debug(f"CUDA devices available: {*cuda_devices_list,}")

def _flatten_moves_iterator(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a docstring (I know it is a private method but I it would be nice) describing what this method does.

moves_iterator = self._flatten_moves_iterator()
current_simulated_nanoseconds = sum([move.timestep.value_in_unit(unit.nanosecond) * move.n_steps for
move in moves_iterator if hasattr(move, "timestep") and hasattr(move, "n_steps")])
self._timing_data["ns_per_day"] = current_simulated_nanoseconds / (partial_total_time / 86400)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to add something like 86400 (seconds in a day) or something -- not everyone will know what that number means. Even better would be to use unit to do the conversion since we are using the line above it.

@ijpulidos
Copy link
Contributor Author

@mikemhenry Thanks for the comments, I've checked the numbers with the perses benchmarks and the estimates seem to be correct. Can you give this another look when you have the chance? Thanks!

Copy link
Contributor

@mikemhenry mikemhenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mikemhenry mikemhenry requested a review from jchodera May 26, 2022 22:22
@ijpulidos ijpulidos merged commit bb015a2 into main May 27, 2022
@ijpulidos ijpulidos deleted the fix-report-ns-per-day branch May 27, 2022 14:27
@ijpulidos ijpulidos modified the milestones: 0.22.0, 0.21.4 Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants