agree_outcome Function

public function agree_outcome(local_ok, fail_text, is_ok, message) result(failed)

Collective outcome agreement (write-side): failed = any rank not ok. On failure the optional status pair gets fail_text; on SUCCESS the pair is left exactly as the caller preset it — hence intent(inout), NOT intent(out) (which would leave the caller's values undefined on the success path). COLLECTIVE — every rank must call.

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: local_ok
character(len=*), intent(in) :: fail_text
logical, intent(inout), optional :: is_ok
character(len=*), intent(inout), optional :: message

Return Value logical