MFC
Exascale flow solver
Loading...
Searching...
No Matches
m_mpi_proxy Module Reference

MPI halo exchange, domain decomposition, and buffer packing/unpacking for the simulation solver. More...

Functions/Subroutines

subroutine s_initialize_mpi_proxy_module ()
 Initialize the MPI proxy module.
subroutine s_initialize_lag_entity_mpi (n_real, n_int8, n_el_glb)
 Size the MPI slot of one Lagrangian entity (an integer ID, n_real reals and n_int8 64-bit integers) and allocate the communication buffers and lists for an even share of the n_el_glb entities; they grow on demand.
subroutine s_allocate_lag_entity_comm (n)
 Allocate the send/receive buffers (sized by p_buff_size) and transfer lists for n entities, and build the list of neighbor ranks.
subroutine s_reserve_lag_send_list (n)
 Make the send lists hold n entities; their contents are rebuilt for every exchange, so they are not kept.
impure subroutine s_mpi_bcast_user_inputs ()
 Since only the processor with rank 0 reads and verifies the consistency of user inputs, these are initially not available to the other processors. Then, the purpose of this subroutine is to distribute the user inputs to the remaining processors in the communicator.
impure subroutine s_add_lag_entities_to_transfer_list (nbub, pos, posprev)
 Adds particles to the transfer list for the MPI communication.
impure subroutine s_exchange_lag_entity_counts ()
 Exchange the number of particles to send/receive with every neighbor rank (p_send_counts -> p_recv_counts).
impure subroutine s_begin_lag_entity_exchange (n_send, n_recv)
 Exchange the transfer counts with the neighbors, grow the buffers to fit, and list the entities to send in slot order (n_send) and the rank of each of the n_recv entities to receive.
impure subroutine s_exchange_lag_entities ()
 Send the packed slots to the neighbors and receive theirs, in the slot order of s_begin_lag_entity_exchange.
integer function neighbor_tag (i, j, k)
 Return a unique tag for each neighbor based on its position relative to the current process.
subroutine s_wrap_lag_entity_positions (pos, posprev, nbubs, dest)
impure subroutine s_mpi_send_random_number (phi_rn, num_freq)
 Broadcast random phase numbers from rank 0 to all MPI processes.
subroutine s_finalize_mpi_proxy_module ()
 Finalize the MPI proxy module.

Variables

integer, dimension(:), allocatable, private ib_buff_send
 IB marker send buffer for halo exchange.
integer, dimension(:), allocatable, private ib_buff_recv
 IB marker receive buffer for halo exchange.
integer i_halo_size
integer, dimension(-1:1,-1:1,-1:1) p_send_counts
integer, dimension(-1:1,-1:1,-1:1) p_recv_counts
integer, dimension(:,:,:,:), allocatable p_send_ids
 Host only, as are the buffers and lists below; grown on demand.
character(len=1), dimension(:), allocatable p_send_buff
character(len=1), dimension(:), allocatable p_recv_buff
integer p_buff_size
integer p_var_size
integer, parameter max_neighbors = 27
integer, dimension(max_neighbors) send_requests
integer, dimension(max_neighbors) recv_requests
integer, dimension(max_neighbors, 3) neighbor_list
integer n_neighbors
integer, dimension(:), allocatable lag_send_ids
 Local index of the entity packed into each send slot.

Detailed Description

MPI halo exchange, domain decomposition, and buffer packing/unpacking for the simulation solver.

Function/Subroutine Documentation

◆ neighbor_tag()

integer function m_mpi_proxy::neighbor_tag ( integer, intent(in) i,
integer, intent(in) j,
integer, intent(in) k )

Return a unique tag for each neighbor based on its position relative to the current process.

Definition at line 1721 of file m_mpi_proxy.fpp.f90.

Here is the caller graph for this function:

◆ s_add_lag_entities_to_transfer_list()

impure subroutine m_mpi_proxy::s_add_lag_entities_to_transfer_list ( integer, intent(in) nbub,
real(wp), dimension(:,:), intent(in) pos,
real(wp), dimension(:,:), intent(in) posprev )

Adds particles to the transfer list for the MPI communication.

Parameters
nBubCurrent LOCAL number of bubbles
posCurrent position of each bubble
posPrevPrevious position of each bubble (optional, not used for communication of initial condition)

Definition at line 1523 of file m_mpi_proxy.fpp.f90.

Here is the call graph for this function:

◆ s_allocate_lag_entity_comm()

subroutine m_mpi_proxy::s_allocate_lag_entity_comm ( integer, intent(in) n)

Allocate the send/receive buffers (sized by p_buff_size) and transfer lists for n entities, and build the list of neighbor ranks.

Definition at line 533 of file m_mpi_proxy.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_begin_lag_entity_exchange()

impure subroutine m_mpi_proxy::s_begin_lag_entity_exchange ( integer, intent(out) n_send,
integer, intent(out) n_recv )

Exchange the transfer counts with the neighbors, grow the buffers to fit, and list the entities to send in slot order (n_send) and the rank of each of the n_recv entities to receive.

Definition at line 1643 of file m_mpi_proxy.fpp.f90.

Here is the call graph for this function:

◆ s_exchange_lag_entities()

impure subroutine m_mpi_proxy::s_exchange_lag_entities

Send the packed slots to the neighbors and receive theirs, in the slot order of s_begin_lag_entity_exchange.

Definition at line 1686 of file m_mpi_proxy.fpp.f90.

Here is the call graph for this function:

◆ s_exchange_lag_entity_counts()

impure subroutine m_mpi_proxy::s_exchange_lag_entity_counts

