## Description

co_broadcast copies the value of argument a on the image with image index source_image to all images in the current team. a becomes defined as if by intrinsic assignment. If the execution was successful and stat is present, it is assigned the value zero. If the execution failed, stat gets assigned a nonzero value and, if present, errmsg gets assigned a value describing the occurred error.

## Standard

TS 18508 or later

## Class

Collective subroutine

## Syntax

call co_broadcast(a, source_image [, stat, errmsg])

## Arguments

• a - intent(inout) argument; shall have the same dynamic type and type paramters on all images of the current team. If it is an array, it shall have the same shape on all images.
• source_image - a scalar integer expression. It shall have the same the same value on all images and refer to an image of the current team.
• stat - (optional) a scalar integer variable
• errmsg - (optional) a scalar character variable

## Example

program test
integer :: val(3)
if (this_image() == 1) then
val = [1, 5, 3]
end if
end program test