Octopus
states_elec_parallel_oct_m Module Reference

This module provides routines for communicating states when using states parallelization. More...

Detailed Description

This module provides routines for communicating states when using states parallelization.

States can be distributed over processor (groups). The distribution scheme is defined in states_elec_t::dist object.

Data Types

interface  states_elec_parallel_gather
 

Functions/Subroutines

subroutine, public states_elec_parallel_blacs_blocksize (st, namespace, mesh, blocksize, total_np)
 determine the block size for a BLACS distribution More...
 
subroutine, public states_elec_parallel_remote_access_start (this)
 start remote memory access for states on other processors More...
 
subroutine, public states_elec_parallel_remote_access_stop (this)
 stop remote memory access for states on other processors More...
 
subroutine, public states_elec_parallel_allocate_batch (st, psib, np, ib, ik, packed)
 Allocates a wfs_elec_t for np points, given block index ib, ad the k-point index ik. More...
 
subroutine, public states_elec_parallel_get_block (this, mesh, ib, iqn, psib)
 retrieve wave functions from a different node More...
 
subroutine, public states_elec_parallel_release_block (this, ib, psib)
 
subroutine dstates_elec_parallel_gather_3 (st, dims, psi)
 gather distributed states into a local array More...
 
subroutine dstates_elec_parallel_gather_1 (st, aa)
 gather a one-dimensional array, distributed over states More...
 
subroutine zstates_elec_parallel_gather_3 (st, dims, psi)
 gather distributed states into a local array More...
 
subroutine zstates_elec_parallel_gather_1 (st, aa)
 gather a one-dimensional array, distributed over states More...
 

Function/Subroutine Documentation

◆ states_elec_parallel_blacs_blocksize()

subroutine, public states_elec_parallel_oct_m::states_elec_parallel_blacs_blocksize ( type(states_elec_t), intent(in)  st,
type(namespace_t), intent(in)  namespace,
type(mesh_t), intent(in)  mesh,
integer, dimension(2), intent(out)  blocksize,
integer, intent(out)  total_np 
)

determine the block size for a BLACS distribution

Parameters
[in]stthe states object
[in]meshthe underlying mesh (for np, np_part)
[out]blocksizeresult: BLACS blocksize
[out]total_npresult: total number of points

Definition at line 154 of file states_elec_parallel.F90.

◆ states_elec_parallel_remote_access_start()

subroutine, public states_elec_parallel_oct_m::states_elec_parallel_remote_access_start ( type(states_elec_t), intent(inout)  this)

start remote memory access for states on other processors

After calling this routine, the RMA_win handles states_elec_group_t::rma_win will be available.

Note
side effect: batches for which a rma window is created are increasing their pack level

Definition at line 212 of file states_elec_parallel.F90.

◆ states_elec_parallel_remote_access_stop()

subroutine, public states_elec_parallel_oct_m::states_elec_parallel_remote_access_stop ( type(states_elec_t), intent(inout)  this)

stop remote memory access for states on other processors

Note
side effect: batches for which a rma window is created are decreasing their pack level

Definition at line 253 of file states_elec_parallel.F90.

◆ states_elec_parallel_allocate_batch()

subroutine, public states_elec_parallel_oct_m::states_elec_parallel_allocate_batch ( type(states_elec_t), intent(in)  st,
class(wfs_elec_t), intent(out), pointer  psib,
integer, intent(in)  np,
integer, intent(in)  ib,
integer, intent(in)  ik,
logical, intent(in), optional  packed 
)

Allocates a wfs_elec_t for np points, given block index ib, ad the k-point index ik.

Parameters
[in]packedIf .true. the batch will be initialized in packed form

Definition at line 282 of file states_elec_parallel.F90.

◆ states_elec_parallel_get_block()

subroutine, public states_elec_parallel_oct_m::states_elec_parallel_get_block ( type(states_elec_t), intent(in), target  this,
type(mesh_t), intent(in)  mesh,
integer, intent(in)  ib,
integer, intent(in)  iqn,
class(wfs_elec_t), intent(out), pointer  psib 
)

retrieve wave functions from a different node

This routine utilizes the RMA windows to retrieve a wfs_oct_m::wfs_elec_t object from a different node.

Note
This routine expects that rma access has been started.

Definition at line 313 of file states_elec_parallel.F90.

◆ states_elec_parallel_release_block()

subroutine, public states_elec_parallel_oct_m::states_elec_parallel_release_block ( type(states_elec_t), intent(in), target  this,
integer, intent(in)  ib,
class(wfs_elec_t), pointer  psib 
)

Definition at line 370 of file states_elec_parallel.F90.

◆ dstates_elec_parallel_gather_3()

subroutine states_elec_parallel_oct_m::dstates_elec_parallel_gather_3 ( type(states_elec_t), intent(in)  st,
integer, dimension(2), intent(in)  dims,
real(real64), dimension(:, :, :), intent(inout)  psi 
)
private

gather distributed states into a local array

Parameters
[in]stfor information on parallel distribution and the mpi group
[in]dimsfirst and second dimensions of the send/receive buffers
[in,out]psiwave functions to be gathered; dimensions (1:st%nst, 1:dims(1), 1:dims(2))

Definition at line 458 of file states_elec_parallel.F90.

◆ dstates_elec_parallel_gather_1()

subroutine states_elec_parallel_oct_m::dstates_elec_parallel_gather_1 ( type(states_elec_t), intent(in)  st,
real(real64), dimension(:), intent(inout), contiguous  aa 
)
private

gather a one-dimensional array, distributed over states

Parameters
[in]stfor information on parallel distribution and the mpi group
[in,out]aaarray to be gathered, dimensions (1: st%nst)

Definition at line 516 of file states_elec_parallel.F90.

◆ zstates_elec_parallel_gather_3()

subroutine states_elec_parallel_oct_m::zstates_elec_parallel_gather_3 ( type(states_elec_t), intent(in)  st,
integer, dimension(2), intent(in)  dims,
complex(real64), dimension(:, :, :), intent(inout)  psi 
)
private

gather distributed states into a local array

Parameters
[in]stfor information on parallel distribution and the mpi group
[in]dimsfirst and second dimensions of the send/receive buffers
[in,out]psiwave functions to be gathered; dimensions (1:st%nst, 1:dims(1), 1:dims(2))

Definition at line 622 of file states_elec_parallel.F90.

◆ zstates_elec_parallel_gather_1()

subroutine states_elec_parallel_oct_m::zstates_elec_parallel_gather_1 ( type(states_elec_t), intent(in)  st,
complex(real64), dimension(:), intent(inout), contiguous  aa 
)
private

gather a one-dimensional array, distributed over states

Parameters
[in]stfor information on parallel distribution and the mpi group
[in,out]aaarray to be gathered, dimensions (1: st%nst)

Definition at line 680 of file states_elec_parallel.F90.