co_sum

Date:

02-10-2023

NAME

CO_SUM - Determine the sum of corresponding elements on all images of the current team in a Coarray Fortran application

SYNOPSIS

CO_SUM (SOURCE [, RESULT_IMAGE, STAT, ERRMSG])

IMPLEMENTATION

Cray Linux Environment (CLE)

DESCRIPTION

CO_SUM is an intrinsic collective subroutine that sums the value of corresponding elements on all images of the current team in a Coarray Fortran application.

Support for non-contiguous SOURCE arrays is deferred.

This subroutine accepts the following options:

SOURCE

Can be a scalar or an array of numeric type. If scalar, the computation result is equal to the processor-dependent and image-dependent approximation to the sum of the value of SOURCE on all images in an application. If SOURCE is an array, the computation result is equal to the processor-dependent and image-dependent approximation to the sum of all the corresponding elements of SOURCE on all the images of the current team. It is an INTENT(INOUT) argument.

RESULT_IMAGE

If RESULT_IMAGE is present, the result of the computation is assigned to SOURCE on image RESULT_IMAGE and SOURCE on all other images of the current team becomes undefined. If RESULT_IMAGE is not present, the result is assigned on all images of the current team. Must be an integer in the range 1 … NUM_IMAGES(). It is an INTENT(IN) argument.

STAT

If STAT is present and an error condition occurs, it is assigned a positive value. If it is present and no error condition occurs, it is assigned the value zero. If it is not present and an error condition occurs, error termination is initiated. Must be an integer scalar. It is an INTENT(OUT) argument.

ERRMSG

If ERRMSG is present and an error condition occurs, it is assigned an explanatory message. If it is present an no error condition occurs, it is left unchanged. Must be a character scalar. It is an INTENT(INOUT) argument.

SEE ALSO

co_bcast(3), co_max(3)