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

Allocating multiple blocks to one mpi rank in LB #5026

Open
wants to merge 38 commits into
base: python
Choose a base branch
from

Conversation

hidekb
Copy link

@hidekb hidekb commented Jan 10, 2025

Description of changes:

  • LB CPU now supports allocating multiple blocks to one mpi rank
    • The default block number per mpi rank is 1
    • The block number per mpi rank is controlled by the argument blocks_per_mpi_rank for LBFluidWalberla

@hidekb hidekb marked this pull request as draft January 10, 2025 18:01
maintainer/benchmarks/lb.py Outdated Show resolved Hide resolved
src/script_interface/walberla/LBFluid.cpp Show resolved Hide resolved
src/walberla_bridge/src/BoundaryPackInfo.hpp Outdated Show resolved Hide resolved
src/walberla_bridge/src/LatticeWalberla.cpp Show resolved Hide resolved
src/walberla_bridge/src/LatticeWalberla.cpp Show resolved Hide resolved
return v * u


LB_PARAMS = {'agrid': 1.,
Copy link
Contributor

Choose a reason for hiding this comment

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

Pls avoid 1s in unit tests, as wrong exponents don't get cauth.

Copy link
Author

Choose a reason for hiding this comment

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

I moved this function.

Copy link
Author

Choose a reason for hiding this comment

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

I changed the value of agrid from 1. to 0.6.

@RudolfWeeber
Copy link
Contributor

Thank you. Looks good in general.
One thing worth looking into is the cell interval business. It looks like there are a lot of very similar loops in the getters and setters for slices. Would it it be possible to pull that out into a function, which then is called with different lambdas for the individual cases?
@jngrad could you maybe take a look?

@hidekb
Copy link
Author

hidekb commented Jan 15, 2025

Thank you. Looks good in general. One thing worth looking into is the cell interval business. It looks like there are a lot of very similar loops in the getters and setters for slices. Would it it be possible to pull that out into a function, which then is called with different lambdas for the individual cases?

I rewrote the code related to the getters and setters for slices. Similar loops are pulled into a function which calls different lambdas for the individual cases.

maintainer/benchmarks/lb.py Outdated Show resolved Hide resolved
maintainer/benchmarks/lb_weakscaling.py Outdated Show resolved Hide resolved
src/python/espressomd/lb.py Outdated Show resolved Hide resolved
src/script_interface/walberla/LBFluid.cpp Outdated Show resolved Hide resolved
src/script_interface/walberla/LBFluid.cpp Show resolved Hide resolved
src/walberla_bridge/src/utils/types_conversion.hpp Outdated Show resolved Hide resolved
testsuite/python/lb.py Outdated Show resolved Hide resolved
testsuite/python/lb_couette_xy.py Outdated Show resolved Hide resolved
testsuite/python/lb_mass_conservation.py Outdated Show resolved Hide resolved
testsuite/python/lb_shear.py Outdated Show resolved Hide resolved
@hidekb hidekb marked this pull request as ready for review January 23, 2025 18:49
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.

3 participants