Documentation for module hfx_load_balance_methods

Rountines for optimizing load balance between processes in HFX calculations

source: hfx_load_balance_methods.F
Loading...

public Subroutines/Functions:

...
FUNCTION
INTEGER(int_8)
cost_model (nsa, nsb, nsc, nsd, npgfa, npgfb, npgfc, npgfd, ratio, p1, p2, p3)
estimates the cost of a set quartet with info available at load balance time i.e. without much info on the primitives primitives
Distributes the computation of eri's to all available processes.
Cheap way of redistributing the eri's

Parameters:

REAL(dp)
:: p1_energy(12) = (/2.9461408209700424_dp,1.0624718662999657_dp,-1.91570128356921242e-002_dp,-1.6668495454436603_dp,1.7512639006523709_dp,-9.76074323945336081e-002_dp,2.6230786127311889_dp,-0.31870737623014189_dp,7.9588203912690973_dp,1.8331423413134813_dp,-0.15427618665346299_dp,0.19749436090711650_dp/)
REAL(dp)
:: p2_energy(12) = (/2.3104682960662593_dp,1.8744052737304417_dp,-9.36564055598656797e-002_dp,0.64284973765086939_dp,1.0137565430060556_dp,-6.80088178288954567e-003_dp,1.1692629207374552_dp,-2.6314710080507573_dp,19.237814781880786_dp,1.0505934173661349_dp,0.80382371955699250_dp,0.49903401991818103_dp/)
REAL(dp)
:: p3_energy(2) = (/7.82336287670072350e-002_dp,0.38073304105744837_dp/)

SUBROUTINEcollect_load_balance_info(para_env, x_data, iw, n_threads, i_thread, eval_type)

...

Arguments:
POINTER
:: para_env ...
TYPE(hfx_type),
POINTER
:: x_data ...
INTEGER,
INTENT(in)
:: iw ...
INTEGER,
INTENT(in)
:: n_threads ...
INTEGER,
INTENT(in)
:: i_thread ...
INTEGER,
INTENT(in)
:: eval_type ...

FUNCTIONcost_model(nsa, nsb, nsc, nsd, npgfa, npgfb, npgfc, npgfd, ratio, p1, p2, p3)

estimates the cost of a set quartet with info available at load balance time i.e. without much info on the primitives primitives

Return Value ::
INTEGER(int_8)
Arguments:
INTEGER
:: nsa ...
INTEGER
:: nsb ...
INTEGER
:: nsc ...
INTEGER
:: nsd ...
INTEGER
:: npgfa ...
INTEGER
:: npgfb ...
INTEGER
:: npgfc ...
INTEGER
:: npgfd ...
REAL(dp)
:: ratio ...
REAL(dp),
INTENT(in)
:: p1(12) ...
REAL(dp),
INTENT(in)
:: p2(12) ...
REAL(dp),
INTENT(in)
:: p3(2) ...

SUBROUTINEhfx_load_balance(x_data, eps_schwarz, particle_set, max_set, para_env, coeffs_set, coeffs_kind, is_assoc_atomic_block_global, do_periodic, load_balance_parameter, kind_of, basis_parameter, pmax_set, pmax_atom, i_thread, n_threads, cell, do_p_screening, map_atom_to_kind_atom, nkind, eval_type, pmax_block, use_virial)

Distributes the computation of eri's to all available processes.

Arguments:
TYPE(hfx_type),
POINTER
:: x_data Object that stores the indices array
REAL(dp),
INTENT(in)
:: eps_schwarz screening parameter
POINTER
:: particle_set(:) ...
INTEGER,
INTENT(in)
:: max_set Maximum number of set to be considered
POINTER
:: para_env para_env
POINTER
:: coeffs_set(:,:,:,:) screening functions
POINTER
:: coeffs_kind(:,:) screening functions
INTEGER
:: is_assoc_atomic_block_global(:,:) KS-matrix sparsity
LOGICAL
:: do_periodic flag for periodicity
POINTER
:: load_balance_parameter Paramters for Monte-Carlo routines
INTEGER
:: kind_of(*) helper array for mapping
POINTER
:: basis_parameter(:) Basis set parameters
TYPE(hfx_p_kind),
POINTER
:: pmax_set(:) Initial screening matrix
REAL(dp),
POINTER
:: pmax_atom(:,:) ...
INTEGER,
INTENT(in)
:: i_thread Process ID of current Thread
INTEGER,
INTENT(in)
:: n_threads Total Number of Threads
TYPE(cell_type),
POINTER
:: cell cell
LOGICAL,
INTENT(in)
:: do_p_screening Flag for initial p screening
INTEGER,
POINTER
:: map_atom_to_kind_atom(:) ...
INTEGER,
INTENT(in)
:: nkind ...
INTEGER,
INTENT(in)
:: eval_type ...
REAL(dp),
POINTER
:: pmax_block(:,:) ...
LOGICAL,
INTENT(in)
:: use_virial ...

SUBROUTINEhfx_update_load_balance(x_data, para_env, load_balance_parameter, i_thread, n_threads, eval_type)

Cheap way of redistributing the eri's

Arguments:
TYPE(hfx_type),
POINTER
:: x_data Object that stores the indices array
POINTER
:: para_env para_env
:: load_balance_parameter contains parmameter for Monte-Carlo routines
INTEGER,
INTENT(in)
:: i_thread current thread ID
INTEGER,
INTENT(in)
:: n_threads Total Number of threads
INTEGER,
INTENT(in)
:: eval_type ...