Skip to content

Conversation

@lifflander
Copy link
Contributor

Fixes #142

@lifflander lifflander linked an issue Feb 26, 2025 that may be closed by this pull request
Copy link
Contributor

@cwschilly cwschilly left a comment

Choose a reason for hiding this comment

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

I think it may be more efficient to have a single function find both the number of phases n_phases and the minimum phase min_phase and store both as member variables of info. This would reduce the amount of times we have to loop through all ranks and phases.

@lifflander
Copy link
Contributor Author

I think it may be more efficient to have a single function find both the number of phases n_phases and the minimum phase min_phase and store both as member variables of info. This would reduce the amount of times we have to loop through all ranks and phases.

Getting the number of phases should be a constant time operation of just looking at the size of the phase_info for rank 0. The min_phase does cost more, but I agree that it should just happen once.

@lifflander
Copy link
Contributor Author

I have made min phase cached so it doesn't compute each time, which should improve performance.

Copy link
Contributor

@cwschilly cwschilly left a comment

Choose a reason for hiding this comment

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

LGTM

@ppebay
Copy link
Contributor

ppebay commented May 12, 2025

@lifflander does this need to be re-reviewed?

If not @cwschilly please do the update/rebase and send it to @lifflander for merging, thanks

@lifflander lifflander force-pushed the 142-crash-when-phases-dont-start-at-zero branch from cabb3c4 to 1b49301 Compare May 27, 2025 15:36
@lifflander lifflander force-pushed the 142-crash-when-phases-dont-start-at-zero branch from 1b49301 to 03cb853 Compare June 9, 2025 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash when phases don't start at zero

4 participants