C Library Functions  - co_broadcast (3)

NAME

CO_BROADCAST(3) - [COLLECTIVE] Copy a value to all images the current set of images

SYNOPSIS

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

CHARACTERISTICS

DESCRIPTION

CO_BROADCAST(3) 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.

OPTIONS

o A : INTENT(INOUT) argument; shall have the same dynamic type and type parameters on all images of the current team. If it is an array, it shall have the same shape on all images.
o 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.
o STAT : (optional) a scalar integer variable
o ERRMSG : (optional) a scalar character variable

EXAMPLES

Sample program:

    program demo_co_broadcast
    implicit none
    integer :: val(3)
       if (this_image() == 1) then
          val = [1, 5, 3]
       endif
       call co_broadcast (val, source_image=1)
       print *, this_image(), ":", val
    end program demo_co_broadcast

STANDARD

Fortran xx

SEE ALSO

CO_MAX(3), CO_MIN(3), CO_SUM(3), CO_REDUCE(3)

fortran-lang intrinsic descriptions


Nemo Release 3.1 co_broadcast (3) July 22, 2023
Generated by manServer 1.08 from cd0b6cd7-fee0-4563-857b-10c97551c8a6 using man macros.