win_lock Subroutine

private subroutine win_lock(this, rank, lock_type)

Type Bound

win_t

Arguments

Type IntentOptional Attributes Name
class(win_t), intent(in) :: this
integer(kind=int32), intent(in) :: rank
integer(kind=int32), intent(in), optional :: lock_type

Calls

proc~~win_lock~~CallsGraph proc~win_lock win_t%win_lock mpi_win_lock mpi_win_lock proc~win_lock->mpi_win_lock

Variables

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

Source Code

   subroutine win_lock(this, rank, lock_type)
      class(win_t), intent(in) :: this
      integer(int32), intent(in) :: rank
      integer(int32), intent(in), optional :: lock_type
      integer(int32) :: ierr, ltype

      if (present(lock_type)) then
         ltype = lock_type
      else
         ltype = MPI_LOCK_SHARED
      end if

      call MPI_Win_lock(ltype, rank, 0_int32, this%m_win, ierr)
   end subroutine win_lock