pic_comm_init Subroutine

private subroutine pic_comm_init(self)

initilalize the MPI library and get the size and rank variables

Type Bound

pic_comm_type

Arguments

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

Calls

proc~~pic_comm_init~~CallsGraph proc~pic_comm_init pic_comm_type%pic_comm_init mpi_comm_rank mpi_comm_rank proc~pic_comm_init->mpi_comm_rank mpi_comm_size mpi_comm_size proc~pic_comm_init->mpi_comm_size mpi_init mpi_init proc~pic_comm_init->mpi_init

Variables

Type Visibility Attributes Name Initial
integer(kind=int32), private :: ierr
integer(kind=int32), private :: rank
integer(kind=int32), private :: size

Source Code

   subroutine pic_comm_init(self)
    !! initilalize the MPI library and get the size and rank variables
      class(pic_comm_type), intent(inout) :: self
      integer(int32) :: ierr, rank, size
      call MPI_Init(ierr)
      self%m_ierr = ierr
      self%comm = MPI_COMM_WORLD
      call MPI_Comm_size(self%comm, size, ierr)
      call MPI_Comm_rank(self%comm, rank, ierr)
      self%m_size = size
      self%m_rank = rank
   end subroutine pic_comm_init