comms_bcast_real Subroutine

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

Called by

proc~~comms_bcast_real~~CalledByGraph proc~comms_bcast_real comms_bcast_real interface~comms_bcast comms_bcast interface~comms_bcast->proc~comms_bcast_real program~postw90 postw90 program~postw90->interface~comms_bcast proc~pw90common_wanint_data_dist pw90common_wanint_data_dist program~postw90->proc~pw90common_wanint_data_dist proc~pw90common_wanint_param_dist pw90common_wanint_param_dist program~postw90->proc~pw90common_wanint_param_dist proc~pw90common_wanint_setup pw90common_wanint_setup program~postw90->proc~pw90common_wanint_setup proc~pw90common_wanint_get_kpoint_file pw90common_wanint_get_kpoint_file proc~pw90common_wanint_get_kpoint_file->interface~comms_bcast proc~param_chkpt_dist param_chkpt_dist proc~param_chkpt_dist->interface~comms_bcast proc~pw90common_wanint_data_dist->interface~comms_bcast proc~k_path k_path proc~k_path->interface~comms_bcast proc~param_dist param_dist proc~param_dist->interface~comms_bcast proc~geninterp_main geninterp_main proc~geninterp_main->interface~comms_bcast proc~pw90common_wanint_param_dist->interface~comms_bcast proc~pw90common_wanint_setup->interface~comms_bcast program~wannier wannier program~wannier->interface~comms_bcast program~wannier->proc~param_chkpt_dist program~wannier->proc~param_dist

Contents

Source Code


Source Code

  subroutine comms_bcast_real(array, size)
    !! Send real array from root node to all nodes
    implicit none

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

#ifdef MPI
    integer :: error

    call MPI_bcast(array, size, MPI_double_precision, root_id, mpi_comm_world, error)

    if (error .ne. MPI_success) then
      call io_error('Error in comms_bcast_real')
    end if
#endif

    return

  end subroutine comms_bcast_real