w90_comms Module

module~~w90_comms~~UsesGraph module~w90_comms w90_comms module~w90_constants w90_constants module~w90_constants->module~w90_comms module~w90_io w90_io module~w90_constants->module~w90_io module~w90_io->module~w90_comms
Help

This module handles all of the communications

Used By

module~~w90_comms~~UsedByGraph module~w90_comms w90_comms proc~spin_get_moment spin_get_moment module~w90_comms->proc~spin_get_moment proc~get_hh_r get_HH_R module~w90_comms->proc~get_hh_r module~w90_geninterp w90_geninterp module~w90_comms->module~w90_geninterp proc~get_aa_r get_AA_R module~w90_comms->proc~get_aa_r module~w90_boltzwann w90_boltzwann module~w90_comms->module~w90_boltzwann proc~dos_main dos_main module~w90_comms->proc~dos_main proc~k_path k_path module~w90_comms->proc~k_path proc~get_cc_r get_CC_R module~w90_comms->proc~get_cc_r program~postw90 postw90 module~w90_comms->program~postw90 proc~get_ff_r get_FF_R module~w90_comms->proc~get_ff_r proc~get_ss_r get_SS_R module~w90_comms->proc~get_ss_r module~w90_postw90_common w90_postw90_common module~w90_comms->module~w90_postw90_common proc~get_bb_r get_BB_R module~w90_comms->proc~get_bb_r proc~k_slice k_slice module~w90_comms->proc~k_slice proc~berry_main berry_main module~w90_comms->proc~berry_main module~w90_geninterp->program~postw90 module~w90_boltzwann->program~postw90 module~w90_postw90_common->proc~spin_get_moment module~w90_postw90_common->proc~get_hh_r module~w90_postw90_common->module~w90_geninterp module~w90_postw90_common->proc~get_aa_r module~w90_postw90_common->module~w90_boltzwann module~w90_postw90_common->proc~dos_main module~w90_postw90_common->proc~k_path module~w90_postw90_common->proc~get_cc_r module~w90_postw90_common->program~postw90 module~w90_postw90_common->proc~get_ff_r module~w90_postw90_common->proc~get_ss_r module~w90_postw90_common->proc~get_bb_r module~w90_postw90_common->proc~k_slice module~w90_postw90_common->proc~berry_main proc~wham_get_eig_uu_hh_jjlist wham_get_eig_UU_HH_JJlist module~w90_postw90_common->proc~wham_get_eig_uu_hh_jjlist proc~fourier_q_to_r fourier_q_to_R module~w90_postw90_common->proc~fourier_q_to_r proc~spin_get_nk spin_get_nk module~w90_postw90_common->proc~spin_get_nk proc~wham_get_d_h_a wham_get_D_h_a module~w90_postw90_common->proc~wham_get_d_h_a proc~spin_get_moment_k spin_get_moment_k module~w90_postw90_common->proc~spin_get_moment_k proc~berry_get_kubo_k berry_get_kubo_k module~w90_postw90_common->proc~berry_get_kubo_k proc~wham_get_occ_mat_list wham_get_occ_mat_list module~w90_postw90_common->proc~wham_get_occ_mat_list proc~berry_get_imf_klist berry_get_imf_klist module~w90_postw90_common->proc~berry_get_imf_klist proc~berry_get_imfgh_klist berry_get_imfgh_klist module~w90_postw90_common->proc~berry_get_imfgh_klist proc~wham_get_eig_deleig wham_get_eig_deleig module~w90_postw90_common->proc~wham_get_eig_deleig proc~dos_get_levelspacing dos_get_levelspacing module~w90_postw90_common->proc~dos_get_levelspacing
Help


Variables

TypeVisibility AttributesNameInitial
logical, public, save:: on_root

Are we the root node

integer, public, save:: num_nodes

Number of nodes

integer, public, save:: my_node_id

ID of this node

integer, public, parameter:: root_id =0

ID of the root node

integer, private, parameter:: mpi_send_tag =77

Interfaces

