Skip to content

Suggest walker totals to achieve VMC load balance#5412

Merged
prckent merged 3 commits into
QMCPACK:developfrom
prckent:balance_advice
Apr 2, 2025
Merged

Suggest walker totals to achieve VMC load balance#5412
prckent merged 3 commits into
QMCPACK:developfrom
prckent:balance_advice

Conversation

@prckent

@prckent prckent commented Apr 2, 2025

Copy link
Copy Markdown
Contributor

Proposed changes

Help the user by suggesting a walker count that would be load balanced when imbalance is detected.

What type(s) of changes does this code introduce?

  • New feature

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

sulfur, gcc14. A few by-hand MPI task and OpenMP thread count settings.

Checklist

  • Yes. This PR is up to date with current the current state of 'develop'
  • Yes. Code added or changed in the PR has been clang-formatted
  • No. This PR adds tests to cover any new code, or to catch a bug that is being fixed
  • No. Documentation has been added (if appropriate)

app_warning() << "Walkers per rank (" << awc.walkers_per_rank[rank_id] << ") not divisible by number of crowds ("
<< num_crowds << "). This will result in a loss of efficiency.\n";

if (awc.global_walkers % num_ranks || awc.walkers_per_rank[rank_id] % num_crowds)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

awc.global_walkers % (num_ranks * num_crowds) instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I prefer to copy the exact logic used in the lines above for consistency. i.e. If either of those warnings are triggered then this new printout clearly will be. Makes for easier reading.

@ye-luo ye-luo Apr 2, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I found the condition in the if statement wasn't aligned with the warning. I feel it should.
Actually, I misread the code.

@prckent

prckent commented Apr 2, 2025

Copy link
Copy Markdown
Contributor Author

Test this please

@prckent
prckent enabled auto-merge April 2, 2025 21:28
@prckent
prckent merged commit 36903ce into QMCPACK:develop Apr 2, 2025
@prckent
prckent deleted the balance_advice branch January 14, 2026 14:21
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.

2 participants