(git:6a2e663)
hfx_communication Module Reference

Routines for data exchange between MPI processes. More...

Functions/Subroutines

subroutine, public get_full_density (para_env, full_density, rho, number_of_p_entries, block_offset, kind_of, basis_parameter, get_max_vals_spin, rho_beta, antisymmetric)
 
  • Collects full density matrix from all CPUs
More...
 
subroutine, public distribute_ks_matrix (para_env, full_ks, ks_matrix, number_of_p_entries, block_offset, kind_of, basis_parameter, off_diag_fac, diag_fac)
 
  • Distributes the local full Kohn-Sham matrix to all CPUS
More...
 
subroutine, public scale_and_add_fock_to_ks_matrix (para_env, qs_env, ks_matrix, irep, scaling_factor)
 
  • Distributes the local full Kohn-Sham matrix to all CPUS. Is called in case of adiabatic rescaling. This is just a refactored version of distribute_ks_matrix
More...
 
subroutine, public get_atomic_block_maps (matrix, basis_parameter, kind_of, is_assoc_atomic_block, number_of_p_entries, para_env, atomic_block_offset, set_offset, block_offset, map_atoms_to_cpus, nkind)
 create a several maps array that reflects the ks matrix sparsity More...
 

Detailed Description

Routines for data exchange between MPI processes.

History
04.2008 created [Manuel Guidon]
Author
Manuel Guidon

Function/Subroutine Documentation

◆ get_full_density()

subroutine, public hfx_communication::get_full_density ( type(mp_para_env_type), pointer  para_env,
real(dp), dimension(:)  full_density,
type(dbcsr_type), pointer  rho,
integer, intent(in)  number_of_p_entries,
integer, dimension(:), pointer  block_offset,
integer, dimension(*)  kind_of,
type(hfx_basis_type), dimension(:), pointer  basis_parameter,
logical, intent(in)  get_max_vals_spin,
type(dbcsr_type), optional, pointer  rho_beta,
logical, intent(in)  antisymmetric 
)

  • Collects full density matrix from all CPUs

Parameters
para_env...
full_densityThe full Density matrix
rhoDistributed density
number_of_p_entriesMaximal buffer size
block_offset...
kind_of...
basis_parameter...
get_max_vals_spin...
rho_beta...
antisymmetric...
History
11.2007 created [Manuel Guidon]
Author
Manuel Guidon
Note
  • Communication with left/right node only added a mpi_sync before and after the ring of isendrecv. This speed up the communication, and might protect against idle neighbors flooding a busy node with messages [Joost]

Definition at line 73 of file hfx_communication.F.

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

◆ distribute_ks_matrix()

subroutine, public hfx_communication::distribute_ks_matrix ( type(mp_para_env_type), pointer  para_env,
real(dp), dimension(:)  full_ks,
type(dbcsr_type), pointer  ks_matrix,
integer, intent(in)  number_of_p_entries,
integer, dimension(:), pointer  block_offset,
integer, dimension(*)  kind_of,
type(hfx_basis_type), dimension(:), pointer  basis_parameter,
real(dp), intent(in), optional  off_diag_fac,
real(dp), intent(in), optional  diag_fac 
)

  • Distributes the local full Kohn-Sham matrix to all CPUS

Parameters
para_env...
full_ksThe full Kohn-Sham matrix
ks_matrixDistributed Kohn-Sham matrix
number_of_p_entriesMaximal buffer size
block_offset...
kind_of...
basis_parameter...
off_diag_fac...
diag_fac...
History
11.2007 created [Manuel Guidon]
Author
Manuel Guidon
Note
  • Communication with left/right node only

Definition at line 198 of file hfx_communication.F.

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

◆ scale_and_add_fock_to_ks_matrix()

subroutine, public hfx_communication::scale_and_add_fock_to_ks_matrix ( type(mp_para_env_type), pointer  para_env,
type(qs_environment_type), pointer  qs_env,
type(dbcsr_p_type), dimension(:, :), pointer  ks_matrix,
integer, intent(in)  irep,
real(dp), intent(in)  scaling_factor 
)

  • Distributes the local full Kohn-Sham matrix to all CPUS. Is called in case of adiabatic rescaling. This is just a refactored version of distribute_ks_matrix

Parameters
para_env...
qs_env...
ks_matrixDistributed Kohn-Sham matrix
irep...
scaling_factor...
History
11.2007 created [Manuel Guidon]
Author
Manuel Guidon
Note
  • Communication with left/right node only

Definition at line 305 of file hfx_communication.F.

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

◆ get_atomic_block_maps()

subroutine, public hfx_communication::get_atomic_block_maps ( type(dbcsr_type), pointer  matrix,
type(hfx_basis_type), dimension(:)  basis_parameter,
integer, dimension(:)  kind_of,
integer, dimension(:, :), intent(out)  is_assoc_atomic_block,
integer, intent(out)  number_of_p_entries,
type(mp_para_env_type), pointer  para_env,
integer, dimension(:, :), pointer  atomic_block_offset,
integer, dimension(:, :, :, :), pointer  set_offset,
integer, dimension(:), pointer  block_offset,
type(hfx_2d_map), dimension(:), pointer  map_atoms_to_cpus,
integer  nkind 
)

create a several maps array that reflects the ks matrix sparsity

Parameters
matrix...
basis_parameter...
kind_of...
is_assoc_atomic_block...
number_of_p_entries...
para_env...
atomic_block_offset...
set_offset...
block_offset...
map_atoms_to_cpus...
nkind...
History
11.2007 refactored [Joost VandeVondele] 07.2009 add new maps
Author
Manuel Guidon \notes is_assoc_atomic_block returns the mpi rank + 1 for associated blocks, zero for unassiated blocks

Definition at line 421 of file hfx_communication.F.

Here is the caller graph for this function: