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 module~cable_error_handler_mod cable_error_handler_mod module~cable_mpi_mod->module~cable_error_handler_mod module~cable_mpi_stub_types_mod cable_mpi_stub_types_mod module~cable_mpi_mod->module~cable_mpi_stub_types_mod mpi_f08 mpi_f08 module~cable_mpi_mod->mpi_f08 module~cable_error_handler_base_mod cable_error_handler_base_mod module~cable_error_handler_mod->module~cable_error_handler_base_mod module~cable_error_handler_base_mod->iso_fortran_env

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 module~cable_input_module cable_input_module module~cable_driver_common_mod->module~cable_input_module module~cable_error_handler_mpi_mod cable_error_handler_mpi_mod module~cable_error_handler_mpi_mod->module~cable_mpi_mod module~cable_input_module->module~cable_mpi_mod module~cable_mpimaster cable_mpimaster module~cable_mpimaster->module~cable_mpi_mod module~cable_mpimaster~2 cable_mpimaster module~cable_mpimaster~2->module~cable_mpi_mod module~cable_mpimaster~2->module~cable_driver_common_mod module~cable_netcdf_mod cable_netcdf_mod module~cable_mpimaster~2->module~cable_netcdf_mod module~cable_diagnostics_casa_mod cable_diagnostics_casa_mod module~cable_mpimaster~2->module~cable_diagnostics_casa_mod module~cable_diagnostics_mod cable_diagnostics_mod module~cable_mpimaster~2->module~cable_diagnostics_mod module~cable_output_mod cable_output_mod module~cable_mpimaster~2->module~cable_output_mod module~cable_netcdf_mod->module~cable_mpi_mod module~cable_netcdf_pio_mod cable_netcdf_pio_mod module~cable_netcdf_pio_mod->module~cable_mpi_mod module~cable_netcdf_pio_mod->module~cable_netcdf_mod module~cable_netcdf_pio_mod~2 cable_netcdf_pio_mod module~cable_netcdf_pio_mod~2->module~cable_mpi_mod module~cable_netcdf_pio_mod~2->module~cable_netcdf_mod module~cable_netcdf_stub_types_mod cable_netcdf_stub_types_mod module~cable_netcdf_pio_mod~2->module~cable_netcdf_stub_types_mod module~cable_netcdf_stub_types_mod->module~cable_mpi_mod module~cable_netcdf_stub_types_mod->module~cable_netcdf_mod module~cable_serial cable_serial module~cable_serial->module~cable_mpi_mod module~cable_serial->module~cable_driver_common_mod module~cable_serial->module~cable_input_module module~cable_serial->module~cable_netcdf_mod module~cable_serial->module~cable_diagnostics_casa_mod module~cable_serial->module~cable_diagnostics_mod module~cable_serial->module~cable_output_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 program~cable_offline_driver->module~cable_error_handler_mpi_mod program~cable_offline_driver->module~cable_mpimaster program~cable_offline_driver->module~cable_serial module~cable_mpiworker~2 cable_mpiworker program~cable_offline_driver->module~cable_mpiworker~2 module~cable_diagnostics_casa_mod->module~cable_netcdf_mod module~cable_diagnostics_casa_mod->module~cable_output_mod module~cable_diagnostics_mod->module~cable_netcdf_mod module~cable_diagnostics_mod->module~cable_output_mod module~cable_mpiworker~2->module~cable_driver_common_mod module~cable_netcdf_decomp_util_mod cable_netcdf_decomp_util_mod module~cable_netcdf_decomp_util_mod->module~cable_netcdf_mod module~cable_netcdf_init_smod cable_netcdf_init_smod module~cable_netcdf_init_smod->module~cable_netcdf_mod module~cable_netcdf_init_smod->module~cable_netcdf_pio_mod~2 module~cable_netcdf_nf90_mod cable_netcdf_nf90_mod module~cable_netcdf_init_smod->module~cable_netcdf_nf90_mod module~cable_netcdf_nf90_mod->module~cable_netcdf_mod module~cable_output_common_smod cable_output_common_smod module~cable_output_common_smod->module~cable_netcdf_mod module~cable_output_common_smod->module~cable_output_mod module~cable_output_decomp_smod cable_output_decomp_smod module~cable_output_decomp_smod->module~cable_netcdf_mod module~cable_output_decomp_smod->module~cable_netcdf_decomp_util_mod module~cable_output_decomp_smod->module~cable_output_common_smod module~cable_output_define_smod cable_output_define_smod module~cable_output_define_smod->module~cable_netcdf_mod module~cable_output_define_smod->module~cable_output_common_smod module~cable_output_impl_smod cable_output_impl_smod module~cable_output_impl_smod->module~cable_netcdf_mod module~cable_output_impl_smod->module~cable_output_common_smod module~cable_output_mod->module~cable_netcdf_mod module~cable_output_write_smod cable_output_write_smod module~cable_output_write_smod->module~cable_netcdf_mod module~cable_output_write_smod->module~cable_output_common_smod proc~mpidrv_master~2 mpidrv_master proc~mpidrv_master~2->module~cable_input_module proc~mpidrv_worker mpidrv_worker proc~mpidrv_worker->module~cable_input_module proc~worker_cable_params worker_cable_params proc~worker_cable_params->module~cable_input_module module~cable_output_reduction_buffers_smod cable_output_reduction_buffers_smod module~cable_output_reduction_buffers_smod->module~cable_output_common_smod

Variables

Type Visibility Attributes Name Initial
type(MPI_Comm), private, parameter :: MPI_COMM_UNDEFINED = MPI_COMM_NULL
type(MPI_Comm), 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
    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)


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
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

Overload the default construct for mpi_grp_t

private function mpi_grp_constructor (comm)

Contructor for mpi_grp_t class.

Read more…
private function mpi_grp_constructor_legacy (comm)

Contructor for mpi_grp_t using the legacy communicator type.

Type-Bound Procedures

procedure, public :: abort => mpi_grp_abort

Send abort signal to processes in this group

procedure, public :: split => mpi_grp_split

Split this group into sub-groups

procedure, public :: comm_defined => mpi_grp_comm_defined

Check if communicator is defined


Functions

private function mpi_grp_constructor(comm) result(mpi_grp)

Contructor for mpi_grp_t class.

Read more…

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)

private function mpi_grp_comm_defined(this)

Class method to check if the communicator is defined.

Arguments

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

Return Value logical


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, error_code)

Class method to abort execution of an MPI group.

Arguments

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

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

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