flow 1.4.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
test_mg_fp32_vcycle_mpi.cpp File Reference

ctest mg_fp32_vcycle_mpi: the distributed FP32 V-cycle data (doc/vof_projection_distributed_design.md §5.1-5.3, gate G-K2 of §8). More...

#include <mpi.h>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <Kokkos_Core.hpp>
#include <stdexcept>
#include <string>
#include <vector>
#include "mac_cutcell_mg.hpp"
#include "mg_fp32_problems.hpp"

Go to the source code of this file.

Functions

int main (int argc, char **argv)

Detailed Description

ctest mg_fp32_vcycle_mpi: the distributed FP32 V-cycle data (doc/vof_projection_distributed_design.md §5.1-5.3, gate G-K2 of §8).

On the periodic cyl problem of mg_fp32_vcycle (32^3, R = 8 cylinder, a heavy blob at ratio 1e4) and a 64^3 periodic box with a heavy sphere at 1e4, distributed over MPI_COMM_WORLD with the communication-avoiding coarse levels on (g = 2 where the blocks allow it): G-K2: after the operator build ('fp32'), and again after the setter's rebuild from the stored openness, on every level the FP32 V-cycle runs on (0 .. fp32Last), WX, WY, WZ on every ghost cell (depth g) are memcmp-equal to the owner's values: a copy exchanged with the level's GridHalo<float> equals the stored array on every cell; the range flags are allreduced (fp32WeightsOk collective, true everywhere), the configuration is carriable, and the solve stays ineligible (WO-D1 is inert: the distributed eligibility comes with WO-D2a); an 'fp64' build creates no FP32 halo and no FP32 arrays.

WO-D2a (§5.4-5.7, gates G-DD1, G-DD2 (a)-(e), (g) and G-R (h) of §8), the distributed FP32 V-cycle on the host-scalar PCG / FCG, against a single-rank reference every rank solves itself (column, cyl, pack, a walled slab at 1e2, box64; rtol 1e-10, cap 200): G-DD1 (np 1): one FP32 V-cycle z memcmp-equal on the inner cells; forced 'fp32' (and on a device 'auto') PCG and FCG: x memcmp-equal, iterations equal; G-DD2 (np > 1): (a) max|x_np - x_1| <= max(1e-8, 1e-12 max|x_1|) and iterations within max(1, 5 %) wherever the single-rank solve converges (a configuration converging in neither mode is n/a); (b) one V-cycle z within 1e-11 relative (cyl, box64, equal depth); (c) 'fp32' iterations <= 'fp64' + max(1, 5 %) where 'fp64' converges (every np); (d) np 2, where 'fp64' converges: the attainable floor (rtol 1e-14, cap 300), fp32 <= 2 x fp64; (e) CA on == CA off bitwise (cyl, box64, 30 iterations); (g) np 2: two runs bitwise (30 iterations); G-R (h) (column): (a) 'auto' + kind 1 at 3 and (b) kind 2 at 2 restart to the 'fp64' cold solve (on a device; host 'auto' is 'fp64', the fault inert), (c) forced 'fp32' never restarts; vcycleRestarts() equal on every rank; np 1 memcmp-equal to the single-rank restart. WO-D2b1 (G-DD2 (f)): telescoped hierarchies – natural (column at 6 levels, np 4 and 8) and forced (setTelescopeForceLevel(1), column, np 4): fp32Last is the first telescope level, and (a)-(c) as above – (b) gated where the telescope point is the last non-bottom level (the single-rank precision split); above it FP64 runs below the point (§3.2), so z is reported against the single-rank FP32-vs-FP64 V-cycle difference instead. doc/mg_depth_policy.md A2.4 (WO-7): lineChecks – the zebra line smoother distributed against the single-rank reference on hierarchies with triggered smoothed levels (np 1 memcmp where the LR-off control is memcmp-equal; np > 1 G-DD2 (a)'s bound), FP64 and forced FP32.

Definition in file test_mg_fp32_vcycle_mpi.cpp.

Function Documentation

◆ main()