85 PURE SUBROUTINE create_group_dist_d1_i1(this, ngroups, dimen)
87 INTEGER,
INTENT(IN) :: ngroups, dimen
90 INTEGER,
DIMENSION(2) :: itmp
92 ALLOCATE (this%starts(0:ngroups - 1))
94 ALLOCATE (this%ends(0:ngroups - 1))
96 ALLOCATE (this%sizes(0:ngroups - 1))
99 DO iproc = 0, ngroups - 1
101 this%starts(iproc) = itmp(1)
102 this%ends(iproc) = itmp(2)
103 this%sizes(iproc) = itmp(2) - itmp(1) + 1
134 SUBROUTINE create_group_dist_d1_i3(this, starts, ends, sizes, comm)
136 INTEGER,
INTENT(IN) :: starts, ends, sizes
140 CHARACTER(LEN=*),
PARAMETER :: routineN =
'create_group_dist_d1_i3'
144 CALL timeset(routinen, handle)
146 ALLOCATE (this%starts(0:comm%num_pe - 1))
147 ALLOCATE (this%ends(0:comm%num_pe - 1))
148 ALLOCATE (this%sizes(0:comm%num_pe - 1))
150 CALL comm%allgather(starts, this%starts)
151 CALL comm%allgather(ends, this%ends)
152 CALL comm%allgather(sizes, this%sizes)
154 CALL timestop(handle)
164 SUBROUTINE create_group_dist_d1_gd(this, group_dist_ext, comm)
170 CHARACTER(LEN=*),
PARAMETER :: routineN =
'create_group_dist_d1_gd'
174 CALL timeset(routinen, handle)
176 ALLOCATE (this%starts(0:comm%num_pe - 1))
177 ALLOCATE (this%ends(0:comm%num_pe - 1))
178 ALLOCATE (this%sizes(0:comm%num_pe - 1))
180 CALL comm%allgather(group_dist_ext%starts, this%starts)
181 CALL comm%allgather(group_dist_ext%ends, this%ends)
182 CALL comm%allgather(group_dist_ext%sizes, this%sizes)
184 CALL timestop(handle)
214 PURE SUBROUTINE get_group_dist_d1(this, pos, starts, ends, sizes, group_dist_ext)
216 INTEGER,
INTENT(IN) :: pos
217 INTEGER,
INTENT(OUT),
OPTIONAL :: starts, ends, sizes
220 IF (
PRESENT(starts)) starts = this%starts(pos)
221 IF (
PRESENT(ends)) ends = this%ends(pos)
222 IF (
PRESENT(sizes)) sizes = this%sizes(pos)
224 IF (
PRESENT(group_dist_ext))
THEN
225 group_dist_ext%starts = this%starts(pos)
226 group_dist_ext%ends = this%ends(pos)
227 group_dist_ext%sizes = this%sizes(pos)
239 PURE SUBROUTINE get_group_dist_gd1(this, pos, group_dist_ext, pos_ext)
241 INTEGER,
INTENT(IN) :: pos
243 INTEGER,
INTENT(IN) :: pos_ext
245 group_dist_ext%starts(pos_ext) = this%starts(pos)
246 group_dist_ext%ends(pos_ext) = this%ends(pos)
247 group_dist_ext%sizes(pos_ext) = this%sizes(pos)
pure integer function, dimension(2), public get_limit(m, n, me)
divide m entries into n parts, return size of part me