pic_comm_type Derived Type

type, public :: pic_comm_type

custom data type that holds the MPI communicators


Inherits

type~~pic_comm_type~~InheritsGraph type~pic_comm_type pic_comm_type MPI_COMM MPI_COMM type~pic_comm_type->MPI_COMM comm

Components

Type Visibility Attributes Name Initial
type(MPI_COMM), public :: comm

use the MPI_COMM from the mpi_f08 module interface

integer(kind=int32), public :: m_ierr
integer(kind=int32), public :: m_rank

MPI rank

integer(kind=int32), public :: m_size

MPI size


Type-Bound Procedures

procedure, public :: finalize => pic_comm_finalize

  • private subroutine pic_comm_finalize(self)

    finalize the MPI library

    Arguments

    Type IntentOptional Attributes Name
    class(pic_comm_type), intent(inout) :: self

procedure, public :: init => pic_comm_init

  • private subroutine pic_comm_init(self)

    initilalize the MPI library and get the size and rank variables

    Arguments

    Type IntentOptional Attributes Name
    class(pic_comm_type), intent(inout) :: self

Source Code

   type :: pic_comm_type
    !! custom data type that holds the MPI communicators

      private

      type(MPI_COMM), public :: comm
        !! use the MPI_COMM from the mpi_f08 module interface
      integer(int32), public :: m_rank
        !! MPI rank
      integer(int32), public :: m_size
        !! MPI size
      integer(int32), public :: m_ierr
   contains
      procedure :: init => pic_comm_init
      procedure :: finalize => pic_comm_finalize
   end type pic_comm_type