Visible to Intel only — GUID: GUID-43AB9FDF-93D0-4776-ADF3-3EEF67D61FFB
Visible to Intel only — GUID: GUID-43AB9FDF-93D0-4776-ADF3-3EEF67D61FFB
CO_MIN
Collective Intrinsic Subroutine (Generic): Calculates the minimum value across images.
CALL CO_MIN (a [, result_image, stat, errmsg])
a |
(Input; output) Must be of type real, integer, or charater, and have the same shape, type, and type parameter values in corresponding references across all images of the current team. It cannot be a coindexed object. If it is scalar, the computed value is the minimum value of a in all corresponding references. If it is an array, each element of the computed value is equal to the maximum value of the corresponding element of a in all corresponding references. If no error occurs, the computed value is assigned to a on all images of the current team if result_image is not present, or on the executing image if the executing image is the image identified by result_image. Otherwise, a becomes undefined. |
result_image |
(Input; optional) Must be a scalar integer. If present, it must be present with the same value in all corresponding references and be a valid image index in the current team. If result_image is not present, it cannot be present in any corresponding reference. |
stat |
(Output; optional) Must be a non-coindexed integer scalar with a decimal exponent range of at least four (KIND=2 or greater). The value assigned to stat is specified in Overview of Collective Subroutines. If stat is not present and an error condition occurs, error termination is initiated. |
errmsg |
(Input; output; optional) Must be a non-coindexed default character scalar variable. The semantics of errmsg is described in Overview of Collective Subroutines. |
Example
Consider the following:
CALL CO_MIN (R)
If there are two images, and R is a four-element array defined with the value [5, 10, 20, 15] on image one and [10, 15, 20, 5] on image two when the subroutine is referenced, R becomes defined with the value [5, 10, 20, 5] on both images if no error occurs during the subroutine reference, and CALL CO_MIN (R, 1) causes R on image 1 to become defined with the value [5, 10, 20 5]; R on image 2 becomes undefined.