FrontISTR  5.9.0
Large-scale structural analysis program with finit element method
hecmw_precond_SAAMG_comm.F90 File Reference

Go to the source code of this file.

Modules

module  hecmw_precond_saamg_comm
 Smoothed Aggregation AMG preconditioner : lightweight comm table.
 

Functions/Subroutines

subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_abort (msg)
 Fatal-error termination with a clear message. Under MPI this is a COLLECTIVE abort (hecmw_abort -> MPI_Abort) so a setup failure on one rank tears the job down cleanly instead of a bare stop that leaves the other ranks hanging in the next collective. In the stand-alone (HECMW_SERIAL) harness it is a plain stop. Used by the SA-AMG core in place of bare stop on unrecoverable errors. More...
 
logical function, public hecmw_precond_saamg_comm::hecmw_saamg_lapack_available ()
 Whether this build links LAPACK (SA-AMG's setup needs it: dense coarsest factorization, per-aggregate QR, Lanczos tridiagonal eigenvalue). The HECMW_WITH_LAPACK macro is set by the build (–with-lapack / -DWITH_LAPACK). More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_require_lapack (site)
 Abort with a uniform message when a LAPACK-only code path is reached in a build without LAPACK. Defensive: the backend checks availability up front and aborts before setup, so this normally never fires. More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_check_alloc (ier, what)
 Report a failed allocation (stat /= 0) with a clear message and a collective abort, instead of a bare runtime stop. Used on the size-scaling allocations so an out-of-memory / size-overflow failure is diagnosable. (Under default Linux overcommit a true OOM arrives as a SIGKILL before allocate returns, so this catches the catchable cases: size overflow, address-space exhaustion, and cgroup/ulimit-bound failures.) More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_init_serial (cmt, nnode, nb)
 Build a trivial single-rank communication table for nnode nodes of block size nb: no neighbors, internal == all nodes, global id = local id. This mirrors what comm_from_mesh produces on one rank (n_neighbor==0 leaves the neighbor/import/export arrays unallocated – the exchange routines short-circuit on n_neighbor==0). Lets the sequential wrapper drive the distributed core. More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_update (cmt, nb, X)
 Halo exchange of a block vector X (length nb*nnode): fill the halo region nb*nint+1..nb*nnode from the owning ranks. No-op when serial / no neighbors. More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_reverse_add (cmt, nb, X)
 Reverse halo exchange with accumulation: send each halo (import) node's value to its owner and ADD it into the owner's (export) node. The transpose of comm_update; used to assemble restriction contributions (P^T res) that land on coarse rows owned by neighbors. After this, halo entries of X are stale (only the internal/owned entries are meaningful). No-op when serial / no neighbors. More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_update_i (cmt, nb, IX)
 Integer halo exchange of a block vector IX (length nb*cmtnnode): fill the halo region from owners. Used to propagate coarse-node global ids and aggregate ids across rank boundaries. No-op when serial / no neighbors. More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_update_var (cmt, pb, cnt, off, X)
 Variable-length real halo exchange. Node i carries cnt(i) blocks of pb reals each, packed contiguously in X starting at block-offset off(i) (0-based); X has length off(nnode+1)*pb. Internal nodes' data and cnt are filled by the caller; halo (import) nodes' cnt must already hold the owner's count (exchange it first with comm_update_i, payload 1), and this routine fills their X region. Unlike comm_update there is no per-node padding to a global maximum: the messages carry exactly sum(cnt) blocks. More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_update_var_i (cmt, cnt, off, IX)
 Variable-length integer halo exchange (1 int per block). Companion to comm_update_var for the per-block column ids: node i carries cnt(i) ints at IX block-offset off(i). More...
 
integer(kind=kint) function, public hecmw_precond_saamg_comm::hecmw_saamg_comm_size (cmt)
 Number of ranks in this level's communicator (1 when serial). More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_allgather_int (cmt, sval, rbuf)
 Allgather one integer from every rank into rbuf (size must be #ranks). More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_exchange_neighbor_int (cmt, sendvals, recvvals)
 Exchange one integer with each neighbor: sendvals(k) is sent to neighbor(k), recvvals(k) is received from neighbor(k). Used to check comm-table symmetry. More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_allreduce_max_r (cmt, s)
 Global max-reduction of a scalar over the communicator (no-op when serial). More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_allreduce_max_int (cmt, n)
 Global max-reduction of an integer over the communicator (no-op when serial). More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_allreduce_sum_int (cmt, n)
 Global sum-reduction of an integer over the communicator (no-op when serial). More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_allreduce_sum_r (cmt, s)
 Global sum-reduction of a scalar over the communicator (no-op when serial). More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_allgatherv_triplets (cmt, nloc, ti, tj, tv, ntot, gti, gtj, gtv)
 Allgatherv a triplet stream (ti,tj,tv)[1:nloc] from every rank into the globally-concatenated (gti,gtj,gtv)[1:ntot] (allocated here). Used to gather every rank's partial coarse-operator contributions for redundant assembly. More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_allgatherv_real (cmt, nloc, vloc, ntot, gv)
 Allgatherv a real vector vloc[1:nloc] from every rank into gv[1:ntot] (allocated here). Used to gather the distributed coarse RHS / near-kernel. More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_alltoall_int (cmt, scnt, rcnt)
 MPI_Alltoall of one integer per rank: scnt(r) (count this rank sends to rank r-1) -> rcnt(r) (count this rank receives from rank r-1). Both size = #ranks. More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_alltoallv_int (cmt, scnt, sbuf, ntot, rbuf)
 MPI_Alltoallv of integers. scnt(#ranks) = send counts per destination rank; sbuf must already be ordered by destination rank. Returns ntot received and the concatenated rbuf (allocated here, ordered by source rank). More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_alltoallv_triplets (cmt, scnt, si, sj, sv, ntot, ri, rj, rv)
 MPI_Alltoallv of triplets (2 int + 1 real). scnt(#ranks) = send counts per destination; si/sj/sv ordered by destination rank. Returns ntot received and ri/rj/rv (allocated here). Routes sparse-matrix partial contributions to the owning ranks (possibly non-neighbors) for distributed Galerkin assembly. More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_alltoallv_real (cmt, scnt, sval, ntot, rval)
 MPI_Alltoallv of reals only, reusing a fixed routing (same scnt as a prior _alltoallv_triplets call). For numeric-only Galerkin refresh: the triplet POSITIONS are unchanged, so only the values are re-routed. sval ordered by destination rank; returns ntot and rval in the identical receive order. More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_copy (src, dst)
 Deep copy a communication table: dst = src. More...
 
subroutine, public hecmw_precond_saamg_comm::hecmw_saamg_comm_free (cmt)