Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
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.
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.
Source Code
subroutine sort_and_transfer_buffers(mg,dsize)use mpitype(mg_t),intent(inout)::mginteger,intent(in)::dsizeinteger::i,n_send,n_recvinteger::send_req(mg%n_cpu)integer::recv_req(mg%n_cpu)integer::ierrn_send=0n_recv=0do i=0,mg%n_cpu-1if(mg%buf(i)%i_send>0)thenn_send=n_send+1call sort_sendbuf(mg%buf(i),dsize)call mpi_isend_wrapper(mg%buf(i)%send,mg%buf(i)%i_send,MPI_DOUBLE,i,0,&mg%comm,send_req(n_send),ierr)end if if(mg%buf(i)%i_recv>0)thenn_recv=n_recv+1call mpi_irecv_wrapper(mg%buf(i)%recv,mg%buf(i)%i_recv,MPI_DOUBLE,i,0,&mg%comm,recv_req(n_recv),ierr)end if end do call mpi_waitall(n_recv,recv_req(1:n_recv),MPI_STATUSES_IGNORE,ierr)call mpi_waitall(n_send,send_req(1:n_send),MPI_STATUSES_IGNORE,ierr)end subroutine sort_and_transfer_buffers