Octopus
states_elec_all_to_all_communications_oct_m Module Reference

This module provides routines for communicating all batches in a ring-pattern scheme. More...

Detailed Description

This module provides routines for communicating all batches in a ring-pattern scheme.

Communication is done in two steps: the ring_pattern module determines which task talk to each task for each step of the ring-pattern scheme.

For a given step of the ring-pattern scheme, this module determines how many steps of send/received are needed given the number of batches owned by the pairs of tasks involved (local, sender, receiver).

This module also provides the routines that handle the communication of batches

Data Types

type  states_elec_all_to_all_communications_t
 

Functions/Subroutines

subroutine states_elec_all_to_all_communications_start (this, st, task_from, task_to)
 Given a task to send to, and a task to receive from, initializes a states_elec_all_to_all_communications_t object. More...
 
integer function states_elec_all_to_all_communications_eval_nreceive (st, task_from, nblock_to_receive)
 How many batches we will receive from task_from. More...
 
integer function states_elec_all_to_all_communications_eval_nsend (st, task_to, nblock_to_send)
 How many batches we will send from task_send. More...
 
integer pure function states_elec_all_to_all_communications_get_ncom (this)
 Returns the number of communications. More...
 
integer pure function states_elec_all_to_all_communications_get_nreceive (this)
 Returns the number of receiv calls. More...
 
integer pure function states_elec_all_to_all_communications_get_nsend (this)
 Returns the number send calls. More...
 
subroutine states_elec_all_to_all_communications_alloc_receive_batch (this, st, icom, np, psib)
 Given the icom step, allocate the receiv buffer (wfs_elec_t) More...
 
subroutine states_elec_all_to_all_communications_get_send_indices (this, st, icom, ib, ik)
 Given the icom step, returns the block and k-point indices to be sent. More...
 
subroutine states_elec_all_to_all_communications_get_receive_indices (this, st, icom, ib, ik)
 Given the icom step, returns the block and k-point indices to be received. More...
 

Function/Subroutine Documentation

◆ states_elec_all_to_all_communications_start()

subroutine states_elec_all_to_all_communications_oct_m::states_elec_all_to_all_communications_start ( class(states_elec_all_to_all_communications_t), intent(inout)  this,
type(states_elec_t), intent(in)  st,
integer, intent(in)  task_from,
integer, intent(in)  task_to 
)
private

Given a task to send to, and a task to receive from, initializes a states_elec_all_to_all_communications_t object.

Definition at line 169 of file states_elec_all_to_all_communications.F90.

◆ states_elec_all_to_all_communications_eval_nreceive()

integer function states_elec_all_to_all_communications_oct_m::states_elec_all_to_all_communications_eval_nreceive ( type(states_elec_t), intent(in)  st,
integer, intent(in)  task_from,
integer, intent(out)  nblock_to_receive 
)
private

How many batches we will receive from task_from.

Definition at line 189 of file states_elec_all_to_all_communications.F90.

◆ states_elec_all_to_all_communications_eval_nsend()

integer function states_elec_all_to_all_communications_oct_m::states_elec_all_to_all_communications_eval_nsend ( type(states_elec_t), intent(in)  st,
integer, intent(in)  task_to,
integer, intent(out)  nblock_to_send 
)
private

How many batches we will send from task_send.

Definition at line 227 of file states_elec_all_to_all_communications.F90.

◆ states_elec_all_to_all_communications_get_ncom()

integer pure function states_elec_all_to_all_communications_oct_m::states_elec_all_to_all_communications_get_ncom ( class(states_elec_all_to_all_communications_t), intent(in)  this)
private

Returns the number of communications.

Definition at line 252 of file states_elec_all_to_all_communications.F90.

◆ states_elec_all_to_all_communications_get_nreceive()

integer pure function states_elec_all_to_all_communications_oct_m::states_elec_all_to_all_communications_get_nreceive ( class(states_elec_all_to_all_communications_t), intent(in)  this)
private

Returns the number of receiv calls.

Definition at line 259 of file states_elec_all_to_all_communications.F90.

◆ states_elec_all_to_all_communications_get_nsend()

integer pure function states_elec_all_to_all_communications_oct_m::states_elec_all_to_all_communications_get_nsend ( class(states_elec_all_to_all_communications_t), intent(in)  this)
private

Returns the number send calls.

Definition at line 266 of file states_elec_all_to_all_communications.F90.

◆ states_elec_all_to_all_communications_alloc_receive_batch()

subroutine states_elec_all_to_all_communications_oct_m::states_elec_all_to_all_communications_alloc_receive_batch ( class(states_elec_all_to_all_communications_t), intent(in)  this,
type(states_elec_t), intent(in)  st,
integer, intent(in)  icom,
integer, intent(in)  np,
class(wfs_elec_t), intent(out), pointer  psib 
)
private

Given the icom step, allocate the receiv buffer (wfs_elec_t)

Parameters
[in]icomCommunication step
[in]npNumber of points in the batch (meshnp or meshnp_part)
[out]psibAllocated batch

Definition at line 273 of file states_elec_all_to_all_communications.F90.

◆ states_elec_all_to_all_communications_get_send_indices()

subroutine states_elec_all_to_all_communications_oct_m::states_elec_all_to_all_communications_get_send_indices ( class(states_elec_all_to_all_communications_t), intent(in)  this,
type(states_elec_t), intent(in)  st,
integer, intent(in)  icom,
integer, intent(out)  ib,
integer, intent(out)  ik 
)
private

Given the icom step, returns the block and k-point indices to be sent.

Parameters
[in]icomCommunication step
[out]ibBlock index of the batch to send
[out]ikk-point index of batch to send

Definition at line 301 of file states_elec_all_to_all_communications.F90.

◆ states_elec_all_to_all_communications_get_receive_indices()

subroutine states_elec_all_to_all_communications_oct_m::states_elec_all_to_all_communications_get_receive_indices ( class(states_elec_all_to_all_communications_t), intent(in)  this,
type(states_elec_t), intent(in)  st,
integer, intent(in)  icom,
integer, intent(out)  ib,
integer, intent(out)  ik 
)
private

Given the icom step, returns the block and k-point indices to be received.

Parameters
[in]icomCommunication step
[out]ibBlock index of the batch to receive
[out]ikk-point index of batch to receive

Definition at line 325 of file states_elec_all_to_all_communications.F90.