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.
Source Code
subroutine TimestepControluse basicmoduse mpimodimplicit nonereal(8)::dtl1real(8)::dtl2real(8)::dtl3real(8)::dtlocalreal(8)::dtmininteger::theidreal(8)::ctotinteger::i,j,kdtmin=1.0d90!$omp target teams distribute parallel do collapse(3) defaultmap(tofrom:scalar) reduction(min:dtmin)do k=ks,kedo j=js,jedo i=is,iectot=sqrt(cs(i,j,k)**2&&+(b1(i,j,k)**2&&+b2(i,j,k)**2&&+b3(i,j,k)**2&&)/d(i,j,k))dtl1=(x1a(i+1)-x1a(i))/(abs(v1(i,j,k))+ctot)dtl2=(x2a(j+1)-x2a(j))/(abs(v2(i,j,k))+ctot)dtl3=(x3a(k+1)-x3a(k))/(abs(v3(i,j,k))+ctot)dtlocal=min(dtl1,dtl2,dtl3)dtmin=min(dtmin,dtlocal)enddo enddo enddo!$omp end target teams distribute parallel do!$omp target update from(dtmin)bufinpmin(1)=dtminbufinpmin(2)=dble(myid_w)call MPIminfinddtmin=bufoutmin(1)theid=int(bufoutmin(2))dt=0.05d0*dtmin!$omp target update to(dt)returnend subroutine TimestepControl