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 restrict_set_buffer(mg,id,iv)type(mg_t),intent(inout)::mginteger,intent(in)::idinteger,intent(in)::ivinteger::i,j,n,hnc,p_id,p_rankreal(dp)::tmp(mg%box_size/2,mg%box_size/2)hnc=mg%box_size/2p_id=mg%boxes(id)%parentp_rank=mg%boxes(p_id)%rankif(p_rank/=mg%my_rank)then do j=1,hncdo i=1,hnctmp(i,j)=0.25_dp*sum(mg%boxes(id)%cc(2*i-1:2*i,2*j-1:2*j,&iv))end do end do! Buffern=size(tmp)i=mg%buf(p_rank)%i_sendmg%buf(p_rank)%send(i+1:i+n)=pack(tmp,.true.)mg%buf(p_rank)%i_send=mg%buf(p_rank)%i_send+n! To later sort the send buffer according to parent orderi=mg%buf(p_rank)%i_ixn=mg_ix_to_ichild(mg%boxes(id)%ix)mg%buf(p_rank)%ix(i+1)=mg_num_children*p_id+nmg%buf(p_rank)%i_ix=mg%buf(p_rank)%i_ix+1end if end subroutine restrict_set_buffer