sourcery_data_partition_m Module

distribute data identification numbers across images such that the number of items differs by at most 1 between any two images.


Uses

  • module~~sourcery_data_partition_m~~UsesGraph module~sourcery_data_partition_m sourcery_data_partition_m iso_fortran_env iso_fortran_env module~sourcery_data_partition_m->iso_fortran_env module~sourcery_bin_m sourcery_bin_m module~sourcery_data_partition_m->module~sourcery_bin_m

Used by

  • module~~sourcery_data_partition_m~~UsedByGraph module~sourcery_data_partition_m sourcery_data_partition_m module~sourcery_data_partition_s sourcery_data_partition_s module~sourcery_data_partition_s->module~sourcery_data_partition_m module~sourcery_m sourcery_m module~sourcery_m->module~sourcery_data_partition_m module~sourcery_string_s sourcery_string_s module~sourcery_string_s->module~sourcery_m

Interfaces

public interface data_partition_t

  • private pure module function construct(cardinality) result(data_partition)

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: cardinality

    Return Value type(data_partition_t)

interface

Gathers are inherently expensive and are best used either 1. Near the beginning/end of execution to amortize costs across an entire run or 2. Temporarily while developing/debugging code.

  • private pure module subroutine define_partitions(self, cardinality)

    define the range of data identification numbers owned by the executing image

    Arguments

    Type IntentOptional Attributes Name
    class(data_partition_t), intent(inout) :: self
    integer, intent(in) :: cardinality

interface

Gathers are inherently expensive and are best used either 1. Near the beginning/end of execution to amortize costs across an entire run or 2. Temporarily while developing/debugging code.

  • private pure module function first(self, image_number) result(first_index)

    the result is the first identification number owned by the executing image

    Arguments

    Type IntentOptional Attributes Name
    class(data_partition_t), intent(in) :: self
    integer, intent(in), optional :: image_number

    Return Value integer

interface

Gathers are inherently expensive and are best used either 1. Near the beginning/end of execution to amortize costs across an entire run or 2. Temporarily while developing/debugging code.

  • private module subroutine gather_real32_1D_array(self, a, result_image, dim)

    Gather the elements of an 1D array distributed along dimension dim onto result_image

    Arguments

    Type IntentOptional Attributes Name
    class(data_partition_t), intent(in) :: self
    real(kind=real32), intent(inout) :: a(:)
    integer, intent(in), optional :: result_image
    integer, intent(in), optional :: dim

interface

Gathers are inherently expensive and are best used either 1. Near the beginning/end of execution to amortize costs across an entire run or 2. Temporarily while developing/debugging code.

  • private module subroutine gather_real32_2D_array(self, a, result_image, dim)

    Gather the elements of an 2D array distributed along dimension dim onto result_image

    Arguments

    Type IntentOptional Attributes Name
    class(data_partition_t), intent(in) :: self
    real(kind=real32), intent(inout) :: a(:,:)
    integer, intent(in), optional :: result_image
    integer, intent(in), optional :: dim

interface

Gathers are inherently expensive and are best used either 1. Near the beginning/end of execution to amortize costs across an entire run or 2. Temporarily while developing/debugging code.

  • private module subroutine gather_real64_1D_array(self, a, result_image, dim)

    Gather the elements of an 1D array distributed along dimension dim onto result_image

    Arguments

    Type IntentOptional Attributes Name
    class(data_partition_t), intent(in) :: self
    real(kind=real64), intent(inout) :: a(:)
    integer, intent(in), optional :: result_image
    integer, intent(in), optional :: dim

interface

Gathers are inherently expensive and are best used either 1. Near the beginning/end of execution to amortize costs across an entire run or 2. Temporarily while developing/debugging code.

  • private module subroutine gather_real64_2D_array(self, a, result_image, dim)

    Gather the elements of an 2D array distributed along dimension dim onto result_image

    Arguments

    Type IntentOptional Attributes Name
    class(data_partition_t), intent(in) :: self
    real(kind=real64), intent(inout) :: a(:,:)
    integer, intent(in), optional :: result_image
    integer, intent(in), optional :: dim

interface

Gathers are inherently expensive and are best used either 1. Near the beginning/end of execution to amortize costs across an entire run or 2. Temporarily while developing/debugging code.

  • private pure module function last(self, image_number) result(last_index)

    the result is the last identification number owned by the executing image

    Arguments

    Type IntentOptional Attributes Name
    class(data_partition_t), intent(in) :: self
    integer, intent(in), optional :: image_number

    Return Value integer


Derived Types

type, public ::  data_partition_t

encapsulate a description of the data subset the executing image owns

Components

Type Visibility Attributes Name Initial
type(bin_t), private, allocatable :: bin(:)

Constructor

private pure, module function construct (cardinality)

Type-Bound Procedures

procedure, public :: define_partitions
procedure, public :: first
generic, public :: gather => gather_real32_2D_array, gather_real64_2D_array, gather_real32_1D_array, gather_real64_1D_array
procedure, public :: last
procedure, private :: gather_real32_1D_array
procedure, private :: gather_real32_2D_array
procedure, private :: gather_real64_1D_array
procedure, private :: gather_real64_2D_array