flush_group_results Subroutine

public subroutine flush_group_results(world_comm, batch_count, batch_ids, batch_results)

Send all currently batched results to rank 0 and reset the batch.

Arguments

Type IntentOptional Attributes Name
type(comm_t), intent(in) :: world_comm
integer(kind=int32), intent(inout) :: batch_count
integer(kind=int64), intent(inout) :: batch_ids(:)
type(calculation_result_t), intent(inout) :: batch_results(:)

Calls

proc~~flush_group_results~~CallsGraph proc~flush_group_results flush_group_results isend isend proc~flush_group_results->isend proc~result_destroy calculation_result_t%result_destroy proc~flush_group_results->proc~result_destroy proc~result_isend result_isend proc~flush_group_results->proc~result_isend proc~result_reset calculation_result_t%result_reset proc~result_destroy->proc~result_reset proc~result_isend->isend send send proc~result_isend->send proc~energy_reset energy_t%energy_reset proc~result_reset->proc~energy_reset proc~error_clear error_t%error_clear proc~result_reset->proc~error_clear proc~mp2_reset mp2_energy_t%mp2_reset proc~energy_reset->proc~mp2_reset

Called by

proc~~flush_group_results~~CalledByGraph proc~flush_group_results flush_group_results proc~gmbe_group_global_coordinator gmbe_group_global_coordinator proc~gmbe_group_global_coordinator->proc~flush_group_results proc~handle_local_worker_results_to_batch handle_local_worker_results_to_batch proc~gmbe_group_global_coordinator->proc~handle_local_worker_results_to_batch proc~handle_node_results_to_batch handle_node_results_to_batch proc~gmbe_group_global_coordinator->proc~handle_node_results_to_batch proc~group_global_coordinator_impl group_global_coordinator_impl proc~group_global_coordinator_impl->proc~flush_group_results proc~group_global_coordinator_impl->proc~handle_local_worker_results_to_batch proc~group_global_coordinator_impl->proc~handle_node_results_to_batch proc~handle_local_worker_results_to_batch->proc~flush_group_results proc~handle_node_results_to_batch->proc~flush_group_results proc~gmbe_run_distributed gmbe_context_t%gmbe_run_distributed proc~gmbe_run_distributed->proc~gmbe_group_global_coordinator interface~node_coordinator node_coordinator proc~gmbe_run_distributed->interface~node_coordinator proc~node_coordinator_impl node_coordinator_impl proc~node_coordinator_impl->proc~group_global_coordinator_impl proc~node_coordinator node_coordinator proc~node_coordinator->proc~node_coordinator_impl interface~node_coordinator->proc~node_coordinator proc~mbe_run_distributed mbe_context_t%mbe_run_distributed proc~mbe_run_distributed->interface~node_coordinator

Variables

Type Visibility Attributes Name Initial
integer, private :: i
type(request_t), private :: req

Source Code

   subroutine flush_group_results(world_comm, batch_count, batch_ids, batch_results)
      !! Send all currently batched results to rank 0 and reset the batch.
      type(comm_t), intent(in) :: world_comm
      integer(int32), intent(inout) :: batch_count
      integer(int64), intent(inout) :: batch_ids(:)
      type(calculation_result_t), intent(inout) :: batch_results(:)

      type(request_t) :: req
      integer :: i

      if (batch_count <= 0) return

      call isend(world_comm, batch_count, 0, TAG_GROUP_RESULT, req)
      call wait(req)
      call isend(world_comm, batch_ids(1:batch_count), 0, TAG_GROUP_RESULT, req)
      call wait(req)
      do i = 1, batch_count
         call result_isend(batch_results(i), world_comm, 0, TAG_GROUP_RESULT, req)
         call wait(req)
         call batch_results(i)%destroy()
      end do
      batch_count = 0
   end subroutine flush_group_results