send_pie_term_payload Subroutine

private subroutine send_pie_term_payload(comm, tag, term_idx, atom_row, dest_rank)

Send PIE term atom list from a row.

Arguments

Type IntentOptional Attributes Name
type(comm_t), intent(in) :: comm
integer, intent(in) :: tag
integer(kind=int64), intent(in) :: term_idx
integer, intent(in) :: atom_row(:)
integer, intent(in) :: dest_rank

Calls

proc~~send_pie_term_payload~~CallsGraph proc~send_pie_term_payload send_pie_term_payload isend isend proc~send_pie_term_payload->isend

Called by

proc~~send_pie_term_payload~~CalledByGraph proc~send_pie_term_payload send_pie_term_payload proc~handle_group_node_requests~2 handle_group_node_requests proc~handle_group_node_requests~2->proc~send_pie_term_payload proc~handle_local_worker_requests_group~2 handle_local_worker_requests_group proc~handle_local_worker_requests_group~2->proc~send_pie_term_payload proc~gmbe_group_global_coordinator gmbe_group_global_coordinator proc~gmbe_group_global_coordinator->proc~handle_group_node_requests~2 proc~gmbe_group_global_coordinator->proc~handle_local_worker_requests_group~2 proc~gmbe_pie_coordinator gmbe_pie_coordinator proc~gmbe_pie_coordinator->proc~handle_group_node_requests~2 proc~gmbe_pie_coordinator->proc~handle_local_worker_requests_group~2 proc~gmbe_run_distributed gmbe_context_t%gmbe_run_distributed proc~gmbe_run_distributed->proc~gmbe_group_global_coordinator proc~gmbe_run_distributed->proc~gmbe_pie_coordinator

Variables

Type Visibility Attributes Name Initial
integer, private, allocatable :: atom_list(:)
integer(kind=int32), private :: fragment_type
integer, private :: max_atoms
integer, private :: n_atoms
type(request_t), private :: req(4)

Source Code

   subroutine send_pie_term_payload(comm, tag, term_idx, atom_row, dest_rank)
      !! Send PIE term atom list from a row.
      type(comm_t), intent(in) :: comm
      integer, intent(in) :: tag
      integer(int64), intent(in) :: term_idx
      integer, intent(in) :: atom_row(:)
      integer, intent(in) :: dest_rank

      integer :: n_atoms, max_atoms
      integer, allocatable :: atom_list(:)
      integer(int32) :: fragment_type
      type(request_t) :: req(4)

      fragment_type = FRAGMENT_TYPE_ATOMS

      max_atoms = size(atom_row)
      n_atoms = 0
      do while (n_atoms < max_atoms .and. atom_row(n_atoms + 1) >= 0)
         n_atoms = n_atoms + 1
      end do

      allocate (atom_list(n_atoms))
      if (n_atoms > 0) then
         atom_list = atom_row(1:n_atoms)
      end if

      call isend(comm, term_idx, dest_rank, tag, req(1))
      call isend(comm, fragment_type, dest_rank, tag, req(2))
      call isend(comm, n_atoms, dest_rank, tag, req(3))
      call isend(comm, atom_list, dest_rank, tag, req(4))

      call wait(req(1))
      call wait(req(2))
      call wait(req(3))
      call wait(req(4))

      deallocate (atom_list)
   end subroutine send_pie_term_payload