Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ESMF_VM), | intent(in) | :: | vm | |||
integer, | intent(in) | :: | rc |
function ESMF_ReconcileAllRC (vm, rc) result (rc_return) type(ESMF_VM), intent(in) :: vm integer, intent(in) :: rc integer :: rc_return integer :: rc_send(1) integer, allocatable :: rc_all(:) integer :: mypet, npets call ESMF_VMGet(vm, localpet=mypet, petCount=npets) allocate (rc_all(npets)) rc_send = rc call ESMF_VMGather (vm, & sendData=rc_send, recvData=rc_all, count=1, & rootPet=0) call ESMF_VMBroadcast (vm, & bcstData=rc_all, count=npets, & rootPet=0) rc_return = rc if (any (rc_all /= ESMF_SUCCESS)) then rc_return = merge (ESMF_FAILURE, rc, rc == ESMF_SUCCESS) end if end function ESMF_ReconcileAllRC