|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| sphere_sdf (o, sz, n, per_axis=2, rfrac=0.35) | |
| bed_weights (n, bed, lam, tilt=0.0, seed=7) | |
| blocks (comm, s) | |
| describe (tag, comm, blks, w, n) | |
| run_steps (comm, s, k) | |
| main () | |
SCALING_ISSUES #2 TRAP probe — does a WEIGHTED level-0 decomposition collapse the pressure
multigrid's telescope to one rank?
The claim (read from `src/mac_cutcell_mg.hpp`, not measured when it was written): after
`diagnostics.rebalance_by_weights(w)` the level-0 blocks are no longer even on the coarsenable
axes, the telescope fires at L = 0, and the agglomeration-depth search falls through to d = 0 —
the whole level-0 residual gathered onto ONE rank every V-cycle.
This measures it, flow-only (the coupling's `CfdDem.rebalance()` reaches the same call):
1. build a distributed Solver on the default equal-weight aligned ORB, run a few steps;
2. record the per-rank blocks (origin, size, parity) and the pressure iterations / step time;
3. `rebalance_by_weights(w)` with a particle-bed-like weight (1 + Poisson counts in the bottom
`--bed` fraction of z), record the same again.
The MG ladder (levels, ranks per level, which transitions TELESCOPE) is printed by flow itself on
rank 0 at every hierarchy build when PECLET_FLOW_MG_DEBUG=1 (a trace-only env var; it changes no
result). The ranks column of the level after a telescope point is the size of the roots'
sub-communicator, i.e. 2^d for the depth d the search selected (np a power of two).
PECLET_FLOW_MG_DEBUG=1 OMP_NUM_THREADS=2 OMP_PROC_BIND=false \
/usr/bin/mpirun -np 8 --map-by slot:PE=2 --bind-to core python tests/study/weighted_dec0_telescope_probe.py --n 96 --levels 4
| weighted_dec0_telescope_probe.sphere_sdf | ( | o, | |
| sz, | |||
| n, | |||
per_axis = 2, |
|||
rfrac = 0.35 |
|||
| ) |
Periodic simple-cubic array of spheres (per_axis^3 of them), sampled at cell centres of this rank's block (cell units, origin 0). Negative inside the solid.
Definition at line 35 of file weighted_dec0_telescope_probe.py.
Referenced by main().
| weighted_dec0_telescope_probe.bed_weights | ( | n, | |
| bed, | |||
| lam, | |||
tilt = 0.0, |
|||
seed = 7 |
|||
| ) |
1 + Poisson(lam) particle counts below a bed surface, 1 above — a settled bed, as `CfdDem.rebalance(gamma=1)` would build it (1 + gamma * count). tilt = 0 is a FLAT bed at z = bed*n (uniform in x and y, so the x/y ORB splits stay at the equal-cell positions); tilt > 0 is a HEAP whose surface falls linearly in x and y, z_s = bed*n*(1 + tilt*(1/2 - x/n) + tilt*(1/2 - y/n)), which moves every split. Global, x-fastest (Fortran ravel), identical on every rank (same seed).
Definition at line 50 of file weighted_dec0_telescope_probe.py.
Referenced by main().
| weighted_dec0_telescope_probe.blocks | ( | comm, | |
| s | |||
| ) |
Definition at line 65 of file weighted_dec0_telescope_probe.py.
Referenced by main().
| weighted_dec0_telescope_probe.describe | ( | tag, | |
| comm, | |||
| blks, | |||
| w, | |||
| n | |||
| ) |
Definition at line 71 of file weighted_dec0_telescope_probe.py.
Referenced by main().
| weighted_dec0_telescope_probe.run_steps | ( | comm, | |
| s, | |||
| k | |||
| ) |
Per step: pressure iterations, wall time (barrier to barrier), and the max over ranks of the solver's own projection and momentum timers (`last_step_timers`).
Definition at line 92 of file weighted_dec0_telescope_probe.py.
Referenced by main().
| weighted_dec0_telescope_probe.main | ( | ) |
Definition at line 109 of file weighted_dec0_telescope_probe.py.
References bed_weights(), blocks(), describe(), main(), run_steps(), and sphere_sdf().
Referenced by main().