Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Source Code
subroutine test_handoff_to_waiting_ranks(this)class(MpiTestMethod),intent(inout)::thistype(MpiMutex)::mutexinteger::comm,npes,rank,statusinteger::wininteger,target::counterreal(kind=kind(0.d0))::t0comm=this%getMpiCommunicator()npes=this%getNumProcesses()rank=this%getProcessRank()call create_counter(comm,counter,win)mutex=MpiMutex(comm,rc=status)@assertEqual(0,status)if(rank==0)then call mutex%acquire(rc=status)@assertEqual(0,status)end if call MPI_Barrier(comm,status)@assertEqual(0,status)if(rank==0)then! Give the other ranks time to register as waiters.t0=MPI_Wtime()do while(MPI_Wtime()-t0<0.2d0)end do else call mutex%acquire(rc=status)@assertEqual(0,status)end if call increment_counter(win)call mutex%release(rc=status)@assertEqual(0,status)call MPI_Barrier(comm,status)@assertEqual(0,status)if(rank==0)then@assertEqual(npes,read_counter(win))end if call mutex%free_mpi_resources(rc=status)@assertEqual(0,status)call MPI_Win_free(win,status)end subroutine test_handoff_to_waiting_ranks