cable_mpi_mod Module

Module for handling some common MPI operations and MPI groups


Uses

  • module~~cable_mpi_mod~~UsesGraph module~cable_mpi_mod cable_mpi_mod iso_fortran_env iso_fortran_env module~cable_mpi_mod->iso_fortran_env mpi mpi module~cable_mpi_mod->mpi

Used by

  • module~~cable_mpi_mod~~UsedByGraph module~cable_mpi_mod cable_mpi_mod module~cable_driver_common_mod cable_driver_common_mod module~cable_driver_common_mod->module~cable_mpi_mod program~cable_offline_driver cable_offline_driver program~cable_offline_driver->module~cable_mpi_mod program~cable_offline_driver->module~cable_driver_common_mod module~cable_serial cable_serial program~cable_offline_driver->module~cable_serial module~cable_mpimaster~2 cable_mpimaster module~cable_mpimaster~2->module~cable_driver_common_mod module~cable_mpiworker~2 cable_mpiworker module~cable_mpiworker~2->module~cable_driver_common_mod module~cable_serial->module~cable_driver_common_mod

Variables

Type Visibility Attributes Name Initial
integer, private, parameter :: MPI_COMM_UNDEFINED = -1
integer, private :: default_comm

Interfaces

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
    integer, intent(in), optional :: comm

    MPI communicator

    Return Value type(mpi_grp_t)


Derived Types

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
integer, public :: comm = MPI_COMM_UNDEFINED

Communicator

integer, public :: rank = -1

Rank of the current process

integer, public :: size = -1

Size of the communicator

Constructor

Overload the default construct for mpi_grp_t

private function mpi_grp_constructor (comm)

Contructor for mpi_grp_t class.

Read more…

Type-Bound Procedures

procedure, public :: abort => mpi_grp_abort ../../../../

Send abort signal to processes in this group


Functions

private function mpi_grp_constructor(comm) result(mpi_grp)

Contructor for mpi_grp_t class.

Read more…

Arguments

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

MPI communicator

Return Value type(mpi_grp_t)


Subroutines

public subroutine mpi_mod_init()

Initialise MPI and set default communicator.

Read more…

Arguments

None

public subroutine mpi_mod_end()

Finalise MPI.

Arguments

None

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

public subroutine mpi_check_error(ierr)

Check if an MPI return code signaled an error. If so, print the corresponding message and abort the execution.

Arguments

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

Error code