(git:3add494)
hfx_load_balance_methods Module Reference

Routines for optimizing load balance between processes in HFX calculations. More...

Functions/Subroutines

subroutine, public hfx_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. More...
 
subroutine, public hfx_update_load_balance (x_data, para_env, load_balance_parameter, i_thread, n_threads, eval_type)
 Cheap way of redistributing the eri's. More...
 
integer(kind=int_8) function, public 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 More...
 
subroutine, public collect_load_balance_info (para_env, x_data, iw, n_threads, i_thread, eval_type)
 ... More...
 

Variables

real(kind=dp), dimension(12), parameter, public p1_energy = (/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(kind=dp), dimension(12), parameter, public p2_energy = (/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(kind=dp), dimension(2), parameter, public p3_energy = (/7.82336287670072350E-002_dp, 0.38073304105744837_dp/)
 

Detailed Description

Routines for optimizing load balance between processes in HFX calculations.

History
04.2008 created [Manuel Guidon]
Author
Manuel Guidon

Function/Subroutine Documentation

◆ hfx_load_balance()

subroutine, public hfx_load_balance_methods::hfx_load_balance ( type(hfx_type), pointer  x_data,
real(dp), intent(in)  eps_schwarz,
type(particle_type), dimension(:), pointer  particle_set,
integer, intent(in)  max_set,
type(mp_para_env_type), pointer  para_env,
type(hfx_screen_coeff_type), dimension(:, :, :, :), pointer  coeffs_set,
type(hfx_screen_coeff_type), dimension(:, :), pointer  coeffs_kind,
integer, dimension(:, :)  is_assoc_atomic_block_global,
logical  do_periodic,
type(hfx_load_balance_type), pointer  load_balance_parameter,
integer, dimension(*)  kind_of,
type(hfx_basis_type), dimension(:), pointer  basis_parameter,
type(hfx_p_kind), dimension(:), pointer  pmax_set,
real(dp), dimension(:, :), pointer  pmax_atom,
integer, intent(in)  i_thread,
integer, intent(in)  n_threads,
type(cell_type), pointer  cell,
logical, intent(in)  do_p_screening,
integer, dimension(:), pointer  map_atom_to_kind_atom,
integer, intent(in)  nkind,
integer, intent(in)  eval_type,
real(dp), dimension(:, :), pointer  pmax_block,
logical, intent(in)  use_virial 
)

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

Parameters
x_dataObject that stores the indices array
eps_schwarzscreening parameter
particle_set,atomic_kind_set,para_env...
max_setMaximum number of set to be considered
para_envpara_env
coeffs_setscreening functions
coeffs_kindscreening functions
is_assoc_atomic_block_globalKS-matrix sparsity
do_periodicflag for periodicity
load_balance_parameterParameters for Monte-Carlo routines
kind_ofhelper array for mapping
basis_parameterBasis set parameters
pmax_setInitial screening matrix
pmax_atom...
i_threadProcess ID of current Thread
n_threadsTotal Number of Threads
cellcell
do_p_screeningFlag for initial p screening
map_atom_to_kind_atom...
nkind...
eval_type...
pmax_block...
use_virial...
History
06.2007 created [Manuel Guidon] 08.2007 new parallel scheme [Manuel Guidon] 09.2007 new 'modulo' parellel scheme and Monte Carlo step [Manuel Guidon] 11.2007 parallelize load balance on box_idx1 [Manuel Guidon] 02.2009 completely refactored [Manuel Guidon]
Author
Manuel Guidon
Note
The optimization is done via a binning procedure followed by simple Monte Carlo procedure: In a first step the total amount of integrals in the system is calculated, taking into account the sparsity of the KS-matrix , the screening based on near/farfield approximations and if desired the screening on an initial density matrix. In a second step, bins are generate that contain approximately the same number of integrals, and a cost for these bins is estimated (currently the number of integrals) In a third step, a Monte Carlo procedure optimizes the assignment of the different loads to each process At the end each process owns an unique array of atomic indices-ranges that are used to decide whether a process has to calculate a certain bunch of integrals or not

Definition at line 123 of file hfx_load_balance_methods.F.

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

◆ hfx_update_load_balance()

subroutine, public hfx_load_balance_methods::hfx_update_load_balance ( type(hfx_type), pointer  x_data,
type(mp_para_env_type), intent(in)  para_env,
type(hfx_load_balance_type)  load_balance_parameter,
integer, intent(in)  i_thread,
integer, intent(in)  n_threads,
integer, intent(in)  eval_type 
)

Cheap way of redistributing the eri's.

Parameters
x_dataObject that stores the indices array
para_envpara_env
load_balance_parametercontains parmameter for Monte-Carlo routines
i_threadcurrent thread ID
n_threadsTotal Number of threads
eval_type...
History
12.2007 created [Manuel Guidon] 02.2009 optimize Memory Usage [Manuel Guidon]
Author
Manuel Guidon
Note
The cost matrix is given by the walltime for each bin that is measured during the calculation

Definition at line 1480 of file hfx_load_balance_methods.F.

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

◆ cost_model()

integer(kind=int_8) function, public hfx_load_balance_methods::cost_model ( integer  nsa,
integer  nsb,
integer  nsc,
integer  nsd,
integer  npgfa,
integer  npgfb,
integer  npgfc,
integer  npgfd,
real(kind=dp)  ratio,
real(kind=dp), dimension(12), intent(in)  p1,
real(kind=dp), dimension(12), intent(in)  p2,
real(kind=dp), dimension(2), intent(in)  p3 
)

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

Parameters
nsa...
nsb...
nsc...
nsd...
npgfa...
npgfb...
npgfc...
npgfd...
ratio...
p1...
p2...
p3...
Returns
...
History
08.2009 created Joost VandeVondele
Author
Joost VandeVondele

Definition at line 1765 of file hfx_load_balance_methods.F.

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

◆ collect_load_balance_info()

subroutine, public hfx_load_balance_methods::collect_load_balance_info ( type(mp_para_env_type), intent(in)  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 
)

...

Parameters
para_env...
x_data...
iw...
n_threads...
i_thread...
eval_type...

Definition at line 2327 of file hfx_load_balance_methods.F.

Here is the caller graph for this function:

Variable Documentation

◆ p1_energy

real(kind=dp), dimension(12), parameter, public hfx_load_balance_methods::p1_energy = (/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/)

Definition at line 45 of file hfx_load_balance_methods.F.

◆ p2_energy

real(kind=dp), dimension(12), parameter, public hfx_load_balance_methods::p2_energy = (/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/)

Definition at line 51 of file hfx_load_balance_methods.F.

◆ p3_energy

real(kind=dp), dimension(2), parameter, public hfx_load_balance_methods::p3_energy = (/7.82336287670072350E-002_dp, 0.38073304105744837_dp/)

Definition at line 57 of file hfx_load_balance_methods.F.