FrontISTR  5.9.0
Large-scale structural analysis program with finit element method
hecmw_precond_saamg_verify Module Reference

Smoothed Aggregation AMG preconditioner : distributed self-checks. More...

Functions/Subroutines

subroutine, public hecmw_saamg_verify_refresh (dh, A, cmt, B, m, prm, n)
 Verify the distributed numeric refresh: refreshing with the SAME operator A must reproduce the freshly-built preconditioner (refresh reuses aggregation / coarse comm table / tentative P-hat, recomputes the value-dependent parts). Applies M^{-1} to a partition-invariant seed before and after refresh and reports the global relative difference, which must be ~machine precision. More...
 
subroutine, public hecmw_saamg_verify_matvec (hecMAT, hecMESH, cmt, ndof)
 F4a self-check: the distributed (halo-aware) matvec applied to a globally consistent vector x (defined from global node ids) must give the same global ||A x||^2 regardless of how the mesh is partitioned. Compare the printed value between a 1-rank run and a K-rank run: equality proves the comm table and halo exchange are correct (dropping halo columns would change it). More...
 
subroutine, public hecmw_saamg_verify_coarsen (hecMAT, cmt, m, prm)
 F4b self-check: build the uncoupled aggregation and the coarse comm table on the distributed finest operator, verify the coarse table is symmetric (each neighbor's coarse export to me equals my coarse import from it), and report the global coarse-node count. The global coarse-node count is partition-independent-ish (uncoupled aggregation differs only at boundaries); the symmetry flag must be true on every rank. More...
 
subroutine, public hecmw_saamg_verify_prolong (hecMAT, hecMESH, cmt, ndof, m, prm)
 F4b-2 self-check: build the halo-extended tentative prolongator P-hat_ext on the distributed operator and confirm the exact QR identity P-hat_ext * B_c = B_fine holds on ALL rows (internal AND halo). The halo rows exercise the P-hat block exchange and the coarse near-kernel exchange (coarse comm table). The near-kernel is built with zero centroid so it is globally consistent across ranks (owner and neighbor agree on a shared node's B_fine). More...
 
subroutine, public hecmw_saamg_verify_smoothp (hecMAT, hecMESH, cmt, ndof, m, prm)
 F4c-1 self-check: build the distributed SMOOTHED prolongator P and confirm the global near-kernel residual ||P B_c - B_f||^2 (over internal rows) is partition-independent. Smoothing does not preserve B exactly (P B_c = B_f - omega D^{-1} A B_f), so the residual is nonzero, but it is the SAME global value on 1 / K ranks iff the smoothed P, the shared lambda_max (omega) and the coarse near-kernel exchange are all correct. Compare the printed value between a 1-rank and a K-rank run. More...
 

Detailed Description

Smoothed Aggregation AMG preconditioner : distributed self-checks.

Diagnostic routines run only under the verify option at setup. Each rebuilds a stage of the distributed pipeline (halo matvec / aggregation+coarse comm table / tentative & smoothed prolongator / numeric refresh) and prints a global, partition-invariant quantity, so a 1-rank and a K-rank run can be compared to confirm the MPI construction. Separated from the production backend so the preconditioner lifecycle stays free of diagnostic code.

Function/Subroutine Documentation

◆ hecmw_saamg_verify_coarsen()

subroutine, public hecmw_precond_saamg_verify::hecmw_saamg_verify_coarsen ( type(hecmwst_matrix), intent(in)  hecMAT,
type(hecmwst_saamg_comm), intent(in)  cmt,
integer(kind=kint), intent(in)  m,
type(hecmwst_saamg_params), intent(in)  prm 
)

F4b self-check: build the uncoupled aggregation and the coarse comm table on the distributed finest operator, verify the coarse table is symmetric (each neighbor's coarse export to me equals my coarse import from it), and report the global coarse-node count. The global coarse-node count is partition-independent-ish (uncoupled aggregation differs only at boundaries); the symmetry flag must be true on every rank.

Definition at line 156 of file hecmw_precond_SAAMG_verify.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hecmw_saamg_verify_matvec()

subroutine, public hecmw_precond_saamg_verify::hecmw_saamg_verify_matvec ( type(hecmwst_matrix), intent(in)  hecMAT,
type(hecmwst_local_mesh), intent(in)  hecMESH,
type(hecmwst_saamg_comm), intent(in)  cmt,
integer(kind=kint), intent(in)  ndof 
)

F4a self-check: the distributed (halo-aware) matvec applied to a globally consistent vector x (defined from global node ids) must give the same global ||A x||^2 regardless of how the mesh is partitioned. Compare the printed value between a 1-rank run and a K-rank run: equality proves the comm table and halo exchange are correct (dropping halo columns would change it).

Definition at line 121 of file hecmw_precond_SAAMG_verify.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hecmw_saamg_verify_prolong()

subroutine, public hecmw_precond_saamg_verify::hecmw_saamg_verify_prolong ( type(hecmwst_matrix), intent(in)  hecMAT,
type(hecmwst_local_mesh), intent(in)  hecMESH,
type(hecmwst_saamg_comm), intent(in)  cmt,
integer(kind=kint), intent(in)  ndof,
integer(kind=kint), intent(in)  m,
type(hecmwst_saamg_params), intent(in)  prm 
)

F4b-2 self-check: build the halo-extended tentative prolongator P-hat_ext on the distributed operator and confirm the exact QR identity P-hat_ext * B_c = B_fine holds on ALL rows (internal AND halo). The halo rows exercise the P-hat block exchange and the coarse near-kernel exchange (coarse comm table). The near-kernel is built with zero centroid so it is globally consistent across ranks (owner and neighbor agree on a shared node's B_fine).

Definition at line 195 of file hecmw_precond_SAAMG_verify.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hecmw_saamg_verify_refresh()

subroutine, public hecmw_precond_saamg_verify::hecmw_saamg_verify_refresh ( type(hecmwst_saamg_hier), intent(inout)  dh,
type(hecmwst_saamg_bcsr), intent(in)  A,
type(hecmwst_saamg_comm), intent(in)  cmt,
real(kind=kreal), dimension(:,:), intent(in)  B,
integer(kind=kint), intent(in)  m,
type(hecmwst_saamg_params), intent(in)  prm,
integer(kind=kint), intent(in)  n 
)

Verify the distributed numeric refresh: refreshing with the SAME operator A must reproduce the freshly-built preconditioner (refresh reuses aggregation / coarse comm table / tentative P-hat, recomputes the value-dependent parts). Applies M^{-1} to a partition-invariant seed before and after refresh and reports the global relative difference, which must be ~machine precision.

Definition at line 37 of file hecmw_precond_SAAMG_verify.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hecmw_saamg_verify_smoothp()

subroutine, public hecmw_precond_saamg_verify::hecmw_saamg_verify_smoothp ( type(hecmwst_matrix), intent(in)  hecMAT,
type(hecmwst_local_mesh), intent(in)  hecMESH,
type(hecmwst_saamg_comm), intent(in)  cmt,
integer(kind=kint), intent(in)  ndof,
integer(kind=kint), intent(in)  m,
type(hecmwst_saamg_params), intent(in)  prm 
)

F4c-1 self-check: build the distributed SMOOTHED prolongator P and confirm the global near-kernel residual ||P B_c - B_f||^2 (over internal rows) is partition-independent. Smoothing does not preserve B exactly (P B_c = B_f - omega D^{-1} A B_f), so the residual is nonzero, but it is the SAME global value on 1 / K ranks iff the smoothed P, the shared lambda_max (omega) and the coarse near-kernel exchange are all correct. Compare the printed value between a 1-rank and a K-rank run.

Definition at line 260 of file hecmw_precond_SAAMG_verify.f90.

Here is the call graph for this function:
Here is the caller graph for this function: