comm_env_pop_compute_comm Subroutine

public subroutine comm_env_pop_compute_comm()

TEST/TOOLING-ONLY. Pops the override pushed by comm_env_push_compute_comm, restoring comm_env_compute_comm() to the real compute communicator. Fails loud on pop-without-push (a bug in the caller, not a state this seam should absorb silently). Does NOT finalize the popped communicator – the pusher owns that (e.g. freeing a self-comm built for the push).

Arguments

None

Source Code

   subroutine comm_env_pop_compute_comm()
      !! TEST/TOOLING-ONLY.  Pops the override pushed by
      !! `comm_env_push_compute_comm`, restoring `comm_env_compute_comm()`
      !! to the real compute communicator.  Fails loud on pop-without-push
      !! (a bug in the caller, not a state this seam should absorb
      !! silently).  Does NOT finalize the popped communicator -- the
      !! pusher owns that (e.g. freeing a self-comm built for the push).
      if (compute_comm_override_depth <= 0) then
         error stop "comm_env_pop_compute_comm: no override active (pop without push)"
      end if
      compute_comm_override_depth = compute_comm_override_depth - 1
   end subroutine comm_env_pop_compute_comm