public interface comms_bcast

  • private subroutine comms_bcast_int(array, size)

    Send integar array from root node to all nodes

    Arguments

    Type IntentOptional AttributesName
    integer, intent(inout) :: array
    integer, intent(in) :: size
  • private subroutine comms_bcast_logical(array, size)

    Send logical array from root node to all nodes

    Arguments

    Type IntentOptional AttributesName
    logical, intent(inout) :: array
    integer, intent(in) :: size
  • private subroutine comms_bcast_real(array, size)

    Send real array from root node to all nodes

    Arguments

    Type IntentOptional AttributesName
    real(kind=dp), intent(inout) :: array
    integer, intent(in) :: size
  • private subroutine comms_bcast_cmplx(array, size)

    Send character array from root node to all nodes

    Arguments

    Type IntentOptional AttributesName
    complex(kind=dp), intent(inout) :: array
    integer, intent(in) :: size
  • private subroutine comms_bcast_char(array, size)

    Send character array from root node to all nodes

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(inout) :: array
    integer, intent(in) :: size

public interface comms_send

  • private subroutine comms_send_int(array, size, to)

    Send integer array to specified node

    Arguments

    Type IntentOptional AttributesName
    integer, intent(inout) :: array
    integer, intent(in) :: size
    integer, intent(in) :: to
  • private subroutine comms_send_logical(array, size, to)

    Send logical array to specified node

    Arguments

    Type IntentOptional AttributesName
    logical, intent(inout) :: array
    integer, intent(in) :: size
    integer, intent(in) :: to
  • private subroutine comms_send_real(array, size, to)

    Send real array to specified node

    Arguments

    Type IntentOptional AttributesName
    real(kind=dp), intent(inout) :: array
    integer, intent(in) :: size
    integer, intent(in) :: to
  • private subroutine comms_send_cmplx(array, size, to)

    Send complex array to specified node

    Arguments

    Type IntentOptional AttributesName
    complex(kind=dp), intent(inout) :: array
    integer, intent(in) :: size
    integer, intent(in) :: to
  • private subroutine comms_send_char(array, size, to)

    Send character array to specified node

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(inout) :: array
    integer, intent(in) :: size
    integer, intent(in) :: to

public interface comms_recv

  • private subroutine comms_recv_int(array, size, from)

    Receive integer array from specified node

    Arguments

    Type IntentOptional AttributesName
    integer, intent(inout) :: array
    integer, intent(in) :: size
    integer, intent(in) :: from
  • private subroutine comms_recv_logical(array, size, from)

    Receive logical array from specified node

    Arguments

    Type IntentOptional AttributesName
    logical, intent(inout) :: array
    integer, intent(in) :: size
    integer, intent(in) :: from
  • private subroutine comms_recv_real(array, size, from)

    Receive real array from specified node

    Arguments

    Type IntentOptional AttributesName
    real(kind=dp), intent(inout) :: array
    integer, intent(in) :: size
    integer, intent(in) :: from
  • private subroutine comms_recv_cmplx(array, size, from)

    Receive complex array from specified node

    Arguments

    Type IntentOptional AttributesName
    complex(kind=dp), intent(inout) :: array
    integer, intent(in) :: size
    integer, intent(in) :: from
  • private subroutine comms_recv_char(array, size, from)

    Receive character array from specified node

    Arguments

    Type IntentOptional AttributesName
    character(len=*), intent(inout) :: array
    integer, intent(in) :: size
    integer, intent(in) :: from

public interface comms_reduce

  • private subroutine comms_reduce_int(array, size, op)

    Reduce integer data to root node

    Arguments

    Type IntentOptional AttributesName
    integer, intent(inout) :: array
    integer, intent(in) :: size
    character(len=*), intent(in) :: op
  • private subroutine comms_reduce_real(array, size, op)

    Reduce real data to root node

    Arguments

    Type IntentOptional AttributesName
    real(kind=dp), intent(inout) :: array
    integer, intent(in) :: size
    character(len=*), intent(in) :: op
  • private subroutine comms_reduce_cmplx(array, size, op)

    Reduce complex data to root node

    Arguments

    Type IntentOptional AttributesName
    complex(kind=dp), intent(inout) :: array
    integer, intent(in) :: size
    character(len=*), intent(in) :: op

