darrays_distrib Module

Column distribution helpers for distributed arrays

Provides functions to calculate how columns are distributed across MPI ranks and to find owners and local offsets for remote access.


Uses

  • module~~darrays_distrib~~UsesGraph module~darrays_distrib darrays_distrib mpi_f08 mpi_f08 module~darrays_distrib->mpi_f08 pic_types pic_types module~darrays_distrib->pic_types

Used by

  • module~~darrays_distrib~~UsedByGraph module~darrays_distrib darrays_distrib module~darrays_core darrays_core module~darrays_core->module~darrays_distrib module~darrays darrays module~darrays->module~darrays_core

Functions

public pure function get_local_offset(nrows, ncols, nranks, row, col) result(offset)

Get local offset in owner’s window for a given (row, col)

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: nrows

Number of rows in array

integer(kind=int32), intent(in) :: ncols

Number of rows in array Number of columns in array

integer(kind=int32), intent(in) :: nranks

Number of rows in array Number of columns in array Number of MPI ranks

integer(kind=int32), intent(in) :: row

Number of rows in array Number of columns in array Number of MPI ranks Row index (0-indexed)

integer(kind=int32), intent(in) :: col

Number of rows in array Number of columns in array Number of MPI ranks Row index (0-indexed) Column index (0-indexed)

Return Value integer(kind=MPI_ADDRESS_KIND)

public pure function get_owner(ncols, nranks, col) result(owner)

Find which rank owns a given column

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: ncols

Total number of columns

integer(kind=int32), intent(in) :: nranks

Total number of columns Number of MPI ranks

integer(kind=int32), intent(in) :: col

Total number of columns Number of MPI ranks Column index (0-indexed)

Return Value integer(kind=int32)


Subroutines

public pure subroutine calculate_distribution(ncols, nranks, rank, first_col, my_ncols)

Calculate column distribution for a rank

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: ncols

Total number of columns

integer(kind=int32), intent(in) :: nranks

Total number of columns Number of MPI ranks

integer(kind=int32), intent(in) :: rank

Total number of columns Number of MPI ranks This rank’s number (0-indexed)

integer(kind=int32), intent(out) :: first_col

Output: first column owned (0-indexed)

integer(kind=int32), intent(out) :: my_ncols