23 integer,
intent(in) :: n1,n2,nprocs,irank
24 integer,
intent(out) :: ista,iend
25 integer iwork1, iwork2
27 iwork1 = ( n2 - n1 + 1 ) / nprocs
28 iwork2 = mod( n2 - n1 + 1, nprocs )
29 ista = irank * iwork1 + n1 + min( irank, iwork2 )
30 iend = ista + iwork1 - 1
31 if ( iwork2 > irank ) iend = iend + 1
46 subroutine para_range2(im,jm,nx,ny,nrank,ista,iend,jsta,jend)
49 integer,
intent(in) :: im,jm,nx,ny,nrank
50 integer,
intent(out) :: ista,iend,jsta,jend
subroutine para_range(n1, n2, nprocs, irank, ista, iend)
Sets up decomposition values.