public interface comms_allreduce

  • private subroutine comms_allreduce_real(array, size, op)

    Reduce real data to all nodes

    Arguments

    Type IntentOptional AttributesName
    real(kind=dp), intent(inout) :: array
    integer, intent(in) :: size
    character(len=*), intent(in) :: op
  • private subroutine comms_allreduce_cmplx(array, size, op)

    Reduce complex data to all nodes

    Arguments

    Type IntentOptional AttributesName
    complex(kind=dp), intent(inout) :: array
    integer, intent(in) :: size
    character(len=*), intent(in) :: op

public interface comms_gatherv

  • private subroutine comms_gatherv_real(array, localcount, rootglobalarray, counts, displs)

    Gather real data to root node

    Arguments

    Type IntentOptional AttributesName
    real(kind=dp), intent(inout) :: array

    local array for sending data

    integer, intent(in) :: localcount

    localcount elements will be sent to the root node

    real(kind=dp), intent(inout) :: rootglobalarray

    array on the root node to which data will be sent

    integer, intent(in), dimension(num_nodes):: counts

    how data should be partitioned, see MPI documentation or function comms_array_split

    integer, intent(in), dimension(num_nodes):: displs

public interface comms_scatterv

  • private subroutine comms_scatterv_int_1(array, localcount, rootglobalarray, counts, displs)

    Scatter integer data from root node (array of rank 1)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(inout), dimension(:):: array

    local array for getting data

    integer, intent(in) :: localcount

    localcount elements will be fetched from the root node

    integer, intent(inout), dimension(:):: rootglobalarray

    array on the root node from which data will be sent

    integer, intent(in), dimension(num_nodes):: counts

    how data should be partitioned, see MPI documentation or function comms_array_split

    integer, intent(in), dimension(num_nodes):: displs
  • private subroutine comms_scatterv_int_2(array, localcount, rootglobalarray, counts, displs)

    Scatter integer data from root node (array of rank 2)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(inout), dimension(:,:):: array

    local array for getting data

    integer, intent(in) :: localcount

    localcount elements will be fetched from the root node

    integer, intent(inout), dimension(:,:):: rootglobalarray

    array on the root node from which data will be sent

    integer, intent(in), dimension(num_nodes):: counts

    how data should be partitioned, see MPI documentation or function comms_array_split

    integer, intent(in), dimension(num_nodes):: displs
  • private subroutine comms_scatterv_int_3(array, localcount, rootglobalarray, counts, displs)

    Scatter integer data from root node (array of rank 3)

    Arguments

    Type IntentOptional AttributesName
    integer, intent(inout), dimension(:,:,:):: array

    local array for getting data

    integer, intent(in) :: localcount

    localcount elements will be fetched from the root node

    integer, intent(inout), dimension(:,:,:):: rootglobalarray

    array on the root node from which data will be sent

    integer, intent(in), dimension(num_nodes):: counts

    how data should be partitioned, see MPI documentation or function comms_array_split

    integer, intent(in), dimension(num_nodes):: displs
  • private subroutine comms_scatterv_real(array, localcount, rootglobalarray, counts, displs)

    Scatter data from root node

    Arguments

    Type IntentOptional AttributesName
    real(kind=dp), intent(inout) :: array

    local array for getting data

    integer, intent(in) :: localcount

    localcount elements will be fetched from the root node

    real(kind=dp), intent(inout) :: rootglobalarray

    array on the root node from which data will be sent

    integer, intent(in), dimension(num_nodes):: counts

    how data should be partitioned, see MPI documentation or function comms_array_split

    integer, intent(in), dimension(num_nodes):: displs

Subroutines

public subroutine comms_setup()

Set up communications

Arguments

None

public subroutine comms_array_split(numpoints, counts, displs)

