19 SUBROUTINE para_range (N1,N2,NPROCS,IRANK,ISTA,IEND)
22 integer,
intent(in) :: n1,n2,nprocs,irank
23 integer,
intent(out) :: ista,iend
24 integer iwork1, iwork2
26 iwork1 = ( n2 - n1 + 1 ) / nprocs
27 iwork2 = mod( n2 - n1 + 1, nprocs )
28 ista = irank * iwork1 + n1 + min( irank, iwork2 )
29 iend = ista + iwork1 - 1
30 if ( iwork2 > irank ) iend = iend + 1