Exchange the number of particles to send/receive with every neighbor rank (p_send_counts -> p_recv_counts).

Definition at line 1607 of file m_mpi_proxy.fpp.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s_finalize_mpi_proxy_module()

subroutine m_mpi_proxy::s_finalize_mpi_proxy_module

Finalize the MPI proxy module.

Definition at line 1802 of file m_mpi_proxy.fpp.f90.

◆ s_initialize_lag_entity_mpi()

subroutine m_mpi_proxy::s_initialize_lag_entity_mpi ( integer, intent(in) n_real,
integer, intent(in) n_int8,
integer, intent(in) n_el_glb )

Size the MPI slot of one Lagrangian entity (an integer ID, n_real reals and n_int8 64-bit integers) and allocate the communication buffers and lists for an even share of the n_el_glb entities; they grow on demand.

Definition at line 509 of file m_mpi_proxy.fpp.f90.

Here is the call graph for this function:

◆ s_initialize_mpi_proxy_module()

subroutine m_mpi_proxy::s_initialize_mpi_proxy_module

Initialize the MPI proxy module.

Definition at line 439 of file m_mpi_proxy.fpp.f90.

Here is the caller graph for this function:

◆ s_mpi_bcast_user_inputs()

impure subroutine m_mpi_proxy::s_mpi_bcast_user_inputs

Since only the processor with rank 0 reads and verifies the consistency of user inputs, these are initially not available to the other processors. Then, the purpose of this subroutine is to distribute the user inputs to the remaining processors in the communicator.

Definition at line 573 of file m_mpi_proxy.fpp.f90.

◆ s_mpi_send_random_number()

impure subroutine m_mpi_proxy::s_mpi_send_random_number ( real(wp), dimension(1:num_freq), intent(inout) phi_rn,
integer, intent(in) num_freq )

Broadcast random phase numbers from rank 0 to all MPI processes.

Definition at line 1789 of file m_mpi_proxy.fpp.f90.

◆ s_reserve_lag_send_list()

subroutine m_mpi_proxy::s_reserve_lag_send_list ( integer, intent(in) n)

Make the send lists hold n entities; their contents are rebuilt for every exchange, so they are not kept.

Definition at line 558 of file m_mpi_proxy.fpp.f90.

Here is the caller graph for this function:

◆ s_wrap_lag_entity_positions()

subroutine m_mpi_proxy::s_wrap_lag_entity_positions ( real(wp), dimension(:,:,:) pos,
real(wp), dimension(:,:,:) posprev,
integer nbubs,
integer dest )

Definition at line 1729 of file m_mpi_proxy.fpp.f90.

Variable Documentation

◆ i_halo_size

integer m_mpi_proxy::i_halo_size

Definition at line 399 of file m_mpi_proxy.fpp.f90.

◆ ib_buff_recv

integer, dimension(:), allocatable, private m_mpi_proxy::ib_buff_recv
private

IB marker receive buffer for halo exchange.

Definition at line 398 of file m_mpi_proxy.fpp.f90.

◆ ib_buff_send

integer, dimension(:), allocatable, private m_mpi_proxy::ib_buff_send
private

IB marker send buffer for halo exchange.

Definition at line 397 of file m_mpi_proxy.fpp.f90.

◆ lag_send_ids

integer, dimension(:), allocatable m_mpi_proxy::lag_send_ids

Local index of the entity packed into each send slot.

Definition at line 434 of file m_mpi_proxy.fpp.f90.

◆ max_neighbors

integer, parameter m_mpi_proxy::max_neighbors = 27

Definition at line 418 of file m_mpi_proxy.fpp.f90.

◆ n_neighbors

integer m_mpi_proxy::n_neighbors

Definition at line 421 of file m_mpi_proxy.fpp.f90.

◆ neighbor_list

integer, dimension(max_neighbors, 3) m_mpi_proxy::neighbor_list

Definition at line 420 of file m_mpi_proxy.fpp.f90.

◆ p_buff_size

integer m_mpi_proxy::p_buff_size

Definition at line 416 of file m_mpi_proxy.fpp.f90.

◆ p_recv_buff

character(len=1), dimension(:), allocatable m_mpi_proxy::p_recv_buff

Definition at line 415 of file m_mpi_proxy.fpp.f90.

◆ p_recv_counts

integer, dimension(-1:1,-1:1,-1:1) m_mpi_proxy::p_recv_counts

Definition at line 413 of file m_mpi_proxy.fpp.f90.

◆ p_send_buff

character(len=1), dimension(:), allocatable m_mpi_proxy::p_send_buff

Definition at line 415 of file m_mpi_proxy.fpp.f90.

◆ p_send_counts

integer, dimension(-1:1,-1:1,-1:1) m_mpi_proxy::p_send_counts

Definition at line 413 of file m_mpi_proxy.fpp.f90.

◆ p_send_ids

integer, dimension(:,:,:,:), allocatable m_mpi_proxy::p_send_ids

Host only, as are the buffers and lists below; grown on demand.

Definition at line 414 of file m_mpi_proxy.fpp.f90.

◆ p_var_size

integer m_mpi_proxy::p_var_size

Definition at line 416 of file m_mpi_proxy.fpp.f90.

◆ recv_requests

integer, dimension(max_neighbors) m_mpi_proxy::recv_requests

Definition at line 419 of file m_mpi_proxy.fpp.f90.

◆ send_requests

integer, dimension(max_neighbors) m_mpi_proxy::send_requests

Definition at line 419 of file m_mpi_proxy.fpp.f90.