Given an array of size numpoints, we want to split on num_nodes nodes. This function returns two arrays: count and displs.

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: numpoints

Number of elements of the array to be scattered

integer, intent(out), dimension(0:num_nodes-1):: counts

Array (of size num_nodes) with the number of elements of the array on each node

integer, intent(out), dimension(0:num_nodes-1):: displs

Array (of size num_nodes) with the displacement relative to the global array

public subroutine comms_end()

Called to finalise the comms

Arguments

None

public subroutine comms_barrier()

A barrier to synchronise all nodes

Arguments

None

private subroutine comms_bcast_int(array, size)

Send integar array from root node to all nodes

Arguments

Type IntentOptional AttributesName
integer, intent(inout) :: array
integer, intent(in) :: size

private subroutine comms_bcast_real(array, size)

Send real array from root node to all nodes

Arguments

Type IntentOptional AttributesName
real(kind=dp), intent(inout) :: array
integer, intent(in) :: size

private subroutine comms_bcast_logical(array, size)

Send logical array from root node to all nodes

Arguments

Type IntentOptional AttributesName
logical, intent(inout) :: array
integer, intent(in) :: size

private subroutine comms_bcast_char(array, size)

Send character array from root node to all nodes

Arguments

Type IntentOptional AttributesName
character(len=*), intent(inout) :: array
integer, intent(in) :: size

private subroutine comms_bcast_cmplx(array, size)

Send character array from root node to all nodes

Arguments

Type IntentOptional AttributesName
complex(kind=dp), intent(inout) :: array
integer, intent(in) :: size

private subroutine comms_send_logical(array, size, to)

Send logical array to specified node

Arguments

Type IntentOptional AttributesName
logical, intent(inout) :: array
integer, intent(in) :: size
integer, intent(in) :: to

private subroutine comms_send_int(array, size, to)

Send integer array to specified node

Arguments

Type IntentOptional AttributesName
integer, intent(inout) :: array
integer, intent(in) :: size
integer, intent(in) :: to

private subroutine comms_send_char(array, size, to)

Send character array to specified node

Arguments

Type IntentOptional AttributesName
character(len=*), intent(inout) :: array
integer, intent(in) :: size
integer, intent(in) :: to

private subroutine comms_send_real(array, size, to)

Send real array to specified node

Arguments

Type IntentOptional AttributesName
real(kind=dp), intent(inout) :: array
integer, intent(in) :: size
integer, intent(in) :: to

private subroutine comms_send_cmplx(array, size, to)

Send complex array to specified node

Arguments

Type IntentOptional AttributesName
complex(kind=dp), intent(inout) :: array
integer, intent(in) :: size
integer, intent(in) :: to

private subroutine comms_recv_logical(array, size, from)

Receive logical array from specified node

Arguments

Type IntentOptional AttributesName
logical, intent(inout) :: array
integer, intent(in) :: size
integer, intent(in) :: from

private subroutine comms_recv_int(array, size, from)

Receive integer array from specified node

Arguments

Type IntentOptional AttributesName
integer, intent(inout) :: array
integer, intent(in) :: size
integer, intent(in) :: from

private subroutine comms_recv_char(array, size, from)

Receive character array from specified node

Arguments

Type IntentOptional AttributesName
character(len=*), intent(inout) :: array
integer, intent(in) :: size
integer, intent(in) :: from

private subroutine comms_recv_real(array, size, from)

Receive real array from specified node

Arguments

Type IntentOptional AttributesName
real(kind=dp), intent(inout) :: array
integer, intent(in) :: size
integer, intent(in) :: from

private subroutine comms_recv_cmplx(array, size, from)

Receive complex array from specified node

Arguments

Type IntentOptional AttributesName
complex(kind=dp), intent(inout) :: array
integer, intent(in) :: size
integer, intent(in) :: from

private subroutine comms_reduce_int(array, size, op)

Reduce integer data to root node

Arguments

Type IntentOptional AttributesName
integer, intent(inout) :: array
integer, intent(in) :: size
character(len=*), intent(in) :: op

