|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| arg (name, default) | |
| one () | |
| gather (a) | |
Variables | |
| CASE_DIR | |
| CKPT | |
| N = int(sys.argv[1]) | |
| str | WARM = int(sys.argv[sys.argv.index("--warm") + 1]) if "--warm" in sys.argv else 5 |
| RTOL = float(arg("--rtol", 1e-8)) | |
| DUMP = arg("--dump", None) | |
| comm = MPI.COMM_WORLD | |
| rank = comm.Get_rank() | |
| int | SINGLE = 1 |
| S = case.CELLS_PER_D | |
| NX | |
| NY | |
| NZ | |
| step | |
| t | |
| blocks | |
| vel | |
| pres | |
| series | |
| org | |
| siz | |
| sl = tuple(slice(o, o + n) for o, n in zip(org, siz)) | |
| s = pf.Solver(*siz) | |
| vol = comm.allreduce(sum(b["volume"] for b in s.diagnostics.vof_block_stats()), op=MPI.SUM) | |
| alpha = vol / (NX * NY * NZ) | |
| rho_av = case.RHO_L + (case.RHO_G - case.RHO_L) * alpha | |
| _closure = getattr(s, "set_superficial_velocity", None) or getattr(s, "set_bulk_velocity", None) | |
| HOST_FLUX = _closure is None | |
| w0 = time.perf_counter() | |
| it | |
| dts | |
| wall = time.perf_counter() - w0 | |
| flush | |
| dict | fields |
| tuple | cols |
| iters | |
Distributed timing of the bubble column from ckpt_t43 (host MPI x OpenMP; the VoF
step-performance harness, WO-0 -- doc/vof_step_performance_design.md).
export OMPI_MCA_hwloc_base_binding_policy=none
PYTHONPATH=<PECLET_FLOW_MPI build> OMP_NUM_THREADS=3 OMP_PROC_BIND=false \
mpirun -np 8 --bind-to none python tests/study/vof_perf/run_mpi.py N [--warm W] [--cheb]
[--rtol R] [--dump out.npz] [--ckpt PATH] [--case-dir DIR]
Same case as run_peclet.build(), on this rank's ORB block; set_superficial_velocity closes the
column (a build older than it shifts u on the host: global mean via Allreduce). --ckpt and
--case-dir default as in prof.py. Prints one line on rank 0: ms/step and mean pressure iterations.
--rtol R MG-PCG relative tolerance (default 1e-8: the case's registered tolerance, register
2026-10-03; the solver default stays 1e-10)
--dump F save u, v, w, p, C, the timed steps' dt (dts) and pressure iterations (iters) in
prof.py's format (compare with cmp.py); the fields are gathered onto rank 0 at np > 1,
the VoF block colours (col<id>) are stored at np = 1 only
np = 1 is SINGLE-RANK: at size 1 neither mpi_block nor init_mpi is called (sec. 14.3 H-0 of
doc/vof_step_performance_design.md). init_mpi at size 1 keeps the distributed path on purpose (the
register's np = 1 bit-exactness gate needs it), so a one-rank benchmark that called it timed the
distributed code -- GridHalo self-copies, the box smoother, no single-rank fusions.
| run_mpi.arg | ( | name, | |
| default | |||
| ) |
Definition at line 33 of file run_mpi.py.
| run_mpi.one | ( | ) |
| run_mpi.gather | ( | a | ) |
Definition at line 122 of file run_mpi.py.
| run_mpi.CASE_DIR |
Definition at line 37 of file run_mpi.py.
| run_mpi.CKPT |
Definition at line 39 of file run_mpi.py.
| run_mpi.N = int(sys.argv[1]) |
Definition at line 46 of file run_mpi.py.
| str run_mpi.WARM = int(sys.argv[sys.argv.index("--warm") + 1]) if "--warm" in sys.argv else 5 |
Definition at line 47 of file run_mpi.py.
| run_mpi.RTOL = float(arg("--rtol", 1e-8)) |
Definition at line 48 of file run_mpi.py.
| run_mpi.DUMP = arg("--dump", None) |
Definition at line 49 of file run_mpi.py.
| run_mpi.comm = MPI.COMM_WORLD |
Definition at line 50 of file run_mpi.py.
| run_mpi.rank = comm.Get_rank() |
Definition at line 51 of file run_mpi.py.
| int run_mpi.SINGLE = 1 |
Definition at line 52 of file run_mpi.py.
| run_mpi.S = case.CELLS_PER_D |
Definition at line 53 of file run_mpi.py.
| run_mpi.NX |
Definition at line 54 of file run_mpi.py.
| run_mpi.NY |
Definition at line 54 of file run_mpi.py.
| run_mpi.NZ |
Definition at line 54 of file run_mpi.py.
| run_mpi.step |
Definition at line 56 of file run_mpi.py.
| run_mpi.t |
Definition at line 56 of file run_mpi.py.
| run_mpi.blocks |
Definition at line 56 of file run_mpi.py.
| run_mpi.vel |
Definition at line 56 of file run_mpi.py.
| run_mpi.pres |
Definition at line 56 of file run_mpi.py.
| run_mpi.series |
Definition at line 56 of file run_mpi.py.
| run_mpi.org |
Definition at line 58 of file run_mpi.py.
| run_mpi.siz |
Definition at line 58 of file run_mpi.py.
Definition at line 61 of file run_mpi.py.
| run_mpi.s = pf.Solver(*siz) |
Definition at line 62 of file run_mpi.py.
| run_mpi.vol = comm.allreduce(sum(b["volume"] for b in s.diagnostics.vof_block_stats()), op=MPI.SUM) |
Definition at line 78 of file run_mpi.py.
| run_mpi.rho_av = case.RHO_L + (case.RHO_G - case.RHO_L) * alpha |
Definition at line 80 of file run_mpi.py.
|
protected |
Definition at line 83 of file run_mpi.py.
| run_mpi.HOST_FLUX = _closure is None |
Definition at line 86 of file run_mpi.py.
| run_mpi.w0 = time.perf_counter() |
Definition at line 110 of file run_mpi.py.
| run_mpi.it |
Definition at line 111 of file run_mpi.py.
| run_mpi.dts |
Definition at line 111 of file run_mpi.py.
| run_mpi.wall = time.perf_counter() - w0 |
Definition at line 116 of file run_mpi.py.
| run_mpi.flush |
Definition at line 120 of file run_mpi.py.
| run_mpi.fields |
Definition at line 130 of file run_mpi.py.
| tuple run_mpi.cols |
Definition at line 133 of file run_mpi.py.
| run_mpi.iters |
Definition at line 136 of file run_mpi.py.