mpi_grp_t Derived Type

type, public :: mpi_grp_t

Class to handle MPI groups. This class stores information about the group and the current proccess.


Components

Type Visibility Attributes Name Initial
type(MPI_Comm), public :: comm = MPI_COMM_UNDEFINED

Communicator

integer, public :: rank = -1

Rank of the current process

integer, public :: size = -1

Size of the communicator


Constructor

public interface mpi_grp_t

Overload the default construct for mpi_grp_t

  • private function mpi_grp_constructor(comm) result(mpi_grp)

    Contructor for mpi_grp_t class.

    This sets the communicator of the group and gets the size of the group and rank of current process. If no communicator is provided, it will use the default defined when calling mpi_mod_init.

    Note that when the undefined communicator is used, the group size is 1 and the rank to 0, such that the code can work in serial mode.

    Arguments

    Type IntentOptional Attributes Name
    type(MPI_Comm), intent(in), optional :: comm

    MPI communicator

    Return Value type(mpi_grp_t)

  • private function mpi_grp_constructor_legacy(comm) result(mpi_grp)

    Contructor for mpi_grp_t using the legacy communicator type.

    Arguments

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

    MPI communicator

    Return Value type(mpi_grp_t)


Type-Bound Procedures

procedure, public :: abort => mpi_grp_abort

Send abort signal to processes in this group

  • private subroutine mpi_grp_abort(this)

    Class method to abort execution of an MPI group.

    Arguments

    Type IntentOptional Attributes Name
    class(mpi_grp_t), intent(in) :: this

procedure, public :: split => mpi_grp_split

Split this group into sub-groups

  • private subroutine mpi_grp_split(this, color, key, new_grp)

    Class method to split an MPI group.

    Arguments

    Type IntentOptional Attributes Name
    class(mpi_grp_t), intent(in) :: this
    integer, intent(in) :: color
    integer, intent(in) :: key
    type(mpi_grp_t), intent(out) :: new_grp