private subroutine comms_reduce_real(array, size, op)

Reduce real data to root node

Arguments

Type IntentOptional AttributesName
real(kind=dp), intent(inout) :: array
integer, intent(in) :: size
character(len=*), intent(in) :: op

private subroutine comms_reduce_cmplx(array, size, op)

Reduce complex data to root node

Arguments

Type IntentOptional AttributesName
complex(kind=dp), intent(inout) :: array
integer, intent(in) :: size
character(len=*), intent(in) :: op

private subroutine comms_allreduce_real(array, size, op)

Reduce real data to all nodes

Arguments

Type IntentOptional AttributesName
real(kind=dp), intent(inout) :: array
integer, intent(in) :: size
character(len=*), intent(in) :: op

private subroutine comms_allreduce_cmplx(array, size, op)

Reduce complex data to all nodes

Arguments

Type IntentOptional AttributesName
complex(kind=dp), intent(inout) :: array
integer, intent(in) :: size
character(len=*), intent(in) :: op

private subroutine comms_gatherv_real(array, localcount, rootglobalarray, counts, displs)

Gather real data to root node

Arguments

Type IntentOptional AttributesName
real(kind=dp), intent(inout) :: array

local array for sending data

integer, intent(in) :: localcount

localcount elements will be sent to the root node

real(kind=dp), intent(inout) :: rootglobalarray

array on the root node to which data will be sent

integer, intent(in), dimension(num_nodes):: counts

how data should be partitioned, see MPI documentation or function comms_array_split

integer, intent(in), dimension(num_nodes):: displs

private subroutine comms_scatterv_real(array, localcount, rootglobalarray, counts, displs)

Scatter data from root node

Arguments

Type IntentOptional AttributesName
real(kind=dp), intent(inout) :: array

local array for getting data

integer, intent(in) :: localcount

localcount elements will be fetched from the root node

real(kind=dp), intent(inout) :: rootglobalarray

array on the root node from which data will be sent

integer, intent(in), dimension(num_nodes):: counts

how data should be partitioned, see MPI documentation or function comms_array_split

integer, intent(in), dimension(num_nodes):: displs

private subroutine comms_scatterv_int_1(array, localcount, rootglobalarray, counts, displs)

Scatter integer data from root node (array of rank 1)

Arguments

Type IntentOptional AttributesName
integer, intent(inout), dimension(:):: array

local array for getting data

integer, intent(in) :: localcount

localcount elements will be fetched from the root node

integer, intent(inout), dimension(:):: rootglobalarray

array on the root node from which data will be sent

integer, intent(in), dimension(num_nodes):: counts

how data should be partitioned, see MPI documentation or function comms_array_split

integer, intent(in), dimension(num_nodes):: displs

private subroutine comms_scatterv_int_2(array, localcount, rootglobalarray, counts, displs)

Scatter integer data from root node (array of rank 2)

Arguments

Type IntentOptional AttributesName
integer, intent(inout), dimension(:,:):: array

local array for getting data

integer, intent(in) :: localcount

localcount elements will be fetched from the root node

integer, intent(inout), dimension(:,:):: rootglobalarray

array on the root node from which data will be sent

integer, intent(in), dimension(num_nodes):: counts

how data should be partitioned, see MPI documentation or function comms_array_split

integer, intent(in), dimension(num_nodes):: displs

private subroutine comms_scatterv_int_3(array, localcount, rootglobalarray, counts, displs)

Scatter integer data from root node (array of rank 3)

Arguments

Type IntentOptional AttributesName
integer, intent(inout), dimension(:,:,:):: array

local array for getting data

integer, intent(in) :: localcount

localcount elements will be fetched from the root node

integer, intent(inout), dimension(:,:,:):: rootglobalarray

array on the root node from which data will be sent

integer, intent(in), dimension(num_nodes):: counts

how data should be partitioned, see MPI documentation or function comms_array_split

integer, intent(in), dimension(num_nodes):: displs