|
| subroutine, public | bse_matvec::bse_resolve_memory_per_proc (memory_per_proc_gb, para_env, unit_nr) |
| | MEMORY_PER_PROC of the BSE as a number: the keyword's value, or for -1 the memory the rank holds plus the share detected_memory_fraction of the free memory, read once at the first consumer; when the free memory cannot be read, the GW's fallback of 2 GB with a warning.
|
| real(kind=dp) function, public | bse_matvec::bse_memory_left_gb (memory_per_proc_gb, para_env) |
| | What MEMORY_PER_PROC leaves to a step: the resolved memory per MPI rank minus the memory the rank holds now, never negative; both probes reduce over the ranks, so every rank gets the same.
|
| subroutine, public | bse_matvec::bse_matvec_create (mv_env, fm_s_ia, fm_s_bar_ij, fm_s_ab, fm_s_bar_ia, eps_reduced, homo, virt, alpha, w_fac, do_abba, unit_nr, block_cols, memory_per_proc_gb) |
| | Moves the RI slabs onto an npe x 1 process grid, such that every rank owns whole RI slices, and stores them as local 3-index arrays: the contraction over each P in bse_matvec_apply is then a local DGEMM and only the final sum over P crosses the ranks.
|
| subroutine, public | bse_matvec::bse_matvec_release (mv_env) |
| | Frees the sliced slabs, the transition energies and the process grid of mv_env.
|
| subroutine, public | bse_matvec::bse_matvec_vector_struct (mv_env, ncol_global, fm_struct) |
| | Matrix structure of a block of trial vectors: rows ia distributed, all columns local.
|
| subroutine, public | bse_matvec::bse_matvec_apply (mv_env, fm_z, first_col, ncol, fm_az, fm_bz, first_col_bz) |
| | Applies A (and B) to ncol trial vectors without forming an N_ov x N_ov object, (A Z)_ia = (ε_a-ε_i) Z_ia + α sum_P B^P_ia sum_jb B^P_jb Z_jb - w sum_Pjb \bar{B}^P_ij B^P_ab Z_jb (B Z)_ia = α sum_P B^P_ia sum_jb B^P_jb Z_jb - w sum_Pjb \bar{B}^P_ib B^P_ja Z_jb α: exchange prefactor (2 singlet, 0 triplet), w: prefactor of the screened term, \bar{B}: slab bound by the caller of bse_matvec_create (B itself for TDHF and ALPHA screening, sum_Q [1+Q(0)]^-1_PQ B^Q otherwise); the sums over P run over the local RI slices and are completed by a sum over the ranks.
|
| subroutine, public | bse_matvec::bse_matvec_diagonal (mv_env, precond_kind, diag) |
| | Diagonal used by the Davidson correction, either ε_a-ε_i or the full diagonal A_ia,ia = ε_a-ε_i + α sum_P (B^P_ia)^2 - w sum_P \bar{B}^P_ii B^P_aa with α, w and \bar{B} as in bse_matvec_apply.
|
| subroutine, public | bse_matvec::bse_matvec_subblock (mv_env, ia_list, a_sub, b_sub) |
| | Exact A (and B) on a list of transitions, replicated on every rank, A_kl = δ_kl (ε_a-ε_i) + α sum_P B^P_ia B^P_jb - w sum_P \bar{B}^P_ij B^P_ab B_kl = α sum_P B^P_ia B^P_jb - w sum_P \bar{B}^P_ib B^P_ja with k = (i,a), l = (j,b) and α, w, \bar{B} as in bse_matvec_apply.
|
| subroutine, public | bse_matvec::bse_matvec_selfcheck (mv_env, fm_a_explicit, unit_nr, fm_b_explicit) |
| | Debug check of the matrix-free application against the explicit matrices A (and B), dev = max_ia,k |(A Z)_ia,k - sum_jb A_ia,jb Z_jb,k| over up to eight unit vectors Z_ia,k = δ_ia,k and one dense vector Z_ia = sin(ia), the same for B, and max_ia |d_ia - A_ia,ia| for the diagonal.
|