91 & KMP_TYPE,KCOMM,KERROR,KREQUEST,CDSTRING)
94 #ifdef USE_8_BYTE_WORDS 96 mpi_comm_size => mpi_comm_size8, mpi_allgatherv => mpi_allgatherv8
101 REAL(KIND=JPRM) :: PSENDBUF(:)
102 REAL(KIND=JPRM) :: PRECVBUF(:)
103 INTEGER(KIND=JPIM),
INTENT(IN) :: KRECVCOUNTS(:)
104 INTEGER(KIND=JPIM),
INTENT(IN),
OPTIONAL :: KRECVDISPL(:),KCOMM,KMP_TYPE
105 INTEGER(KIND=JPIM),
INTENT(OUT),
OPTIONAL :: KERROR,KREQUEST
106 CHARACTER*(*),
INTENT(IN),
OPTIONAL :: CDSTRING
108 INTEGER(KIND=JPIM) :: IR,ISENDCOUNT,IRECVCOUNT
109 INTEGER(KIND=JPIM) :: IMP_TYPE
110 INTEGER(KIND=JPIM) :: ICOMM,IERROR,IPL_NUMPROC
111 INTEGER(KIND=JPIM) :: ITID
112 INTEGER(KIND=JPIM),
ALLOCATABLE :: IRECVDISPL(:)
114 itid = oml_my_thread()
115 isendcount =
SIZE(psendbuf)
116 isendcount = max(0,isendcount)
117 irecvcount =
SIZE(precvbuf)
120 IF(
PRESENT(kcomm))
THEN 129 CALL mpi_comm_size(icomm,ipl_numproc,ierror)
132 ALLOCATE(irecvdispl(ipl_numproc))
133 IF(
PRESENT(krecvdispl))
THEN 134 irecvdispl(:) = krecvdispl(:)
138 irecvdispl(ir) = irecvdispl(ir-1) + krecvcounts(ir-1)
141 IF(
PRESENT(kmp_type))
THEN 147 IF(.NOT.
PRESENT(krequest))
CALL mpl_message(cdmessage=
'MPL_ALLGATHERV: KREQUEST MISSING',ldabort=
llabort)
153 CALL mpi_allgatherv(psendbuf(1),isendcount,int(mpi_real4),precvbuf(1),&
154 & krecvcounts,irecvdispl,int(mpi_real4),icomm,ierror)
156 CALL mpi_iallgatherv(psendbuf(1),isendcount,int(mpi_real4),precvbuf(1),&
157 & krecvcounts,irecvdispl,int(mpi_real4),icomm,krequest,ierror)
165 WRITE(
mpl_unit,
'(A,5I8)')
' MPL_ALLGATHERV ',isendcount,irecvcount,icomm
167 IF(
PRESENT(kerror))
THEN 170 IF(ierror /= 0 )
CALL mpl_message(ierror,
'MPL_ALLGATHERV',&
173 DEALLOCATE(irecvdispl)
178 & KMP_TYPE,KCOMM,KERROR,KREQUEST,CDSTRING)
181 #ifdef USE_8_BYTE_WORDS 183 mpi_comm_size => mpi_comm_size8, mpi_allgatherv => mpi_allgatherv8
188 REAL(KIND=JPRD) :: PSENDBUF(:)
189 REAL(KIND=JPRD) :: PRECVBUF(:)
190 INTEGER(KIND=JPIM),
INTENT(IN) :: KRECVCOUNTS(:)
191 INTEGER(KIND=JPIM),
INTENT(IN),
OPTIONAL :: KRECVDISPL(:),KCOMM,KMP_TYPE
192 INTEGER(KIND=JPIM),
INTENT(OUT),
OPTIONAL :: KERROR,KREQUEST
193 CHARACTER*(*),
INTENT(IN),
OPTIONAL :: CDSTRING
195 INTEGER(KIND=JPIM) :: IR,ISENDCOUNT,IRECVCOUNT
196 INTEGER(KIND=JPIM) :: IMP_TYPE
197 INTEGER(KIND=JPIM) :: ICOMM,IERROR,IPL_NUMPROC
198 INTEGER(KIND=JPIM) :: ITID,J
199 INTEGER(KIND=JPIM),
ALLOCATABLE :: IRECVDISPL(:)
200 itid = oml_my_thread()
201 isendcount =
SIZE(psendbuf)
202 isendcount = max(0,isendcount)
203 irecvcount =
SIZE(precvbuf)
206 IF(
PRESENT(kcomm))
THEN 215 CALL mpi_comm_size(icomm,ipl_numproc,ierror)
218 ALLOCATE(irecvdispl(ipl_numproc))
219 IF(
PRESENT(krecvdispl))
THEN 220 DO j=1,min(
SIZE(irecvdispl),
SIZE(krecvdispl))
221 irecvdispl(j) = krecvdispl(j)
226 irecvdispl(ir) = irecvdispl(ir-1) + krecvcounts(ir-1)
229 IF(
PRESENT(kmp_type))
THEN 235 IF(.NOT.
PRESENT(krequest))
CALL mpl_message(cdmessage=
'MPL_ALLGATHERV: KREQUEST MISSING',ldabort=
llabort)
242 CALL mpi_allgatherv(psendbuf(1),isendcount,int(mpi_real8),precvbuf(1),&
243 & krecvcounts,irecvdispl,int(mpi_real8),icomm,ierror)
245 CALL mpi_iallgatherv(psendbuf(1),isendcount,int(mpi_real8),precvbuf(1),&
246 & krecvcounts,irecvdispl,int(mpi_real8),icomm,krequest,ierror)
255 WRITE(
mpl_unit,
'(A,5I8)')
' MPL_ALLGATHERV ',isendcount,irecvcount,icomm
257 IF(
PRESENT(kerror))
THEN 260 IF(ierror /= 0 )
CALL mpl_message(ierror,
'MPL_ALLGATHERV',cdstring,&
263 DEALLOCATE(irecvdispl)
268 & KMP_TYPE,KCOMM,KERROR,KREQUEST,CDSTRING)
271 #ifdef USE_8_BYTE_WORDS 273 mpi_comm_size => mpi_comm_size8, mpi_allgatherv => mpi_allgatherv8
278 INTEGER(KIND=JPIM) :: KSENDBUF(:)
279 INTEGER(KIND=JPIM) :: KRECVBUF(:)
280 INTEGER(KIND=JPIM),
INTENT(IN) :: KRECVCOUNTS(:)
281 INTEGER(KIND=JPIM),
INTENT(IN),
OPTIONAL :: KRECVDISPL(:),KCOMM,KMP_TYPE
282 INTEGER(KIND=JPIM),
INTENT(OUT),
OPTIONAL :: KERROR,KREQUEST
283 CHARACTER*(*),
INTENT(IN),
OPTIONAL :: CDSTRING
285 INTEGER(KIND=JPIM) :: IR,ISENDCOUNT,IRECVCOUNT
286 INTEGER(KIND=JPIM) :: IMP_TYPE
287 INTEGER(KIND=JPIM) :: ICOMM,IERROR,IPL_NUMPROC
288 INTEGER(KIND=JPIM) :: ITID
289 INTEGER(KIND=JPIM),
ALLOCATABLE :: IRECVDISPL(:)
290 itid = oml_my_thread()
291 isendcount =
SIZE(ksendbuf)
292 isendcount = max(0,isendcount)
293 irecvcount =
SIZE(krecvbuf)
296 IF(
PRESENT(kcomm))
THEN 305 CALL mpi_comm_size(icomm,ipl_numproc,ierror)
308 ALLOCATE(irecvdispl(ipl_numproc))
309 IF(
PRESENT(krecvdispl))
THEN 310 irecvdispl(:) = krecvdispl(:)
314 irecvdispl(ir) = irecvdispl(ir-1) + krecvcounts(ir-1)
317 IF(
PRESENT(kmp_type))
THEN 323 IF(.NOT.
PRESENT(krequest))
CALL mpl_message(cdmessage=
'MPL_ALLGATHERV: KREQUEST MISSING',ldabort=
llabort)
329 CALL mpi_allgatherv(ksendbuf(1),isendcount,int(mpi_integer),krecvbuf(1),&
330 & krecvcounts,irecvdispl,int(mpi_integer),icomm,ierror)
332 CALL mpi_iallgatherv(ksendbuf(1),isendcount,int(mpi_integer),krecvbuf(1),&
333 & krecvcounts,irecvdispl,int(mpi_integer),icomm,krequest,ierror)
342 WRITE(
mpl_unit,
'(A,5I8)')
' MPL_ALLGATHERV ',isendcount,irecvcount,icomm
344 IF(
PRESENT(kerror))
THEN 349 DEALLOCATE(irecvdispl)
354 & KMP_TYPE,KCOMM,KERROR,KREQUEST,CDSTRING)
357 #ifdef USE_8_BYTE_WORDS 359 mpi_comm_size => mpi_comm_size8, mpi_allgatherv => mpi_allgatherv8
364 INTEGER(KIND=JPIM) :: KSENDBUF
365 INTEGER(KIND=JPIM) :: KRECVBUF(:)
366 INTEGER(KIND=JPIM),
INTENT(IN),
OPTIONAL :: KRECVCOUNTS(:)
367 INTEGER(KIND=JPIM),
INTENT(IN),
OPTIONAL :: KRECVDISPL(:),KCOMM,KMP_TYPE
368 INTEGER(KIND=JPIM),
INTENT(OUT),
OPTIONAL :: KERROR,KREQUEST
369 CHARACTER*(*),
INTENT(IN),
OPTIONAL :: CDSTRING
371 INTEGER(KIND=JPIM) :: IR,ISENDCOUNT,IRECVCOUNT
372 INTEGER(KIND=JPIM) :: IMP_TYPE
374 INTEGER(KIND=JPIM) :: ICOMM,IERROR,IPL_NUMPROC
375 INTEGER(KIND=JPIM) :: ITID
376 INTEGER(KIND=JPIM),
ALLOCATABLE :: IRECVDISPL(:)
377 itid = oml_my_thread()
379 irecvcount =
SIZE(krecvbuf)
383 IF(
PRESENT(kcomm))
THEN 392 CALL mpi_comm_size(icomm,ipl_numproc,ierror)
395 ALLOCATE(irecvdispl(ipl_numproc))
396 IF(
PRESENT(krecvdispl))
THEN 397 irecvdispl(:) = krecvdispl(:)
401 irecvdispl(ir) = irecvdispl(ir-1) + irecvcounts(ir-1)
404 IF(
PRESENT(kmp_type))
THEN 410 IF(.NOT.
PRESENT(krequest))
CALL mpl_message(cdmessage=
'MPL_ALLGATHERV: KREQUEST MISSING',ldabort=
llabort)
415 CALL mpi_allgatherv(ksendbuf,isendcount,int(mpi_integer),krecvbuf(1),irecvcounts,&
416 & irecvdispl,int(mpi_integer),icomm,ierror)
418 CALL mpi_iallgatherv(ksendbuf,isendcount,int(mpi_integer),krecvbuf(1),irecvcounts,&
419 & irecvdispl,int(mpi_integer),icomm,krequest,ierror)
427 WRITE(
mpl_unit,
'(A,5I8)')
' MPL_ALLGATHERV ',isendcount,irecvcount,icomm
429 IF(
PRESENT(kerror))
THEN 434 DEALLOCATE(irecvdispl)
subroutine, public mpl_message(KERROR, CDMESSAGE, CDSTRING, LDABORT)
integer(kind=jpim), parameter jp_blocking_buffered
subroutine, public mpl_recvstats(ICOUNT, ITYPE)
integer(kind=jpim) mpl_numproc
integer(kind=jpim), parameter jp_non_blocking_standard
integer(kind=jpim), dimension(:), allocatable mpl_comm_oml
integer(kind=jpim), parameter jp_blocking_standard
subroutine, public mpl_sendstats(ICOUNT, ITYPE)
subroutine mpl_allgatherv_real8(PSENDBUF, PRECVBUF, KRECVCOUNTS, KRECVDISPL, KMP_TYPE, KCOMM, KERROR, KREQUEST, CDSTRING)
integer(kind=jpim), parameter jp_non_blocking_buffered
subroutine mpl_allgatherv_int_scalar(KSENDBUF, KRECVBUF, KRECVCOUNTS, KRECVDISPL, KMP_TYPE, KCOMM, KERROR, KREQUEST, CDSTRING)
intent(out) overrides sub arrays one Sort by the least significant key first sum(iindex(1:n))
integer(kind=jpim) mpl_method
subroutine mpl_allgatherv_real4(PSENDBUF, PRECVBUF, KRECVCOUNTS, KRECVDISPL, KMP_TYPE, KCOMM, KERROR, KREQUEST, CDSTRING)
integer(kind=jpim) mpl_unit
subroutine mpl_allgatherv_int(KSENDBUF, KRECVBUF, KRECVCOUNTS, KRECVDISPL, KMP_TYPE, KCOMM, KERROR, KREQUEST, CDSTRING)
integer(kind=jpim) mpl_output