create_win_allocate_dp_2d Subroutine

private subroutine create_win_allocate_dp_2d(comm, dim1, dim2, baseptr, win)

Uses

  • proc~~create_win_allocate_dp_2d~2~~UsesGraph proc~create_win_allocate_dp_2d~2 create_win_allocate_dp_2d iso_c_binding iso_c_binding proc~create_win_allocate_dp_2d~2->iso_c_binding

Arguments

Type IntentOptional Attributes Name
type(comm_t), intent(in) :: comm
integer(kind=int32), intent(in) :: dim1
integer(kind=int32), intent(in) :: dim2
real(kind=dp), intent(out), pointer :: baseptr(:,:)
type(win_t), intent(out) :: win

Called by

proc~~create_win_allocate_dp_2d~2~~CalledByGraph proc~create_win_allocate_dp_2d~2 create_win_allocate_dp_2d interface~win_allocate~2 win_allocate interface~win_allocate~2->proc~create_win_allocate_dp_2d~2

Variables

Type Visibility Attributes Name Initial
type(c_ptr), private :: cptr
integer(kind=int32), private :: disp_unit
integer(kind=int32), private :: ierr
integer(kind=int32), private :: total_size
integer(kind=MPI_ADDRESS_KIND), private :: win_size

Source Code

   subroutine create_win_allocate_dp_2d(comm, dim1, dim2, baseptr, win)
      use iso_c_binding, only: c_ptr, c_f_pointer
      type(comm_t), intent(in) :: comm
      integer(int32), intent(in) :: dim1, dim2
      real(dp), pointer, intent(out) :: baseptr(:, :)
      type(win_t), intent(out) :: win
      type(c_ptr) :: cptr
      integer(MPI_ADDRESS_KIND) :: win_size
      integer(int32) :: disp_unit, ierr, total_size

      ! A single rank has no peer. Reaching this means the caller
      ! did not take its `size() == 1` path -- which is a bug worth
      ! stopping for, not one to hide by returning quietly.
      error stop "pic_mpi_serial: create_win_allocate_dp_2d needs a peer rank"
   end subroutine create_win_allocate_dp_2d