lb_send Subroutine

private subroutine lb_send()

Uses

  • proc~~lb_send~~UsesGraph proc~lb_send lb_send module~mod_comm_lib mod_comm_lib proc~lb_send->module~mod_comm_lib module~mod_global_parameters mod_global_parameters proc~lb_send->module~mod_global_parameters module~mod_basic_types mod_basic_types module~mod_global_parameters->module~mod_basic_types module~mod_connectivity mod_connectivity module~mod_global_parameters->module~mod_connectivity module~mod_constants mod_constants module~mod_global_parameters->module~mod_constants module~mod_physicaldata mod_physicaldata module~mod_global_parameters->module~mod_physicaldata module~mod_variables mod_variables module~mod_global_parameters->module~mod_variables mpi mpi module~mod_global_parameters->mpi module~mod_variables->module~mod_basic_types

Arguments

None

Calls

proc~~lb_send~~CallsGraph proc~lb_send lb_send proc~mpi_isend_wrapper mpi_isend_wrapper proc~lb_send->proc~mpi_isend_wrapper proc~mpistop mpistop proc~lb_send->proc~mpistop mpi_isend mpi_isend proc~mpi_isend_wrapper->mpi_isend mpi_abort mpi_abort proc~mpistop->mpi_abort

Called by

proc~~lb_send~~CalledByGraph proc~lb_send lb_send proc~load_balance load_balance proc~load_balance->proc~lb_send proc~amr_coarsen_refine amr_coarsen_refine proc~amr_coarsen_refine->proc~load_balance proc~resettree resettree proc~resettree->proc~amr_coarsen_refine proc~resettree_convert resettree_convert proc~resettree_convert->proc~amr_coarsen_refine proc~settree settree proc~settree->proc~amr_coarsen_refine proc~main main proc~main->proc~resettree_convert proc~main->proc~settree proc~timeintegration timeintegration proc~main->proc~timeintegration proc~timeintegration->proc~resettree program~agile agile program~agile->proc~main

Source Code

  subroutine lb_send
    use mod_global_parameters
    use mod_comm_lib, only: mpistop

    ! Record the block; the pack and the post both happen in
    ! exchange_migrated_blocks.  The key is the receiving block index, so it
    ! matches the one the receiver derives from its own getnode().
    isend=isend+1
    n_lb_snd=n_lb_snd+1
    if (n_lb_snd > size(lb_snd_igrid)) then
       call mpistop('load_balance: more departures than max_blocks')
    end if
    lb_snd_igrid(n_lb_snd) = send_igrid
    lb_snd_dest(n_lb_snd)  = recv_ipe
    lb_snd_key(n_lb_snd)   = recv_igrid

    ! The staggered branch below is NOT aggregated and is left as found: it is
    ! unreachable (stagger_grid is false throughout this fork and fix_edges has
    ! no caller).  Its tag, recv_igrid+max_blocks, is sound but doubles the tag
    ! range, so it would be the first thing to hit MPI_TAG_UB.
    if(stagger_grid) then
       itag=recv_igrid+max_blocks
       call mpi_isend_wrapper(ps(send_igrid)%ws,1,type_block_io_stg,recv_ipe,itag,&
             icomm,sendrequest_stg(isend),ierrmpi)
    end if
  end subroutine lb_send