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 write_forest(file_handle)use mod_forestuse mod_global_parametersinteger,intent(in)::file_handleinteger,dimension(MPI_STATUS_SIZE)::statusinteger::ig1,ig2,ig3,isfclogical::leafbuf(nleafbuf)integer::nbufferednbuffered=0do isfc=1,nglev1ig1=sfc_iglevel1(1,isfc)ig2=sfc_iglevel1(2,isfc)ig3=sfc_iglevel1(3,isfc)call write_node(tree_root(ig1,ig2,ig3))end do call flush_leafbufcontains recursive subroutine write_node(tree)implicit none type(tree_node_ptr)::treeinteger::ic1,ic2,ic3if(nbuffered==nleafbuf)call flush_leafbufnbuffered=nbuffered+1leafbuf(nbuffered)=tree%node%leafif(.not.tree%node%leaf)then do ic3=1,2do ic2=1,2do ic1=1,2call write_node(tree%node%child(ic1,ic2,ic3))end do end do end do end if end subroutine write_nodesubroutine flush_leafbufimplicit none if(nbuffered==0)return call MPI_FILE_WRITE(file_handle,leafbuf,nbuffered,MPI_LOGICAL,status,&ierrmpi)nbuffered=0end subroutine flush_leafbufend subroutine write_forest