146 integer,
intent(in) :: lbuf
147 integer,
intent(out),
dimension(:) :: gbuf
148 integer,
optional,
intent(in) :: idebug
151 integer :: sendtype,recvtype,sendcnt,recvcnt,ierr,lidebug,mpierr
153 if (.not.
present(idebug))
then 159 recvtype = mpi_integer
165 CALL mpi_allgather(lbuf,sendcnt,sendtype, &
166 gbuf,recvcnt,recvtype,mpi_comm_world, ierr)
175 double precision,
intent(in) :: lbuf
176 double precision,
intent(out),
dimension(:) :: gbuf
177 integer,
optional,
intent(in) :: idebug
180 integer :: sendtype,recvtype,sendcnt,recvcnt,ierr,lidebug,mpierr
182 if (.not.
present(idebug))
then 188 recvtype = mpi_double_precision
189 sendtype = mpi_double_precision
194 CALL mpi_allgather(lbuf,sendcnt,sendtype, &
195 gbuf,recvcnt,recvtype,mpi_comm_world, ierr)
203 subroutine gatherv_1i( lbuf, sendcnt, gbuf, rcount, disp, mroot, idebug )
204 integer,
intent(in),
dimension(:) :: lbuf
205 integer,
intent(in),
dimension(:) :: rcount
206 integer,
intent(in),
dimension(:) :: disp
207 integer,
intent(out),
dimension(:) :: gbuf
208 integer,
optional,
intent(in) :: mroot, idebug
209 integer :: sendtype,recvtype,sendcnt,recvcnt,lroot,ierr,lidebug
214 if (.not.
present(mroot))
then 220 if (.not.
present(idebug))
then 226 recvtype = mpi_integer
227 sendtype = mpi_integer
229 CALL mpi_gatherv(lbuf,sendcnt,sendtype, &
230 gbuf,rcount,disp,recvtype, &
231 lroot,mpi_comm_world, ierr)
239 subroutine gatherv_1d( lbuf, sendcnt, gbuf, rcount, disp, mroot, idebug )
240 double precision,
intent(in),
dimension(:) :: lbuf
241 integer,
intent(in),
dimension(:) :: rcount
242 integer,
intent(in),
dimension(:) :: disp
243 double precision,
intent(out),
dimension(:) :: gbuf
244 integer,
optional,
intent(in) :: mroot, idebug
245 integer :: sendtype,recvtype,sendcnt,recvcnt,lroot,ierr,lidebug
250 if (.not.
present(mroot))
then 256 if (.not.
present(idebug))
then 262 recvtype = mpi_double_precision
263 sendtype = mpi_double_precision
265 CALL mpi_gatherv(lbuf,sendcnt,sendtype, &
266 gbuf,rcount,disp,recvtype, &
267 lroot,mpi_comm_world, ierr)
282 subroutine scatter_1i( lbuf, gbuf, mroot, idebug )
288 integer,
intent(in),
dimension(:) :: gbuf
289 integer,
intent(out),
dimension(:) :: lbuf
290 integer,
optional,
intent(in) :: mroot, idebug
292 integer,
allocatable,
dimension(:) :: gbuf_pack
294 integer :: sendtype, recvtype, ijk1, ijk2, recvcnt, ierr,lroot, lidebug
295 integer :: i,j,k,ibuffer,iproc, ioffset
301 if (.not.
present(mroot))
then 307 if (.not.
present(idebug))
then 313 if(
mype.eq.lroot)
then 316 allocate(gbuf_pack(10))
319 if(
mype.eq.lroot)
then 327 ibuffer = funijk_proc(i,j,k,iproc) + ioffset
328 gbuf_pack(ibuffer) = gbuf(funijk_gl(i,j,k))
337 sendtype = mpi_integer
343 recvcnt = ijk2-ijk1+1
348 lbuf, recvcnt, recvtype, &
349 lroot, mpi_comm_world, ierr )
350 call mpi_check(
'scatter_1i:MPI_Scatterv', ierr )
352 deallocate(gbuf_pack)
360 subroutine scatter_2i( lbuf, gbuf, mroot, idebug )
361 integer,
intent(in),
dimension(:,:) :: gbuf
362 integer,
intent(out),
dimension(:,:) :: lbuf
363 integer,
optional,
intent(in) :: mroot, idebug
366 integer :: i,j,lroot, lidebug
368 if (.not.
present(mroot))
then 374 if (.not.
present(idebug))
then 380 if(
mype.eq.lroot)
then 381 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
382 .ne.
'** scatter_2i: size(lbuf,2)size(gbuf,2) ', &
383 size(lbuf,2),
size(gbuf,2) )
386 do j=lbound(lbuf,2),ubound(lbuf,2)
387 call scatter_1i( lbuf(:,j), gbuf(:,j), lroot, lidebug )
396 subroutine scatter_3i( lbuf, gbuf, mroot, idebug )
397 integer,
intent(in),
dimension(:,:,:) :: gbuf
398 integer,
intent(out),
dimension(:,:,:) :: lbuf
399 integer,
optional,
intent(in) :: mroot, idebug
402 integer :: j,k,lroot, lidebug
404 if (.not.
present(mroot))
then 410 if (.not.
present(idebug))
then 416 if(
mype.eq.lroot)
then 417 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
418 .ne.
'** scatter_3i: size(lbuf,2)size(gbuf,2) ', &
419 size(lbuf,2),
size(gbuf,2) )
421 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
422 .ne.
'** scatter_3i: size(lbuf,3)size(gbuf,3) ', &
423 size(lbuf,3),
size(gbuf,3) )
426 do k=lbound(lbuf,3),ubound(lbuf,3)
427 do j=lbound(lbuf,2),ubound(lbuf,2)
428 call scatter_1i( lbuf(:,j,k), gbuf(:,j,k), lroot, lidebug )
438 subroutine scatter_1r( lbuf, gbuf, mroot, idebug )
444 real,
intent(in),
dimension(:) :: gbuf
445 real,
intent(out),
dimension(:) :: lbuf
446 integer,
optional,
intent(in) :: mroot, idebug
449 real,
allocatable,
dimension(:) :: gbuf_pack
451 integer :: sendtype, recvtype, ijk1, ijk2, recvcnt, ierr,lroot, lidebug
452 integer :: i,j,k,ibuffer,iproc, ioffset
455 if (.not.
present(mroot))
then 461 if (.not.
present(idebug))
then 467 if(
mype.eq.lroot)
then 470 allocate(gbuf_pack(10))
473 if(
mype.eq.lroot)
then 481 ibuffer = funijk_proc(i,j,k,iproc) + ioffset
482 gbuf_pack(ibuffer) = gbuf(funijk_gl(i,j,k))
497 recvcnt = ijk2-ijk1+1
500 lbuf, recvcnt, recvtype, &
501 lroot, mpi_comm_world, ierr )
502 call mpi_check(
'scatter_1r:MPI_Scatterv', ierr )
504 deallocate(gbuf_pack)
513 subroutine scatter_2r( lbuf, gbuf, mroot, idebug )
514 real,
intent(in),
dimension(:,:) :: gbuf
515 real,
intent(out),
dimension(:,:) :: lbuf
516 integer,
optional,
intent(in) :: mroot, idebug
519 integer :: i,j,lroot, lidebug
521 if (.not.
present(mroot))
then 527 if (.not.
present(idebug))
then 533 if(
mype.eq.lroot)
then 534 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
535 .ne.
'** scatter_2r: size(lbuf,2)size(gbuf,2) ', &
536 size(lbuf,2),
size(gbuf,2) )
539 do j=lbound(lbuf,2),ubound(lbuf,2)
540 call scatter_1r( lbuf(:,j), gbuf(:,j), lroot, lidebug )
549 subroutine scatter_3r( lbuf, gbuf, mroot, idebug )
550 real,
intent(in),
dimension(:,:,:) :: gbuf
551 real,
intent(out),
dimension(:,:,:) :: lbuf
552 integer,
optional,
intent(in) :: mroot, idebug
555 integer :: j,k,lroot, lidebug
557 if (.not.
present(mroot))
then 563 if (.not.
present(idebug))
then 569 if(
mype.eq.lroot)
then 570 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
571 .ne.
'** scatter_3r: size(lbuf,2)size(gbuf,2) ', &
572 size(lbuf,2),
size(gbuf,2) )
574 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
575 .ne.
'** scatter_3r: size(lbuf,3)size(gbuf,3) ', &
576 size(lbuf,3),
size(gbuf,3) )
579 do k=lbound(lbuf,3),ubound(lbuf,3)
580 do j=lbound(lbuf,2),ubound(lbuf,2)
581 call scatter_1r( lbuf(:,j,k), gbuf(:,j,k), lroot, lidebug )
592 subroutine scatter_1d( lbuf, gbuf, mroot, idebug )
597 double precision,
intent(in),
dimension(:) :: gbuf
598 double precision,
intent(out),
dimension(:) :: lbuf
599 integer,
optional,
intent(in) :: mroot, idebug
602 double precision,
allocatable,
dimension(:) :: gbuf_pack
604 integer :: sendtype, recvtype, ijk1,ijk2,recvcnt, ierr,lroot, lidebug
605 integer :: i,j,k,ibuffer,iproc, ioffset
608 if (.not.
present(mroot))
then 614 if (.not.
present(idebug))
then 620 if(
mype.eq.lroot)
then 623 allocate(gbuf_pack(10))
626 if(
mype.eq.lroot)
then 634 ibuffer = funijk_proc(i,j,k,iproc) + ioffset
635 gbuf_pack(ibuffer) = gbuf(funijk_gl(i,j,k))
644 sendtype = mpi_double_precision
650 recvcnt = ijk2-ijk1+1
653 lbuf, recvcnt, recvtype, &
654 lroot, mpi_comm_world, ierr )
655 call mpi_check(
'scatter_1d:MPI_Scatterv', ierr )
657 deallocate(gbuf_pack)
666 subroutine scatter_2d( lbuf, gbuf, mroot, idebug )
667 double precision,
intent(in),
dimension(:,:) :: gbuf
668 double precision,
intent(out),
dimension(:,:) :: lbuf
669 integer,
optional,
intent(in) :: mroot, idebug
672 integer :: i,j,lroot, lidebug
674 if (.not.
present(mroot))
then 680 if (.not.
present(idebug))
then 686 if(
mype.eq.lroot)
then 687 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
688 .ne.
'** scatter_2d: size(lbuf,2)size(gbuf,2) ', &
689 size(lbuf,2),
size(gbuf,2) )
692 do j=lbound(lbuf,2),ubound(lbuf,2)
693 call scatter_1d( lbuf(:,j), gbuf(:,j), lroot, lidebug )
702 subroutine scatter_3d( lbuf, gbuf, mroot, idebug )
703 double precision,
intent(in),
dimension(:,:,:) :: gbuf
704 double precision,
intent(out),
dimension(:,:,:) :: lbuf
705 integer,
optional,
intent(in) :: mroot, idebug
708 integer :: j,k,lroot, lidebug
710 if (.not.
present(mroot))
then 716 if (.not.
present(idebug))
then 722 if(
mype.eq.lroot)
then 723 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
724 .ne.
'** scatter_3d: size(lbuf,2)size(gbuf,2) ', &
725 size(lbuf,2),
size(gbuf,2) )
727 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
728 .ne.
'** scatter_3d: size(lbuf,3)size(gbuf,3) ', &
729 size(lbuf,3),
size(gbuf,3) )
732 do k=lbound(lbuf,3),ubound(lbuf,3)
733 do j=lbound(lbuf,2),ubound(lbuf,2)
734 call scatter_1d( lbuf(:,j,k), gbuf(:,j,k), lroot, lidebug )
744 subroutine scatter_1c( lbuf, gbuf, mroot, idebug )
749 character(len=*),
intent(in),
dimension(:) :: gbuf
750 character(len=*),
intent(out),
dimension(:) :: lbuf
751 integer,
optional,
intent(in) :: mroot, idebug
754 integer,
allocatable,
dimension(:,:) :: gbuf_pack,lbuf1
755 character(len=80) :: string
757 integer :: sendtype, recvtype, ijk1, ijk2, recvcnt, ierr,lroot, lidebug
758 integer :: i,j,k,ibuffer,iproc, ioffset
760 integer :: lenchar, icount
764 if (.not.
present(mroot))
then 770 if (.not.
present(idebug))
then 779 lenchar = len(gbuf(1))
781 if(
mype.eq.lroot)
then 782 allocate(gbuf_pack(
ijkmax3,lenchar))
784 allocate(gbuf_pack(10,lenchar))
787 allocate(lbuf1(ijk1:ijk2,lenchar))
789 if(
mype.eq.lroot)
then 793 string = gbuf(i)(1:lenchar)
794 gbuf_pack(i,j) = ichar(string(j:j))
805 lbuf(i)(j:j) = char(lbuf1(i,j))
810 deallocate(gbuf_pack)
820 subroutine scatter_1l( lbuf, gbuf, mroot, idebug )
825 logical,
intent(in),
dimension(:) :: gbuf
826 logical,
intent(out),
dimension(:) :: lbuf
827 integer,
optional,
intent(in) :: mroot, idebug
830 logical,
allocatable,
dimension(:) :: gbuf_pack
832 integer :: sendtype, recvtype, ijk1, ijk2, recvcnt, ierr,lroot, lidebug
833 integer :: i,j,k,ibuffer,iproc, ioffset
838 if (.not.
present(mroot))
then 844 if (.not.
present(idebug))
then 850 if(
mype.eq.lroot)
then 853 allocate(gbuf_pack(10))
856 if(
mype.eq.lroot)
then 864 ibuffer = funijk_proc(i,j,k,iproc) + ioffset
865 gbuf_pack(ibuffer) = gbuf(funijk_gl(i,j,k))
874 sendtype = mpi_logical
880 recvcnt = ijk2-ijk1+1
885 lbuf, recvcnt, recvtype, &
886 lroot, mpi_comm_world, ierr )
887 call mpi_check(
'scatter_1l:MPI_Scatterv', ierr )
889 deallocate(gbuf_pack)
902 subroutine gather_1i( lbuf, gbuf, mroot, idebug )
907 integer,
intent(in),
dimension(:) :: lbuf
908 integer,
intent(out),
dimension(:) :: gbuf
909 integer,
optional,
intent(in) :: mroot, idebug
912 integer,
allocatable,
dimension(:) :: gbuf_pack
914 integer :: recvtype, sendtype, ijk1,ijk2,sendcnt, ierr,lroot, lidebug
915 integer :: i,j,k,ibuffer,iproc, ioffset
916 integer :: ijk, ijk_gl
917 integer :: istartl, iendl, jstartl, jendl, kstartl, kendl
918 logical :: isok_k,isok_j,isok_i, isinterior
919 logical :: isbc_k,isbc_j,isbc_i, isboundary, need_copy
923 if (.not.
present(mroot))
then 929 if (.not.
present(idebug))
then 935 if(
mype.eq.lroot)
then 938 allocate(gbuf_pack(10))
941 recvtype = mpi_integer
948 sendcnt = ijk2-ijk1+1
950 call mpi_gatherv( lbuf, sendcnt, sendtype, &
952 lroot, mpi_comm_world, ierr )
953 call mpi_check(
'gather_1i:MPI_Gatherv', ierr )
955 if(
mype.eq.lroot)
then 977 ibuffer = funijk_proc(i,j,k,iproc) + ioffset
978 isok_k = (kstartl <= k) .and. (k <=kendl)
979 isok_j = (jstartl <= j) .and. (j <=jendl)
980 isok_i = (istartl <= i) .and. (i <=iendl)
982 need_copy = isok_k .and. isok_j .and. isok_i
985 ijk_gl = funijk_gl(i,j,k)
986 gbuf( ijk_gl ) = gbuf_pack(ibuffer)
996 deallocate(gbuf_pack)
1005 subroutine gather_2i( lbuf, gbuf, mroot, idebug )
1006 integer,
intent(in),
dimension(:,:) :: lbuf
1007 integer,
intent(out),
dimension(:,:) :: gbuf
1008 integer,
optional,
intent(in) :: mroot, idebug
1011 integer :: i,j,lroot, lidebug
1013 if (.not.
present(mroot))
then 1019 if (.not.
present(idebug))
then 1025 if(
mype.eq.lroot)
then 1026 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
1027 .ne.
'** gather_2i: size(lbuf,2)size(gbuf,2) ', &
1028 size(lbuf,2),
size(gbuf,2) )
1031 do j=lbound(lbuf,2),ubound(lbuf,2)
1032 call gather_1i( lbuf(:,j), gbuf(:,j), lroot, lidebug )
1041 subroutine gather_3i( lbuf, gbuf, mroot, idebug )
1042 integer,
intent(in),
dimension(:,:,:) :: lbuf
1043 integer,
intent(out),
dimension(:,:,:) :: gbuf
1044 integer,
optional,
intent(in) :: mroot, idebug
1047 integer :: j,k,lroot, lidebug
1049 if (.not.
present(mroot))
then 1055 if (.not.
present(idebug))
then 1061 if(
mype.eq.lroot)
then 1062 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
1063 .ne.
'** gather_3i: size(lbuf,2)size(gbuf,2) ', &
1064 size(lbuf,2),
size(gbuf,2) )
1066 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
1067 .ne.
'** gather_3i: size(lbuf,3)size(gbuf,3) ', &
1068 size(lbuf,3),
size(gbuf,3) )
1071 do k=lbound(lbuf,3),ubound(lbuf,3)
1072 do j=lbound(lbuf,2),ubound(lbuf,2)
1073 call gather_1i( lbuf(:,j,k), gbuf(:,j,k), lroot, lidebug )
1083 subroutine gather_1r( lbuf, gbuf, mroot, idebug )
1088 real,
intent(in),
dimension(:) :: lbuf
1089 real,
intent(out),
dimension(:) :: gbuf
1090 integer,
optional,
intent(in) :: mroot, idebug
1093 real,
allocatable,
dimension(:) :: gbuf_pack
1095 integer :: recvtype, sendtype, ijk1,ijk2,sendcnt, ierr,lroot, lidebug
1096 integer :: i,j,k,ibuffer,iproc, ioffset
1097 integer :: ijk, ijk_gl
1098 integer :: istartl, iendl, jstartl, jendl, kstartl, kendl
1099 logical :: isok_k,isok_j,isok_i, isinterior
1100 logical :: isbc_k,isbc_j,isbc_i, isboundary, need_copy
1102 if (.not.
present(mroot))
then 1108 if (.not.
present(idebug))
then 1114 if(
mype.eq.lroot)
then 1117 allocate(gbuf_pack(10))
1127 sendcnt = ijk2-ijk1+1
1129 call mpi_gatherv( lbuf, sendcnt, sendtype, &
1131 lroot, mpi_comm_world, ierr )
1132 call mpi_check(
'gather_1r:MPI_Gatherv', ierr )
1134 if(
mype.eq.lroot)
then 1156 ibuffer = funijk_proc(i,j,k,iproc) + ioffset
1157 isok_k = (kstartl <= k) .and. (k <=kendl)
1158 isok_j = (jstartl <= j) .and. (j <=jendl)
1159 isok_i = (istartl <= i) .and. (i <=iendl)
1161 need_copy = isok_k .and. isok_j .and. isok_i
1164 ijk_gl = funijk_gl(i,j,k)
1165 gbuf( ijk_gl ) = gbuf_pack(ibuffer)
1175 deallocate(gbuf_pack)
1183 subroutine gather_2r( lbuf, gbuf, mroot, idebug )
1184 real,
intent(in),
dimension(:,:) :: lbuf
1185 real,
intent(out),
dimension(:,:) :: gbuf
1186 integer,
optional,
intent(in) :: mroot, idebug
1189 integer :: i,j,lroot, lidebug
1191 if (.not.
present(mroot))
then 1197 if (.not.
present(idebug))
then 1203 if(
mype.eq.lroot)
then 1204 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
1205 .ne.
'** gather_2r: size(lbuf,2)size(gbuf,2) ', &
1206 size(lbuf,2),
size(gbuf,2) )
1209 do j=lbound(lbuf,2),ubound(lbuf,2)
1210 call gather_1r( lbuf(:,j), gbuf(:,j), lroot, lidebug )
1219 subroutine gather_3r( lbuf, gbuf, mroot, idebug )
1220 real,
intent(in),
dimension(:,:,:) :: lbuf
1221 real,
intent(out),
dimension(:,:,:) :: gbuf
1222 integer,
optional,
intent(in) :: mroot, idebug
1225 integer :: j,k,lroot, lidebug
1227 if (.not.
present(mroot))
then 1233 if (.not.
present(idebug))
then 1239 if(
mype.eq.lroot)
then 1240 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
1241 .ne.
'** gather_3r: size(lbuf,2)size(gbuf,2) ', &
1242 size(lbuf,2),
size(gbuf,2) )
1244 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
1245 .ne.
'** gather_3r: size(lbuf,3)size(gbuf,3) ', &
1246 size(lbuf,3),
size(gbuf,3) )
1249 do k=lbound(lbuf,3),ubound(lbuf,3)
1250 do j=lbound(lbuf,2),ubound(lbuf,2)
1251 call gather_1r( lbuf(:,j,k), gbuf(:,j,k), lroot, lidebug )
1262 subroutine gather_1d( lbuf, gbuf, mroot, idebug )
1267 double precision,
intent(in),
dimension(:) :: lbuf
1268 double precision,
intent(out),
dimension(:) :: gbuf
1269 integer,
optional,
intent(in) :: mroot, idebug
1272 double precision,
allocatable,
dimension(:) :: gbuf_pack
1274 integer :: recvtype, sendtype, ijk1,ijk2,sendcnt, ierr,lroot, lidebug
1275 integer :: i,j,k,ibuffer,iproc, ioffset
1276 integer :: ijk, ijk_gl
1277 logical :: isok_k,isok_j,isok_i, isinterior
1278 logical :: isbc_k,isbc_j,isbc_i, isboundary, need_copy
1279 integer :: istartl, iendl, jstartl, jendl, kstartl, kendl
1281 if (.not.
present(mroot))
then 1287 if (.not.
present(idebug))
then 1293 if(
mype.eq.lroot)
then 1296 allocate(gbuf_pack(10))
1299 recvtype = mpi_double_precision
1306 sendcnt = ijk2-ijk1+1
1308 call mpi_gatherv( lbuf, sendcnt, sendtype, &
1310 lroot, mpi_comm_world, ierr )
1311 call mpi_check(
'gather_1d:MPI_Gatherv', ierr )
1313 if(
mype.eq.lroot)
then 1335 ibuffer = funijk_proc(i,j,k,iproc) + ioffset
1336 isok_k = (kstartl <= k) .and. (k <=kendl)
1337 isok_j = (jstartl <= j) .and. (j <=jendl)
1338 isok_i = (istartl <= i) .and. (i <=iendl)
1340 need_copy = isok_k .and. isok_j .and. isok_i
1343 ijk_gl = funijk_gl(i,j,k)
1344 gbuf( ijk_gl ) = gbuf_pack(ibuffer)
1354 deallocate(gbuf_pack)
1362 subroutine gather_2d( lbuf, gbuf, mroot, idebug )
1363 double precision,
intent(in),
dimension(:,:) :: lbuf
1364 double precision,
intent(out),
dimension(:,:) :: gbuf
1365 integer,
optional,
intent(in) :: mroot, idebug
1368 integer :: i,j,lroot, lidebug
1370 if (.not.
present(mroot))
then 1376 if (.not.
present(idebug))
then 1382 if(
mype.eq.lroot)
then 1383 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
1384 .ne.
'** gather_2d: size(lbuf,2)size(gbuf,2) ', &
1385 size(lbuf,2),
size(gbuf,2) )
1388 do j=lbound(lbuf,2),ubound(lbuf,2)
1389 call gather_1d( lbuf(:,j), gbuf(:,j), lroot, lidebug )
1398 subroutine gather_3d( lbuf, gbuf, mroot, idebug )
1399 double precision,
intent(in),
dimension(:,:,:) :: lbuf
1400 double precision,
intent(out),
dimension(:,:,:) :: gbuf
1401 integer,
optional,
intent(in) :: mroot, idebug
1404 integer :: j,k,lroot, lidebug
1406 if (.not.
present(mroot))
then 1412 if (.not.
present(idebug))
then 1418 if(
mype.eq.lroot)
then 1419 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
1420 .ne.
'** gather_3d: size(lbuf,2)size(gbuf,2) ', &
1421 size(lbuf,2),
size(gbuf,2) )
1423 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
1424 .ne.
'** gather_3d: size(lbuf,3)size(gbuf,3) ', &
1425 size(lbuf,3),
size(gbuf,3) )
1428 do k=lbound(lbuf,3),ubound(lbuf,3)
1429 do j=lbound(lbuf,2),ubound(lbuf,2)
1430 call gather_1d( lbuf(:,j,k), gbuf(:,j,k), lroot, lidebug )
1441 subroutine gather_1c( lbuf, gbuf, mroot, idebug )
1446 character(len=*),
intent(in),
dimension(:) :: lbuf
1447 character(len=*),
intent(out),
dimension(:) :: gbuf
1448 integer,
optional,
intent(in) :: mroot, idebug
1451 integer,
allocatable,
dimension(:,:) :: gbuf_pack,lbuf1
1452 character(len=80) :: string
1454 integer :: recvtype, sendtype, ijk1,ijk2,sendcnt, ierr,lroot, lidebug
1455 integer :: i,j,k,ibuffer,iproc, ioffset
1456 integer :: ijk, ijk_gl
1457 integer :: istartl, iendl, jstartl, jendl, kstartl, kendl
1458 integer :: lenchar, icount
1459 logical :: isok_k,isok_j,isok_i, isinterior
1460 logical :: isbc_k,isbc_j,isbc_i, isboundary, need_copy
1464 if (.not.
present(mroot))
then 1470 if (.not.
present(idebug))
then 1481 lenchar = len(lbuf(1))
1483 if(
mype.eq.lroot)
then 1484 allocate(gbuf_pack(
ijkmax3,lenchar))
1486 allocate(gbuf_pack(10,lenchar))
1489 allocate(lbuf1(ijk1:ijk2,lenchar))
1492 string = lbuf(i)(1:lenchar)
1494 lbuf1(i,j) = ichar(string(j:j))
1500 if(
mype.eq.lroot)
then 1504 string(j:j) = char(gbuf_pack(i,j))
1507 gbuf(i)(1:lenchar) = string(1:lenchar)
1512 deallocate(gbuf_pack)
1522 subroutine gather_1l( lbuf, gbuf, mroot, idebug )
1527 logical,
intent(in),
dimension(:) :: lbuf
1528 logical,
intent(out),
dimension(:) :: gbuf
1529 integer,
optional,
intent(in) :: mroot, idebug
1532 logical,
allocatable,
dimension(:) :: gbuf_pack
1534 integer :: recvtype, sendtype, ijk1,ijk2,sendcnt, ierr,lroot, lidebug
1535 integer :: i,j,k,ibuffer,iproc, ioffset
1536 integer :: ijk, ijk_gl
1537 integer :: istartl, iendl, jstartl, jendl, kstartl, kendl
1538 logical :: isok_k,isok_j,isok_i, isinterior
1539 logical :: isbc_k,isbc_j,isbc_i, isboundary, need_copy
1543 if (.not.
present(mroot))
then 1549 if (.not.
present(idebug))
then 1555 if(
mype.eq.lroot)
then 1558 allocate(gbuf_pack(10))
1561 recvtype = mpi_logical
1568 sendcnt = ijk2-ijk1+1
1570 call mpi_gatherv( lbuf, sendcnt, sendtype, &
1572 lroot, mpi_comm_world, ierr )
1573 call mpi_check(
'gather_1l:MPI_Gatherv', ierr )
1575 if(
mype.eq.lroot)
then 1597 ibuffer = funijk_proc(i,j,k,iproc) + ioffset
1598 isok_k = (kstartl <= k) .and. (k <=kendl)
1599 isok_j = (jstartl <= j) .and. (j <=jendl)
1600 isok_i = (istartl <= i) .and. (i <=iendl)
1602 need_copy = isok_k .and. isok_j .and. isok_i
1605 ijk_gl = funijk_gl(i,j,k)
1606 gbuf( ijk_gl ) = gbuf_pack(ibuffer)
1616 deallocate(gbuf_pack)
1628 subroutine bcast_0i( buffer, mroot, idebug )
1629 integer,
intent(inout) :: buffer
1630 integer,
optional,
intent(in) :: mroot, idebug
1633 integer :: datatype, count, ierr,lroot, lidebug
1635 if (.not.
present(mroot))
then 1641 if (.not.
present(idebug))
then 1647 datatype = mpi_integer
1651 call mpi_bcast( buffer, count, datatype, lroot, mpi_comm_world, ierr)
1652 call mpi_check(
'bcast_0i:MPI_Bcast', ierr )
1659 subroutine bcast_1i( buffer, mroot, idebug )
1660 integer,
intent(inout),
dimension(:) :: buffer
1661 integer,
optional,
intent(in) :: mroot, idebug
1664 integer :: datatype, count, ierr,lroot, lidebug
1666 if (.not.
present(mroot))
then 1672 if (.not.
present(idebug))
then 1678 datatype = mpi_integer
1680 count =
size(buffer,1)
1682 call mpi_bcast( buffer, count, datatype, lroot, mpi_comm_world, ierr)
1683 call mpi_check(
'bcast_1i:MPI_Bcast', ierr )
1690 subroutine bcast_2i( buffer, mroot, idebug )
1691 integer,
intent(inout),
dimension(:,:) :: buffer
1692 integer,
optional,
intent(in) :: mroot, idebug
1695 integer :: i,j,lroot, lidebug
1697 if (.not.
present(mroot))
then 1703 if (.not.
present(idebug))
then 1709 do j=lbound(buffer,2),ubound(buffer,2)
1710 call bcast_1i( buffer(:,j), lroot, lidebug )
1717 subroutine bcast_3i( buffer, mroot, idebug )
1718 integer,
intent(inout),
dimension(:,:,:) :: buffer
1719 integer,
optional,
intent(in) :: mroot, idebug
1722 integer :: j,k,lroot, lidebug
1724 if (.not.
present(mroot))
then 1730 if (.not.
present(idebug))
then 1736 do k=lbound(buffer,3),ubound(buffer,3)
1737 do j=lbound(buffer,2),ubound(buffer,2)
1738 call bcast_1i( buffer(:,j,k), lroot, lidebug )
1746 subroutine bcast_0r( buffer, mroot, idebug )
1747 real,
intent(inout) :: buffer
1748 integer,
optional,
intent(in) :: mroot, idebug
1751 integer :: datatype, count, ierr,lroot, lidebug
1753 if (.not.
present(mroot))
then 1759 if (.not.
present(idebug))
then 1769 call mpi_bcast( buffer, count, datatype, lroot, mpi_comm_world, ierr)
1770 call mpi_check(
'bcast_0r:MPI_Bcast', ierr )
1776 subroutine bcast_1r( buffer, mroot, idebug )
1777 real,
intent(inout),
dimension(:) :: buffer
1778 integer,
optional,
intent(in) :: mroot, idebug
1781 integer :: datatype, count, ierr,lroot, lidebug
1783 if (.not.
present(mroot))
then 1789 if (.not.
present(idebug))
then 1797 count =
size(buffer,1)
1799 call mpi_bcast( buffer, count, datatype, lroot, mpi_comm_world, ierr)
1800 call mpi_check(
'bcast_1r:MPI_Bcast', ierr )
1806 subroutine bcast_2r( buffer, mroot, idebug )
1807 real,
intent(inout),
dimension(:,:) :: buffer
1808 integer,
optional,
intent(in) :: mroot, idebug
1811 integer :: i,j,lroot, lidebug
1813 if (.not.
present(mroot))
then 1819 if (.not.
present(idebug))
then 1825 do j=lbound(buffer,2),ubound(buffer,2)
1826 call bcast_1r( buffer(:,j), lroot, lidebug )
1833 subroutine bcast_3r( buffer, mroot, idebug )
1834 real,
intent(inout),
dimension(:,:,:) :: buffer
1835 integer,
optional,
intent(in) :: mroot, idebug
1838 integer :: j,k,lroot, lidebug
1840 if (.not.
present(mroot))
then 1846 if (.not.
present(idebug))
then 1852 do k=lbound(buffer,3),ubound(buffer,3)
1853 do j=lbound(buffer,2),ubound(buffer,2)
1854 call bcast_1r( buffer(:,j,k), lroot, lidebug )
1862 subroutine bcast_0d( buffer, mroot, idebug )
1863 double precision,
intent(inout) :: buffer
1864 integer,
optional,
intent(in) :: mroot, idebug
1867 integer :: datatype, count, ierr,lroot, lidebug
1869 if (.not.
present(mroot))
then 1875 if (.not.
present(idebug))
then 1881 datatype = mpi_double_precision
1885 call mpi_bcast( buffer, count, datatype, lroot, mpi_comm_world, ierr)
1886 call mpi_check(
'bcast_0d:MPI_Bcast', ierr )
1893 subroutine bcast_1d( buffer, mroot, idebug )
1894 double precision,
intent(inout),
dimension(:) :: buffer
1895 integer,
optional,
intent(in) :: mroot, idebug
1898 integer :: datatype, count, ierr,lroot, lidebug
1900 if (.not.
present(mroot))
then 1906 if (.not.
present(idebug))
then 1912 datatype = mpi_double_precision
1914 count =
size(buffer,1)
1916 call mpi_bcast( buffer, count, datatype, lroot, mpi_comm_world, ierr)
1917 call mpi_check(
'bcast_1d:MPI_Bcast', ierr )
1923 subroutine bcast_2d( buffer, mroot, idebug )
1924 double precision,
intent(inout),
dimension(:,:) :: buffer
1925 integer,
optional,
intent(in) :: mroot, idebug
1928 integer :: i,j,lroot, lidebug
1930 if (.not.
present(mroot))
then 1936 if (.not.
present(idebug))
then 1942 do j=lbound(buffer,2),ubound(buffer,2)
1943 call bcast_1d( buffer(:,j), lroot, lidebug )
1950 subroutine bcast_3d( buffer, mroot, idebug )
1951 double precision,
intent(inout),
dimension(:,:,:) :: buffer
1952 integer,
optional,
intent(in) :: mroot, idebug
1955 integer :: j,k,lroot, lidebug
1957 if (.not.
present(mroot))
then 1963 if (.not.
present(idebug))
then 1969 do k=lbound(buffer,3),ubound(buffer,3)
1970 do j=lbound(buffer,2),ubound(buffer,2)
1971 call bcast_1d( buffer(:,j,k), lroot, lidebug )
1979 subroutine bcast_0c( buffer, mroot, idebug )
1980 character(len=*),
intent(inout) :: buffer
1981 integer,
optional,
intent(in) :: mroot, idebug
1982 character,
allocatable,
dimension(:) :: buffer1
1985 integer :: datatype, count, ierr,lroot, lidebug
1986 integer :: lenchar,icount, i, j
1988 if (.not.
present(mroot))
then 1994 if (.not.
present(idebug))
then 2000 lenchar = len(buffer)
2002 allocate(buffer1(lenchar))
2008 buffer1(icount) = buffer(j:j)
2012 datatype = mpi_character
2016 call mpi_bcast( buffer1, count*lenchar, datatype, lroot, mpi_comm_world, ierr)
2017 call mpi_check(
'bcast_0c:MPI_Bcast', ierr )
2023 buffer(j:j) = buffer1(icount)
2034 subroutine bcast_1c( buffer, mroot, idebug )
2035 character(len=*),
intent(inout),
dimension(:) :: buffer
2036 integer,
optional,
intent(in) :: mroot, idebug
2037 character,
allocatable,
dimension(:) :: buffer1
2040 integer :: datatype, count, ierr,lroot, lidebug
2041 integer :: lenchar,icount, i, j
2042 character(len=len(buffer(1))) :: string
2044 if (.not.
present(mroot))
then 2050 if (.not.
present(idebug))
then 2056 lenchar = len(buffer(1))
2058 allocate(buffer1(
size(buffer)*lenchar))
2061 do i = 1,
size(buffer)
2062 string = buffer(i)(1:lenchar)
2066 buffer1(icount) = string(j:j)
2071 datatype = mpi_character
2073 count =
size(buffer,1)
2075 call mpi_bcast( buffer1, count*lenchar, datatype, lroot, mpi_comm_world, ierr)
2076 call mpi_check(
'bcast_1c:MPI_Bcast', ierr )
2079 do i = 1,
size(buffer)
2083 string(j:j) = buffer1(icount)
2095 subroutine bcast_0l( buffer, mroot, idebug )
2096 logical,
intent(inout) :: buffer
2097 integer,
optional,
intent(in) :: mroot, idebug
2100 integer :: datatype, count, ierr,lroot, lidebug
2102 if (.not.
present(mroot))
then 2108 if (.not.
present(idebug))
then 2114 datatype = mpi_logical
2118 call mpi_bcast( buffer, count, datatype, lroot, mpi_comm_world, ierr)
2119 call mpi_check(
'bcast_0l:MPI_Bcast', ierr )
2126 subroutine bcast_1l( buffer, mroot, idebug )
2127 logical,
intent(inout),
dimension(:) :: buffer
2128 integer,
optional,
intent(in) :: mroot, idebug
2131 integer :: datatype, count, ierr,lroot, lidebug
2133 if (.not.
present(mroot))
then 2139 if (.not.
present(idebug))
then 2145 datatype = mpi_logical
2147 count =
size(buffer,1)
2149 call mpi_bcast( buffer, count, datatype, lroot, mpi_comm_world, ierr)
2150 call mpi_check(
'bcast_1l:MPI_Bcast', ierr )
2161 integer,
intent(in) :: lbuf
2162 integer,
intent(out) :: gbuf
2163 integer,
optional,
intent(in) :: mroot, idebug
2166 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
2168 if (.not.
present(mroot))
then 2174 if (.not.
present(idebug))
then 2180 recvtype = mpi_integer
2185 call mpi_reduce( lbuf, gbuf, sendcnt, sendtype, mpi_sum, &
2186 lroot, mpi_comm_world, ierr )
2187 call mpi_check(
'global_sum_0i:MPI_Reduce', ierr )
2197 integer,
intent(in),
dimension(:) :: lbuf
2198 integer,
intent(out),
dimension(:) :: gbuf
2199 integer,
optional,
intent(in) :: mroot, idebug
2202 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
2204 if (.not.
present(mroot))
then 2210 if (.not.
present(idebug))
then 2216 recvtype = mpi_integer
2219 sendcnt =
size(lbuf)
2221 call mpi_reduce( lbuf, gbuf, sendcnt, sendtype, mpi_sum, &
2222 lroot, mpi_comm_world, ierr )
2223 call mpi_check(
'global_sum_1i:MPI_Reduce', ierr )
2232 integer,
intent(in),
dimension(:,:) :: lbuf
2233 integer,
intent(out),
dimension(:,:) :: gbuf
2234 integer,
optional,
intent(in) :: mroot, idebug
2237 integer :: i,j,lroot, lidebug
2239 if (.not.
present(mroot))
then 2245 if (.not.
present(idebug))
then 2251 if(
mype.eq.lroot)
then 2252 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
2253 .ne.
'** global_sum_2i: size(lbuf,2)size(gbuf,2) ', &
2254 size(lbuf,2),
size(gbuf,2) )
2257 do j=lbound(lbuf,2),ubound(lbuf,2)
2268 integer,
intent(in),
dimension(:,:,:) :: lbuf
2269 integer,
intent(out),
dimension(:,:,:) :: gbuf
2270 integer,
optional,
intent(in) :: mroot, idebug
2273 integer :: j,k,lroot, lidebug
2275 if (.not.
present(mroot))
then 2281 if (.not.
present(idebug))
then 2287 if(
mype.eq.lroot)
then 2288 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
2289 .ne.
'** global_sum_3i: size(lbuf,2)size(gbuf,2) ', &
2290 size(lbuf,2),
size(gbuf,2) )
2292 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
2293 .ne.
'** global_sum_3i: size(lbuf,3)size(gbuf,3) ', &
2294 size(lbuf,3),
size(gbuf,3) )
2297 do k=lbound(lbuf,3),ubound(lbuf,3)
2298 do j=lbound(lbuf,2),ubound(lbuf,2)
2299 call global_sum_1i( lbuf(:,j,k), gbuf(:,j,k), lroot, lidebug )
2310 real,
intent(in) :: lbuf
2311 real,
intent(out) :: gbuf
2312 integer,
optional,
intent(in) :: mroot, idebug
2315 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
2317 if (.not.
present(mroot))
then 2323 if (.not.
present(idebug))
then 2334 call mpi_reduce( lbuf, gbuf, sendcnt, sendtype, mpi_sum, &
2335 lroot, mpi_comm_world, ierr )
2336 call mpi_check(
'global_sum_0r:MPI_Reduce', ierr )
2346 real,
intent(in),
dimension(:) :: lbuf
2347 real,
intent(out),
dimension(:) :: gbuf
2348 integer,
optional,
intent(in) :: mroot, idebug
2351 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
2353 if (.not.
present(mroot))
then 2359 if (.not.
present(idebug))
then 2368 sendcnt =
size(lbuf)
2370 call mpi_reduce( lbuf, gbuf, sendcnt, sendtype, mpi_sum, &
2371 lroot, mpi_comm_world, ierr )
2372 call mpi_check(
'global_sum_1r:MPI_Reduce', ierr )
2381 real,
intent(in),
dimension(:,:) :: lbuf
2382 real,
intent(out),
dimension(:,:) :: gbuf
2383 integer,
optional,
intent(in) :: mroot, idebug
2386 integer :: i,j,lroot, lidebug
2388 if (.not.
present(mroot))
then 2394 if (.not.
present(idebug))
then 2400 if(
mype.eq.lroot)
then 2401 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
2402 .ne.
'** global_sum_2r: size(lbuf,2)size(gbuf,2) ', &
2403 size(lbuf,2),
size(gbuf,2) )
2406 do j=lbound(lbuf,2),ubound(lbuf,2)
2417 real,
intent(in),
dimension(:,:,:) :: lbuf
2418 real,
intent(out),
dimension(:,:,:) :: gbuf
2419 integer,
optional,
intent(in) :: mroot, idebug
2422 integer :: j,k,lroot, lidebug
2424 if (.not.
present(mroot))
then 2430 if (.not.
present(idebug))
then 2436 if(
mype.eq.lroot)
then 2437 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
2438 .ne.
'** global_sum_3i: size(lbuf,2)size(gbuf,2) ', &
2439 size(lbuf,2),
size(gbuf,2) )
2441 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
2442 .ne.
'** global_sum_3i: size(lbuf,3)size(gbuf,3) ', &
2443 size(lbuf,3),
size(gbuf,3) )
2446 do k=lbound(lbuf,3),ubound(lbuf,3)
2447 do j=lbound(lbuf,2),ubound(lbuf,2)
2448 call global_sum_1r( lbuf(:,j,k), gbuf(:,j,k), lroot, lidebug )
2459 double precision,
intent(in) :: lbuf
2460 double precision,
intent(out) :: gbuf
2461 integer,
optional,
intent(in) :: mroot, idebug
2464 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
2466 if (.not.
present(mroot))
then 2472 if (.not.
present(idebug))
then 2478 recvtype = mpi_double_precision
2483 call mpi_reduce( lbuf, gbuf, sendcnt, sendtype, mpi_sum, &
2484 lroot, mpi_comm_world, ierr )
2485 call mpi_check(
'global_sum_0d:MPI_Reduce', ierr )
2495 double precision,
intent(in),
dimension(:) :: lbuf
2496 double precision,
intent(out),
dimension(:) :: gbuf
2497 integer,
optional,
intent(in) :: mroot, idebug
2500 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
2502 if (.not.
present(mroot))
then 2508 if (.not.
present(idebug))
then 2514 recvtype = mpi_double_precision
2517 sendcnt =
size(lbuf)
2519 call mpi_reduce( lbuf, gbuf, sendcnt, sendtype, mpi_sum, &
2520 lroot, mpi_comm_world, ierr )
2521 call mpi_check(
'global_sum_1d:MPI_Reduce', ierr )
2530 double precision,
intent(in),
dimension(:,:) :: lbuf
2531 double precision,
intent(out),
dimension(:,:) :: gbuf
2532 integer,
optional,
intent(in) :: mroot, idebug
2535 integer :: i,j,lroot, lidebug
2537 if (.not.
present(mroot))
then 2543 if (.not.
present(idebug))
then 2549 if(
mype.eq.lroot)
then 2550 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
2551 .ne.
'** global_sum_2d: size(lbuf,2)size(gbuf,2) ', &
2552 size(lbuf,2),
size(gbuf,2) )
2555 do j=lbound(lbuf,2),ubound(lbuf,2)
2566 double precision,
intent(in),
dimension(:,:,:) :: lbuf
2567 double precision,
intent(out),
dimension(:,:,:) :: gbuf
2568 integer,
optional,
intent(in) :: mroot, idebug
2571 integer :: j,k,lroot, lidebug
2573 if (.not.
present(mroot))
then 2579 if (.not.
present(idebug))
then 2585 if(
mype.eq.lroot)
then 2586 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
2587 .ne.
'** global_sum_3i: size(lbuf,2)size(gbuf,2) ', &
2588 size(lbuf,2),
size(gbuf,2) )
2590 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
2591 .ne.
'** global_sum_3i: size(lbuf,3)size(gbuf,3) ', &
2592 size(lbuf,3),
size(gbuf,3) )
2595 do k=lbound(lbuf,3),ubound(lbuf,3)
2596 do j=lbound(lbuf,2),ubound(lbuf,2)
2597 call global_sum_1d( lbuf(:,j,k), gbuf(:,j,k), lroot, lidebug )
2608 doubleprecision,
intent(inout) :: gbuf
2609 doubleprecision :: lbuf
2620 doubleprecision,
dimension(:),
intent(inout) :: gbuf
2621 doubleprecision,
dimension(size(gbuf)) :: lbuf
2631 doubleprecision,
dimension(:,:),
intent(inout) :: gbuf
2632 doubleprecision,
dimension(size(gbuf,1),size(gbuf,2)) :: lbuf
2643 doubleprecision,
dimension(:,:,:),
intent(inout) :: gbuf
2644 doubleprecision,
dimension(size(gbuf,1),size(gbuf,2),size(gbuf,3)) :: lbuf
2656 integer,
intent(inout) :: gbuf
2667 integer,
dimension(:),
intent(inout) :: gbuf
2668 integer,
dimension(size(gbuf)) :: lbuf
2678 integer,
dimension(:,:),
intent(inout) :: gbuf
2679 integer,
dimension(size(gbuf,1),size(gbuf,2)) :: lbuf
2690 integer,
dimension(:,:,:),
intent(inout) :: gbuf
2691 integer,
dimension(size(gbuf,1),size(gbuf,2),size(gbuf,3)) :: lbuf
2701 real,
intent(inout) :: gbuf
2713 real,
dimension(:),
intent(inout) :: gbuf
2714 real,
dimension(size(gbuf)) :: lbuf
2724 real,
dimension(:,:),
intent(inout) :: gbuf
2725 real,
dimension(size(gbuf,1),size(gbuf,2)) :: lbuf
2736 real,
dimension(:,:,:),
intent(inout) :: gbuf
2737 real,
dimension(size(gbuf,1),size(gbuf,2),size(gbuf,3)) :: lbuf
2748 integer,
intent(in) :: lbuf
2749 integer,
intent(out) :: gbuf
2750 integer,
optional,
intent(in) :: mroot, idebug
2753 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
2755 if (.not.
present(mroot))
then 2761 if (.not.
present(idebug))
then 2767 recvtype = mpi_integer
2772 call mpi_allreduce( lbuf, gbuf, sendcnt, sendtype, mpi_sum, &
2773 mpi_comm_world, ierr )
2774 call mpi_check(
'global_all_sum_0i:MPI_Allreduce', ierr )
2784 integer,
intent(in),
dimension(:) :: lbuf
2785 integer,
intent(out),
dimension(:) :: gbuf
2786 integer,
optional,
intent(in) :: mroot, idebug
2789 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
2791 if (.not.
present(mroot))
then 2797 if (.not.
present(idebug))
then 2803 recvtype = mpi_integer
2806 sendcnt =
size(lbuf)
2808 call mpi_allreduce( lbuf, gbuf, sendcnt, sendtype, mpi_sum, &
2809 mpi_comm_world, ierr )
2810 call mpi_check(
'global_all_sum_1i:MPI_Allreduce', ierr )
2819 integer,
intent(in),
dimension(:,:) :: lbuf
2820 integer,
intent(out),
dimension(:,:) :: gbuf
2821 integer,
optional,
intent(in) :: mroot, idebug
2824 integer :: i,j,lroot, lidebug
2826 if (.not.
present(mroot))
then 2832 if (.not.
present(idebug))
then 2838 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
2839 .ne.
'** global_all_sum_2i: size(lbuf,2)size(gbuf,2) ', &
2840 size(lbuf,2),
size(gbuf,2) )
2842 do j=lbound(lbuf,2),ubound(lbuf,2)
2853 integer,
intent(in),
dimension(:,:,:) :: lbuf
2854 integer,
intent(out),
dimension(:,:,:) :: gbuf
2855 integer,
optional,
intent(in) :: mroot, idebug
2858 integer :: j,k,lroot, lidebug
2860 if (.not.
present(mroot))
then 2866 if (.not.
present(idebug))
then 2872 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
2873 .ne.
'** global_all_sum_3i: size(lbuf,2)size(gbuf,2) ', &
2874 size(lbuf,2),
size(gbuf,2) )
2876 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
2877 .ne.
'** global_all_sum_3i: size(lbuf,3)size(gbuf,3) ', &
2878 size(lbuf,3),
size(gbuf,3) )
2880 do k=lbound(lbuf,3),ubound(lbuf,3)
2881 do j=lbound(lbuf,2),ubound(lbuf,2)
2893 real,
intent(in) :: lbuf
2894 real,
intent(out) :: gbuf
2895 integer,
optional,
intent(in) :: mroot, idebug
2898 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
2900 if (.not.
present(mroot))
then 2906 if (.not.
present(idebug))
then 2917 call mpi_allreduce( lbuf, gbuf, sendcnt, sendtype, mpi_sum, &
2918 mpi_comm_world, ierr )
2919 call mpi_check(
'global_all_sum_0r:MPI_Allreduce', ierr )
2929 real,
intent(in),
dimension(:) :: lbuf
2930 real,
intent(out),
dimension(:) :: gbuf
2931 integer,
optional,
intent(in) :: mroot, idebug
2934 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
2936 if (.not.
present(mroot))
then 2942 if (.not.
present(idebug))
then 2951 sendcnt =
size(lbuf)
2953 call mpi_allreduce( lbuf, gbuf, sendcnt, sendtype, mpi_sum, &
2954 mpi_comm_world, ierr )
2955 call mpi_check(
'global_all_sum_1r:MPI_Allreduce', ierr )
2964 real,
intent(in),
dimension(:,:) :: lbuf
2965 real,
intent(out),
dimension(:,:) :: gbuf
2966 integer,
optional,
intent(in) :: mroot, idebug
2969 integer :: i,j,lroot, lidebug
2971 if (.not.
present(mroot))
then 2977 if (.not.
present(idebug))
then 2983 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
2984 .ne.
'** global_all_sum_2r: size(lbuf,2)size(gbuf,2) ', &
2985 size(lbuf,2),
size(gbuf,2) )
2987 do j=lbound(lbuf,2),ubound(lbuf,2)
2998 real,
intent(in),
dimension(:,:,:) :: lbuf
2999 real,
intent(out),
dimension(:,:,:) :: gbuf
3000 integer,
optional,
intent(in) :: mroot, idebug
3003 integer :: j,k,lroot, lidebug
3005 if (.not.
present(mroot))
then 3011 if (.not.
present(idebug))
then 3017 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
3018 .ne.
'** global_all_sum_3i: size(lbuf,2)size(gbuf,2) ', &
3019 size(lbuf,2),
size(gbuf,2) )
3021 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
3022 .ne.
'** global_all_sum_3i: size(lbuf,3)size(gbuf,3) ', &
3023 size(lbuf,3),
size(gbuf,3) )
3025 do k=lbound(lbuf,3),ubound(lbuf,3)
3026 do j=lbound(lbuf,2),ubound(lbuf,2)
3038 double precision,
intent(in) :: lbuf
3039 double precision,
intent(out) :: gbuf
3040 integer,
optional,
intent(in) :: mroot, idebug
3043 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
3045 if (.not.
present(mroot))
then 3051 if (.not.
present(idebug))
then 3057 recvtype = mpi_double_precision
3062 call mpi_allreduce( lbuf, gbuf, sendcnt, sendtype, mpi_sum, &
3063 mpi_comm_world, ierr )
3064 call mpi_check(
'global_all_sum_0d:MPI_Allreduce', ierr )
3074 double precision,
intent(in),
dimension(:) :: lbuf
3075 double precision,
intent(out),
dimension(:) :: gbuf
3076 integer,
optional,
intent(in) :: mroot, idebug
3079 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
3081 if (.not.
present(mroot))
then 3087 if (.not.
present(idebug))
then 3093 recvtype = mpi_double_precision
3096 sendcnt =
size(lbuf)
3098 call mpi_allreduce( lbuf, gbuf, sendcnt, sendtype, mpi_sum, &
3099 mpi_comm_world, ierr )
3100 call mpi_check(
'global_all_sum_1d:MPI_Allreduce', ierr )
3109 double precision,
intent(in),
dimension(:,:) :: lbuf
3110 double precision,
intent(out),
dimension(:,:) :: gbuf
3111 integer,
optional,
intent(in) :: mroot, idebug
3114 integer :: i,j,lroot, lidebug
3116 if (.not.
present(mroot))
then 3122 if (.not.
present(idebug))
then 3128 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
3129 .ne.
'** global_all_sum_2d: size(lbuf,2)size(gbuf,2) ', &
3130 size(lbuf,2),
size(gbuf,2) )
3132 do j=lbound(lbuf,2),ubound(lbuf,2)
3143 double precision,
intent(in),
dimension(:,:,:) :: lbuf
3144 double precision,
intent(out),
dimension(:,:,:) :: gbuf
3145 integer,
optional,
intent(in) :: mroot, idebug
3148 integer :: j,k,lroot, lidebug
3150 if (.not.
present(mroot))
then 3156 if (.not.
present(idebug))
then 3162 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
3163 .ne.
'** global_all_sum_3i: size(lbuf,2)size(gbuf,2) ', &
3164 size(lbuf,2),
size(gbuf,2) )
3166 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
3167 .ne.
'** global_all_sum_3i: size(lbuf,3)size(gbuf,3) ', &
3168 size(lbuf,3),
size(gbuf,3) )
3170 do k=lbound(lbuf,3),ubound(lbuf,3)
3171 do j=lbound(lbuf,2),ubound(lbuf,2)
3183 integer,
intent(in) :: lbuf
3184 integer,
intent(out) :: gbuf
3185 integer,
optional,
intent(in) :: mroot, idebug
3188 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
3190 if (.not.
present(mroot))
then 3196 if (.not.
present(idebug))
then 3202 recvtype = mpi_integer
3207 call mpi_reduce( lbuf, gbuf, sendcnt, sendtype, mpi_min, &
3208 lroot, mpi_comm_world, ierr )
3209 call mpi_check(
'global_min_0i:MPI_Reduce', ierr )
3219 integer,
intent(in),
dimension(:) :: lbuf
3220 integer,
intent(out),
dimension(:) :: gbuf
3221 integer,
optional,
intent(in) :: mroot, idebug
3224 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
3226 if (.not.
present(mroot))
then 3232 if (.not.
present(idebug))
then 3238 recvtype = mpi_integer
3241 sendcnt =
size(lbuf)
3243 call mpi_reduce( lbuf, gbuf, sendcnt, sendtype, mpi_min, &
3244 lroot, mpi_comm_world, ierr )
3245 call mpi_check(
'global_min_1i:MPI_Reduce', ierr )
3254 integer,
intent(in),
dimension(:,:) :: lbuf
3255 integer,
intent(out),
dimension(:,:) :: gbuf
3256 integer,
optional,
intent(in) :: mroot, idebug
3259 integer :: i,j,lroot, lidebug
3261 if (.not.
present(mroot))
then 3267 if (.not.
present(idebug))
then 3273 if(
mype.eq.lroot)
then 3274 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
3275 .ne.
'** global_min_2i: size(lbuf,2)size(gbuf,2) ', &
3276 size(lbuf,2),
size(gbuf,2) )
3279 do j=lbound(lbuf,2),ubound(lbuf,2)
3290 integer,
intent(in),
dimension(:,:,:) :: lbuf
3291 integer,
intent(out),
dimension(:,:,:) :: gbuf
3292 integer,
optional,
intent(in) :: mroot, idebug
3295 integer :: j,k,lroot, lidebug
3297 if (.not.
present(mroot))
then 3303 if (.not.
present(idebug))
then 3309 if(
mype.eq.lroot)
then 3310 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
3311 .ne.
'** global_min_3i: size(lbuf,2)size(gbuf,2) ', &
3312 size(lbuf,2),
size(gbuf,2) )
3314 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
3315 .ne.
'** global_min_3i: size(lbuf,3)size(gbuf,3) ', &
3316 size(lbuf,3),
size(gbuf,3) )
3319 do k=lbound(lbuf,3),ubound(lbuf,3)
3320 do j=lbound(lbuf,2),ubound(lbuf,2)
3321 call global_min_1i( lbuf(:,j,k), gbuf(:,j,k), lroot, lidebug )
3332 real,
intent(in) :: lbuf
3333 real,
intent(out) :: gbuf
3334 integer,
optional,
intent(in) :: mroot, idebug
3337 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
3339 if (.not.
present(mroot))
then 3345 if (.not.
present(idebug))
then 3356 call mpi_reduce( lbuf, gbuf, sendcnt, sendtype, mpi_min, &
3357 lroot, mpi_comm_world, ierr )
3358 call mpi_check(
'global_min_0r:MPI_Reduce', ierr )
3368 real,
intent(in),
dimension(:) :: lbuf
3369 real,
intent(out),
dimension(:) :: gbuf
3370 integer,
optional,
intent(in) :: mroot, idebug
3373 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
3375 if (.not.
present(mroot))
then 3381 if (.not.
present(idebug))
then 3390 sendcnt =
size(lbuf)
3392 call mpi_reduce( lbuf, gbuf, sendcnt, sendtype, mpi_min, &
3393 lroot, mpi_comm_world, ierr )
3394 call mpi_check(
'global_min_1r:MPI_Reduce', ierr )
3403 real,
intent(in),
dimension(:,:) :: lbuf
3404 real,
intent(out),
dimension(:,:) :: gbuf
3405 integer,
optional,
intent(in) :: mroot, idebug
3408 integer :: i,j,lroot, lidebug
3410 if (.not.
present(mroot))
then 3416 if (.not.
present(idebug))
then 3422 if(
mype.eq.lroot)
then 3423 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
3424 .ne.
'** global_min_2r: size(lbuf,2)size(gbuf,2) ', &
3425 size(lbuf,2),
size(gbuf,2) )
3428 do j=lbound(lbuf,2),ubound(lbuf,2)
3439 real,
intent(in),
dimension(:,:,:) :: lbuf
3440 real,
intent(out),
dimension(:,:,:) :: gbuf
3441 integer,
optional,
intent(in) :: mroot, idebug
3444 integer :: j,k,lroot, lidebug
3446 if (.not.
present(mroot))
then 3452 if (.not.
present(idebug))
then 3458 if(
mype.eq.lroot)
then 3459 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
3460 .ne.
'** global_min_3i: size(lbuf,2)size(gbuf,2) ', &
3461 size(lbuf,2),
size(gbuf,2) )
3463 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
3464 .ne.
'** global_min_3i: size(lbuf,3)size(gbuf,3) ', &
3465 size(lbuf,3),
size(gbuf,3) )
3468 do k=lbound(lbuf,3),ubound(lbuf,3)
3469 do j=lbound(lbuf,2),ubound(lbuf,2)
3470 call global_min_1r( lbuf(:,j,k), gbuf(:,j,k), lroot, lidebug )
3481 double precision,
intent(in) :: lbuf
3482 double precision,
intent(out) :: gbuf
3483 integer,
optional,
intent(in) :: mroot, idebug
3486 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
3488 if (.not.
present(mroot))
then 3494 if (.not.
present(idebug))
then 3500 recvtype = mpi_double_precision
3505 call mpi_reduce( lbuf, gbuf, sendcnt, sendtype, mpi_min, &
3506 lroot, mpi_comm_world, ierr )
3507 call mpi_check(
'global_min_0d:MPI_Reduce', ierr )
3517 double precision,
intent(in),
dimension(:) :: lbuf
3518 double precision,
intent(out),
dimension(:) :: gbuf
3519 integer,
optional,
intent(in) :: mroot, idebug
3522 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
3524 if (.not.
present(mroot))
then 3530 if (.not.
present(idebug))
then 3536 recvtype = mpi_double_precision
3539 sendcnt =
size(lbuf)
3541 call mpi_reduce( lbuf, gbuf, sendcnt, sendtype, mpi_min, &
3542 lroot, mpi_comm_world, ierr )
3543 call mpi_check(
'global_min_1d:MPI_Reduce', ierr )
3552 double precision,
intent(in),
dimension(:,:) :: lbuf
3553 double precision,
intent(out),
dimension(:,:) :: gbuf
3554 integer,
optional,
intent(in) :: mroot, idebug
3557 integer :: i,j,lroot, lidebug
3559 if (.not.
present(mroot))
then 3565 if (.not.
present(idebug))
then 3571 if(
mype.eq.lroot)
then 3572 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
3573 .ne.
'** global_min_2d: size(lbuf,2)size(gbuf,2) ', &
3574 size(lbuf,2),
size(gbuf,2) )
3577 do j=lbound(lbuf,2),ubound(lbuf,2)
3588 double precision,
intent(in),
dimension(:,:,:) :: lbuf
3589 double precision,
intent(out),
dimension(:,:,:) :: gbuf
3590 integer,
optional,
intent(in) :: mroot, idebug
3593 integer :: j,k,lroot, lidebug
3595 if (.not.
present(mroot))
then 3601 if (.not.
present(idebug))
then 3607 if(
mype.eq.lroot)
then 3608 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
3609 .ne.
'** global_min_3i: size(lbuf,2)size(gbuf,2) ', &
3610 size(lbuf,2),
size(gbuf,2) )
3612 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
3613 .ne.
'** global_min_3i: size(lbuf,3)size(gbuf,3) ', &
3614 size(lbuf,3),
size(gbuf,3) )
3617 do k=lbound(lbuf,3),ubound(lbuf,3)
3618 do j=lbound(lbuf,2),ubound(lbuf,2)
3619 call global_min_1d( lbuf(:,j,k), gbuf(:,j,k), lroot, lidebug )
3630 doubleprecision,
intent(inout) :: gbuf
3631 doubleprecision :: lbuf
3642 doubleprecision,
dimension(:),
intent(inout) :: gbuf
3643 doubleprecision,
dimension(size(gbuf)) :: lbuf
3653 doubleprecision,
dimension(:,:),
intent(inout) :: gbuf
3654 doubleprecision,
dimension(size(gbuf,1),size(gbuf,2)) :: lbuf
3665 doubleprecision,
dimension(:,:,:),
intent(inout) :: gbuf
3666 doubleprecision,
dimension(size(gbuf,1),size(gbuf,2),size(gbuf,3)) :: lbuf
3679 integer,
intent(inout) :: gbuf
3691 integer,
dimension(:),
intent(inout) :: gbuf
3692 integer,
dimension(size(gbuf)) :: lbuf
3702 integer,
dimension(:,:),
intent(inout) :: gbuf
3703 integer,
dimension(size(gbuf,1),size(gbuf,2)) :: lbuf
3714 integer,
dimension(:,:,:),
intent(inout) :: gbuf
3715 integer,
dimension(size(gbuf,1),size(gbuf,2),size(gbuf,3)) :: lbuf
3725 real,
intent(inout) :: gbuf
3737 real,
dimension(:),
intent(inout) :: gbuf
3738 real,
dimension(size(gbuf)) :: lbuf
3748 real,
dimension(:,:),
intent(inout) :: gbuf
3749 real,
dimension(size(gbuf,1),size(gbuf,2)) :: lbuf
3761 real,
dimension(:,:,:),
intent(inout) :: gbuf
3762 real,
dimension(size(gbuf,1),size(gbuf,2),size(gbuf,3)) :: lbuf
3773 integer,
intent(in) :: lbuf
3774 integer,
intent(out) :: gbuf
3775 integer,
optional,
intent(in) :: mroot, idebug
3778 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
3780 if (.not.
present(mroot))
then 3786 if (.not.
present(idebug))
then 3792 recvtype = mpi_integer
3797 call mpi_allreduce( lbuf, gbuf, sendcnt, sendtype, mpi_min, &
3798 mpi_comm_world, ierr )
3799 call mpi_check(
'global_all_min_0i:MPI_Allreduce', ierr )
3809 integer,
intent(in),
dimension(:) :: lbuf
3810 integer,
intent(out),
dimension(:) :: gbuf
3811 integer,
optional,
intent(in) :: mroot, idebug
3814 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
3816 if (.not.
present(mroot))
then 3822 if (.not.
present(idebug))
then 3828 recvtype = mpi_integer
3831 sendcnt =
size(lbuf)
3833 call mpi_allreduce( lbuf, gbuf, sendcnt, sendtype, mpi_min, &
3834 mpi_comm_world, ierr )
3835 call mpi_check(
'global_all_min_1i:MPI_Allreduce', ierr )
3844 integer,
intent(in),
dimension(:,:) :: lbuf
3845 integer,
intent(out),
dimension(:,:) :: gbuf
3846 integer,
optional,
intent(in) :: mroot, idebug
3849 integer :: i,j,lroot, lidebug
3851 if (.not.
present(mroot))
then 3857 if (.not.
present(idebug))
then 3863 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
3864 .ne.
'** global_all_min_2i: size(lbuf,2)size(gbuf,2) ', &
3865 size(lbuf,2),
size(gbuf,2) )
3867 do j=lbound(lbuf,2),ubound(lbuf,2)
3878 integer,
intent(in),
dimension(:,:,:) :: lbuf
3879 integer,
intent(out),
dimension(:,:,:) :: gbuf
3880 integer,
optional,
intent(in) :: mroot, idebug
3883 integer :: j,k,lroot, lidebug
3885 if (.not.
present(mroot))
then 3891 if (.not.
present(idebug))
then 3897 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
3898 .ne.
'** global_all_min_3i: size(lbuf,2)size(gbuf,2) ', &
3899 size(lbuf,2),
size(gbuf,2) )
3901 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
3902 .ne.
'** global_all_min_3i: size(lbuf,3)size(gbuf,3) ', &
3903 size(lbuf,3),
size(gbuf,3) )
3905 do k=lbound(lbuf,3),ubound(lbuf,3)
3906 do j=lbound(lbuf,2),ubound(lbuf,2)
3918 real,
intent(in) :: lbuf
3919 real,
intent(out) :: gbuf
3920 integer,
optional,
intent(in) :: mroot, idebug
3923 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
3925 if (.not.
present(mroot))
then 3931 if (.not.
present(idebug))
then 3942 call mpi_allreduce( lbuf, gbuf, sendcnt, sendtype, mpi_min, &
3943 mpi_comm_world, ierr )
3944 call mpi_check(
'global_all_min_0r:MPI_Allreduce', ierr )
3954 real,
intent(in),
dimension(:) :: lbuf
3955 real,
intent(out),
dimension(:) :: gbuf
3956 integer,
optional,
intent(in) :: mroot, idebug
3959 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
3961 if (.not.
present(mroot))
then 3967 if (.not.
present(idebug))
then 3976 sendcnt =
size(lbuf)
3978 call mpi_allreduce( lbuf, gbuf, sendcnt, sendtype, mpi_min, &
3979 mpi_comm_world, ierr )
3980 call mpi_check(
'global_all_min_1r:MPI_Allreduce', ierr )
3989 real,
intent(in),
dimension(:,:) :: lbuf
3990 real,
intent(out),
dimension(:,:) :: gbuf
3991 integer,
optional,
intent(in) :: mroot, idebug
3994 integer :: i,j,lroot, lidebug
3996 if (.not.
present(mroot))
then 4002 if (.not.
present(idebug))
then 4008 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
4009 .ne.
'** global_all_min_2r: size(lbuf,2)size(gbuf,2) ', &
4010 size(lbuf,2),
size(gbuf,2) )
4012 do j=lbound(lbuf,2),ubound(lbuf,2)
4023 real,
intent(in),
dimension(:,:,:) :: lbuf
4024 real,
intent(out),
dimension(:,:,:) :: gbuf
4025 integer,
optional,
intent(in) :: mroot, idebug
4028 integer :: j,k,lroot, lidebug
4030 if (.not.
present(mroot))
then 4036 if (.not.
present(idebug))
then 4042 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
4043 .ne.
'** global_all_min_3i: size(lbuf,2)size(gbuf,2) ', &
4044 size(lbuf,2),
size(gbuf,2) )
4046 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
4047 .ne.
'** global_all_min_3i: size(lbuf,3)size(gbuf,3) ', &
4048 size(lbuf,3),
size(gbuf,3) )
4050 do k=lbound(lbuf,3),ubound(lbuf,3)
4051 do j=lbound(lbuf,2),ubound(lbuf,2)
4063 double precision,
intent(in) :: lbuf
4064 double precision,
intent(out) :: gbuf
4065 integer,
optional,
intent(in) :: mroot, idebug
4068 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
4070 if (.not.
present(mroot))
then 4076 if (.not.
present(idebug))
then 4082 recvtype = mpi_double_precision
4087 call mpi_allreduce( lbuf, gbuf, sendcnt, sendtype, mpi_min, &
4088 mpi_comm_world, ierr )
4089 call mpi_check(
'global_all_min_0d:MPI_Allreduce', ierr )
4099 double precision,
intent(in),
dimension(:) :: lbuf
4100 double precision,
intent(out),
dimension(:) :: gbuf
4101 integer,
optional,
intent(in) :: mroot, idebug
4104 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
4106 if (.not.
present(mroot))
then 4112 if (.not.
present(idebug))
then 4118 recvtype = mpi_double_precision
4121 sendcnt =
size(lbuf)
4123 call mpi_allreduce( lbuf, gbuf, sendcnt, sendtype, mpi_min, &
4124 mpi_comm_world, ierr )
4125 call mpi_check(
'global_all_min_1d:MPI_Allreduce', ierr )
4134 double precision,
intent(in),
dimension(:,:) :: lbuf
4135 double precision,
intent(out),
dimension(:,:) :: gbuf
4136 integer,
optional,
intent(in) :: mroot, idebug
4139 integer :: i,j,lroot, lidebug
4141 if (.not.
present(mroot))
then 4147 if (.not.
present(idebug))
then 4153 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
4154 .ne.
'** global_all_min_2d: size(lbuf,2)size(gbuf,2) ', &
4155 size(lbuf,2),
size(gbuf,2) )
4157 do j=lbound(lbuf,2),ubound(lbuf,2)
4168 double precision,
intent(in),
dimension(:,:,:) :: lbuf
4169 double precision,
intent(out),
dimension(:,:,:) :: gbuf
4170 integer,
optional,
intent(in) :: mroot, idebug
4173 integer :: j,k,lroot, lidebug
4175 if (.not.
present(mroot))
then 4181 if (.not.
present(idebug))
then 4187 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
4188 .ne.
'** global_all_min_3i: size(lbuf,2)size(gbuf,2) ', &
4189 size(lbuf,2),
size(gbuf,2) )
4191 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
4192 .ne.
'** global_all_min_3i: size(lbuf,3)size(gbuf,3) ', &
4193 size(lbuf,3),
size(gbuf,3) )
4195 do k=lbound(lbuf,3),ubound(lbuf,3)
4196 do j=lbound(lbuf,2),ubound(lbuf,2)
4208 integer,
intent(in) :: lbuf
4209 integer,
intent(out) :: gbuf
4210 integer,
optional,
intent(in) :: mroot, idebug
4213 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
4215 if (.not.
present(mroot))
then 4221 if (.not.
present(idebug))
then 4227 recvtype = mpi_integer
4232 call mpi_reduce( lbuf, gbuf, sendcnt, sendtype, mpi_max, &
4233 lroot, mpi_comm_world, ierr )
4234 call mpi_check(
'global_max_0i:MPI_Reduce', ierr )
4244 integer,
intent(in),
dimension(:) :: lbuf
4245 integer,
intent(out),
dimension(:) :: gbuf
4246 integer,
optional,
intent(in) :: mroot, idebug
4249 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
4251 if (.not.
present(mroot))
then 4257 if (.not.
present(idebug))
then 4263 recvtype = mpi_integer
4266 sendcnt =
size(lbuf)
4268 call mpi_reduce( lbuf, gbuf, sendcnt, sendtype, mpi_max, &
4269 lroot, mpi_comm_world, ierr )
4270 call mpi_check(
'global_max_1i:MPI_Reduce', ierr )
4279 integer,
intent(in),
dimension(:,:) :: lbuf
4280 integer,
intent(out),
dimension(:,:) :: gbuf
4281 integer,
optional,
intent(in) :: mroot, idebug
4284 integer :: i,j,lroot, lidebug
4286 if (.not.
present(mroot))
then 4292 if (.not.
present(idebug))
then 4298 if(
mype.eq.lroot)
then 4299 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
4300 .ne.
'** global_max_2i: size(lbuf,2)size(gbuf,2) ', &
4301 size(lbuf,2),
size(gbuf,2) )
4304 do j=lbound(lbuf,2),ubound(lbuf,2)
4315 integer,
intent(in),
dimension(:,:,:) :: lbuf
4316 integer,
intent(out),
dimension(:,:,:) :: gbuf
4317 integer,
optional,
intent(in) :: mroot, idebug
4320 integer :: j,k,lroot, lidebug
4322 if (.not.
present(mroot))
then 4328 if (.not.
present(idebug))
then 4334 if(
mype.eq.lroot)
then 4335 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
4336 .ne.
'** global_max_3i: size(lbuf,2)size(gbuf,2) ', &
4337 size(lbuf,2),
size(gbuf,2) )
4339 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
4340 .ne.
'** global_max_3i: size(lbuf,3)size(gbuf,3) ', &
4341 size(lbuf,3),
size(gbuf,3) )
4344 do k=lbound(lbuf,3),ubound(lbuf,3)
4345 do j=lbound(lbuf,2),ubound(lbuf,2)
4346 call global_max_1i( lbuf(:,j,k), gbuf(:,j,k), lroot, lidebug )
4357 real,
intent(in) :: lbuf
4358 real,
intent(out) :: gbuf
4359 integer,
optional,
intent(in) :: mroot, idebug
4362 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
4364 if (.not.
present(mroot))
then 4370 if (.not.
present(idebug))
then 4381 call mpi_reduce( lbuf, gbuf, sendcnt, sendtype, mpi_max, &
4382 lroot, mpi_comm_world, ierr )
4383 call mpi_check(
'global_max_0r:MPI_Reduce', ierr )
4393 real,
intent(in),
dimension(:) :: lbuf
4394 real,
intent(out),
dimension(:) :: gbuf
4395 integer,
optional,
intent(in) :: mroot, idebug
4398 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
4400 if (.not.
present(mroot))
then 4406 if (.not.
present(idebug))
then 4415 sendcnt =
size(lbuf)
4417 call mpi_reduce( lbuf, gbuf, sendcnt, sendtype, mpi_max, &
4418 lroot, mpi_comm_world, ierr )
4419 call mpi_check(
'global_max_1r:MPI_Reduce', ierr )
4428 real,
intent(in),
dimension(:,:) :: lbuf
4429 real,
intent(out),
dimension(:,:) :: gbuf
4430 integer,
optional,
intent(in) :: mroot, idebug
4433 integer :: i,j,lroot, lidebug
4435 if (.not.
present(mroot))
then 4441 if (.not.
present(idebug))
then 4447 if(
mype.eq.lroot)
then 4448 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
4449 .ne.
'** global_max_2r: size(lbuf,2)size(gbuf,2) ', &
4450 size(lbuf,2),
size(gbuf,2) )
4453 do j=lbound(lbuf,2),ubound(lbuf,2)
4464 real,
intent(in),
dimension(:,:,:) :: lbuf
4465 real,
intent(out),
dimension(:,:,:) :: gbuf
4466 integer,
optional,
intent(in) :: mroot, idebug
4469 integer :: j,k,lroot, lidebug
4471 if (.not.
present(mroot))
then 4477 if (.not.
present(idebug))
then 4483 if(
mype.eq.lroot)
then 4484 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
4485 .ne.
'** global_max_3i: size(lbuf,2)size(gbuf,2) ', &
4486 size(lbuf,2),
size(gbuf,2) )
4488 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
4489 .ne.
'** global_max_3i: size(lbuf,3)size(gbuf,3) ', &
4490 size(lbuf,3),
size(gbuf,3) )
4493 do k=lbound(lbuf,3),ubound(lbuf,3)
4494 do j=lbound(lbuf,2),ubound(lbuf,2)
4495 call global_max_1r( lbuf(:,j,k), gbuf(:,j,k), lroot, lidebug )
4506 double precision,
intent(in) :: lbuf
4507 double precision,
intent(out) :: gbuf
4508 integer,
optional,
intent(in) :: mroot, idebug
4511 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
4513 if (.not.
present(mroot))
then 4519 if (.not.
present(idebug))
then 4525 recvtype = mpi_double_precision
4530 call mpi_reduce( lbuf, gbuf, sendcnt, sendtype, mpi_max, &
4531 lroot, mpi_comm_world, ierr )
4532 call mpi_check(
'global_max_0d:MPI_Reduce', ierr )
4542 double precision,
intent(in),
dimension(:) :: lbuf
4543 double precision,
intent(out),
dimension(:) :: gbuf
4544 integer,
optional,
intent(in) :: mroot, idebug
4547 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
4549 if (.not.
present(mroot))
then 4555 if (.not.
present(idebug))
then 4561 recvtype = mpi_double_precision
4564 sendcnt =
size(lbuf)
4566 call mpi_reduce( lbuf, gbuf, sendcnt, sendtype, mpi_max, &
4567 lroot, mpi_comm_world, ierr )
4568 call mpi_check(
'global_max_1d:MPI_Reduce', ierr )
4577 double precision,
intent(in),
dimension(:,:) :: lbuf
4578 double precision,
intent(out),
dimension(:,:) :: gbuf
4579 integer,
optional,
intent(in) :: mroot, idebug
4582 integer :: i,j,lroot, lidebug
4584 if (.not.
present(mroot))
then 4590 if (.not.
present(idebug))
then 4596 if(
mype.eq.lroot)
then 4597 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
4598 .ne.
'** global_max_2d: size(lbuf,2)size(gbuf,2) ', &
4599 size(lbuf,2),
size(gbuf,2) )
4602 do j=lbound(lbuf,2),ubound(lbuf,2)
4613 double precision,
intent(in),
dimension(:,:,:) :: lbuf
4614 double precision,
intent(out),
dimension(:,:,:) :: gbuf
4615 integer,
optional,
intent(in) :: mroot, idebug
4618 integer :: j,k,lroot, lidebug
4620 if (.not.
present(mroot))
then 4626 if (.not.
present(idebug))
then 4632 if(
mype.eq.lroot)
then 4633 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
4634 .ne.
'** global_max_3i: size(lbuf,2)size(gbuf,2) ', &
4635 size(lbuf,2),
size(gbuf,2) )
4637 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
4638 .ne.
'** global_max_3i: size(lbuf,3)size(gbuf,3) ', &
4639 size(lbuf,3),
size(gbuf,3) )
4642 do k=lbound(lbuf,3),ubound(lbuf,3)
4643 do j=lbound(lbuf,2),ubound(lbuf,2)
4644 call global_max_1d( lbuf(:,j,k), gbuf(:,j,k), lroot, lidebug )
4655 doubleprecision,
intent(inout) :: gbuf
4656 doubleprecision :: lbuf
4667 doubleprecision,
dimension(:),
intent(inout) :: gbuf
4668 doubleprecision,
dimension(size(gbuf)) :: lbuf
4678 doubleprecision,
dimension(:,:),
intent(inout) :: gbuf
4679 doubleprecision,
dimension(size(gbuf,1),size(gbuf,2)) :: lbuf
4690 doubleprecision,
dimension(:,:,:),
intent(inout) :: gbuf
4691 doubleprecision,
dimension(size(gbuf,1),size(gbuf,2),size(gbuf,3)) :: lbuf
4704 integer,
intent(inout) :: gbuf
4716 integer,
dimension(:),
intent(inout) :: gbuf
4717 integer,
dimension(size(gbuf)) :: lbuf
4727 integer,
dimension(:,:),
intent(inout) :: gbuf
4728 integer,
dimension(size(gbuf,1),size(gbuf,2)) :: lbuf
4739 integer,
dimension(:,:,:),
intent(inout) :: gbuf
4740 integer,
dimension(size(gbuf,1),size(gbuf,2),size(gbuf,3)) :: lbuf
4750 real,
intent(inout) :: gbuf
4761 real,
dimension(:),
intent(inout) :: gbuf
4762 real,
dimension(size(gbuf)) :: lbuf
4772 real,
dimension(:,:),
intent(inout) :: gbuf
4773 real,
dimension(size(gbuf,1),size(gbuf,2)) :: lbuf
4784 real,
dimension(:,:,:),
intent(inout) :: gbuf
4785 real,
dimension(size(gbuf,1),size(gbuf,2),size(gbuf,3)) :: lbuf
4797 integer,
intent(in) :: lbuf
4798 integer,
intent(out) :: gbuf
4799 integer,
optional,
intent(in) :: mroot, idebug
4802 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
4804 if (.not.
present(mroot))
then 4810 if (.not.
present(idebug))
then 4816 recvtype = mpi_integer
4821 call mpi_allreduce( lbuf, gbuf, sendcnt, sendtype, mpi_max, &
4822 mpi_comm_world, ierr )
4823 call mpi_check(
'global_all_max_0i:MPI_Allreduce', ierr )
4833 integer,
intent(in),
dimension(:) :: lbuf
4834 integer,
intent(out),
dimension(:) :: gbuf
4835 integer,
optional,
intent(in) :: mroot, idebug
4838 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
4840 if (.not.
present(mroot))
then 4846 if (.not.
present(idebug))
then 4852 recvtype = mpi_integer
4855 sendcnt =
size(lbuf)
4857 call mpi_allreduce( lbuf, gbuf, sendcnt, sendtype, mpi_max, &
4858 mpi_comm_world, ierr )
4859 call mpi_check(
'global_all_max_1i:MPI_Allreduce', ierr )
4868 integer,
intent(in),
dimension(:,:) :: lbuf
4869 integer,
intent(out),
dimension(:,:) :: gbuf
4870 integer,
optional,
intent(in) :: mroot, idebug
4873 integer :: i,j,lroot, lidebug
4875 if (.not.
present(mroot))
then 4881 if (.not.
present(idebug))
then 4887 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
4888 .ne.
'** global_all_max_2i: size(lbuf,2)size(gbuf,2) ', &
4889 size(lbuf,2),
size(gbuf,2) )
4891 do j=lbound(lbuf,2),ubound(lbuf,2)
4902 integer,
intent(in),
dimension(:,:,:) :: lbuf
4903 integer,
intent(out),
dimension(:,:,:) :: gbuf
4904 integer,
optional,
intent(in) :: mroot, idebug
4907 integer :: j,k,lroot, lidebug
4909 if (.not.
present(mroot))
then 4915 if (.not.
present(idebug))
then 4921 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
4922 .ne.
'** global_all_max_3i: size(lbuf,2)size(gbuf,2) ', &
4923 size(lbuf,2),
size(gbuf,2) )
4925 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
4926 .ne.
'** global_all_max_3i: size(lbuf,3)size(gbuf,3) ', &
4927 size(lbuf,3),
size(gbuf,3) )
4929 do k=lbound(lbuf,3),ubound(lbuf,3)
4930 do j=lbound(lbuf,2),ubound(lbuf,2)
4942 real,
intent(in) :: lbuf
4943 real,
intent(out) :: gbuf
4944 integer,
optional,
intent(in) :: mroot, idebug
4947 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
4949 if (.not.
present(mroot))
then 4955 if (.not.
present(idebug))
then 4966 call mpi_allreduce( lbuf, gbuf, sendcnt, sendtype, mpi_max, &
4967 mpi_comm_world, ierr )
4968 call mpi_check(
'global_all_max_0r:MPI_Allreduce', ierr )
4978 real,
intent(in),
dimension(:) :: lbuf
4979 real,
intent(out),
dimension(:) :: gbuf
4980 integer,
optional,
intent(in) :: mroot, idebug
4983 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
4985 if (.not.
present(mroot))
then 4991 if (.not.
present(idebug))
then 5000 sendcnt =
size(lbuf)
5002 call mpi_allreduce( lbuf, gbuf, sendcnt, sendtype, mpi_max, &
5003 mpi_comm_world, ierr )
5004 call mpi_check(
'global_all_max_1r:MPI_Allreduce', ierr )
5013 real,
intent(in),
dimension(:,:) :: lbuf
5014 real,
intent(out),
dimension(:,:) :: gbuf
5015 integer,
optional,
intent(in) :: mroot, idebug
5018 integer :: i,j,lroot, lidebug
5020 if (.not.
present(mroot))
then 5026 if (.not.
present(idebug))
then 5032 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
5033 .ne.
'** global_all_max_2r: size(lbuf,2)size(gbuf,2) ', &
5034 size(lbuf,2),
size(gbuf,2) )
5036 do j=lbound(lbuf,2),ubound(lbuf,2)
5047 real,
intent(in),
dimension(:,:,:) :: lbuf
5048 real,
intent(out),
dimension(:,:,:) :: gbuf
5049 integer,
optional,
intent(in) :: mroot, idebug
5052 integer :: j,k,lroot, lidebug
5054 if (.not.
present(mroot))
then 5060 if (.not.
present(idebug))
then 5066 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
5067 .ne.
'** global_all_max_3i: size(lbuf,2)size(gbuf,2) ', &
5068 size(lbuf,2),
size(gbuf,2) )
5070 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
5071 .ne.
'** global_all_max_3i: size(lbuf,3)size(gbuf,3) ', &
5072 size(lbuf,3),
size(gbuf,3) )
5074 do k=lbound(lbuf,3),ubound(lbuf,3)
5075 do j=lbound(lbuf,2),ubound(lbuf,2)
5087 double precision,
intent(in) :: lbuf
5088 double precision,
intent(out) :: gbuf
5089 integer,
optional,
intent(in) :: mroot, idebug
5092 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
5094 if (.not.
present(mroot))
then 5100 if (.not.
present(idebug))
then 5106 recvtype = mpi_double_precision
5111 call mpi_allreduce( lbuf, gbuf, sendcnt, sendtype, mpi_max, &
5112 mpi_comm_world, ierr )
5113 call mpi_check(
'global_all_max_0d:MPI_Allreduce', ierr )
5123 double precision,
intent(in),
dimension(:) :: lbuf
5124 double precision,
intent(out),
dimension(:) :: gbuf
5125 integer,
optional,
intent(in) :: mroot, idebug
5128 integer :: recvtype, sendtype, sendcnt, ierr,lroot, lidebug
5130 if (.not.
present(mroot))
then 5136 if (.not.
present(idebug))
then 5142 recvtype = mpi_double_precision
5145 sendcnt =
size(lbuf)
5147 call mpi_allreduce( lbuf, gbuf, sendcnt, sendtype, mpi_max, &
5148 mpi_comm_world, ierr )
5149 call mpi_check(
'global_all_max_1d:MPI_Allreduce', ierr )
5158 double precision,
intent(in),
dimension(:,:) :: lbuf
5159 double precision,
intent(out),
dimension(:,:) :: gbuf
5160 integer,
optional,
intent(in) :: mroot, idebug
5163 integer :: i,j,lroot, lidebug
5165 if (.not.
present(mroot))
then 5171 if (.not.
present(idebug))
then 5177 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
5178 .ne.
'** global_all_max_2d: size(lbuf,2)size(gbuf,2) ', &
5179 size(lbuf,2),
size(gbuf,2) )
5181 do j=lbound(lbuf,2),ubound(lbuf,2)
5192 double precision,
intent(in),
dimension(:,:,:) :: lbuf
5193 double precision,
intent(out),
dimension(:,:,:) :: gbuf
5194 integer,
optional,
intent(in) :: mroot, idebug
5197 integer :: j,k,lroot, lidebug
5199 if (.not.
present(mroot))
then 5205 if (.not.
present(idebug))
then 5211 call assert(
size(lbuf,2).eq.
size(gbuf,2), &
5212 .ne.
'** global_all_max_3i: size(lbuf,2)size(gbuf,2) ', &
5213 size(lbuf,2),
size(gbuf,2) )
5215 call assert(
size(lbuf,3).eq.
size(gbuf,3), &
5216 .ne.
'** global_all_max_3i: size(lbuf,3)size(gbuf,3) ', &
5217 size(lbuf,3),
size(gbuf,3) )
5219 do k=lbound(lbuf,3),ubound(lbuf,3)
5220 do j=lbound(lbuf,2),ubound(lbuf,2)
5234 logical,
intent(inout) :: gbuf
5245 logical,
dimension(:),
intent(inout) :: gbuf
5246 logical,
dimension(size(gbuf)) :: lbuf
5256 logical,
intent(inout) :: gbuf
5267 logical,
dimension(:),
intent(inout) :: gbuf
5268 logical,
dimension(size(gbuf)) :: lbuf
5279 logical,
intent(in) :: lvalue
5280 logical,
intent(out) :: gvalue
5281 integer,
optional,
intent(in) :: mroot, idebug
5287 integer :: ierror, icount
5288 integer :: lroot, lidebug
5290 if (.not.
present(mroot))
then 5296 if (.not.
present(idebug))
then 5304 call mpi_allreduce( lvalue, gvalue, icount, mpi_logical, &
5305 mpi_land, mpi_comm_world, ierror )
5307 call mpi_check(
'global_all_and_0d ', ierror )
5316 logical,
intent(in),
dimension(:) :: lvalue
5317 logical,
intent(out),
dimension(:) :: gvalue
5318 integer,
optional,
intent(in) :: mroot, idebug
5324 integer :: ierror, icount
5325 integer :: lroot, lidebug
5327 if (.not.
present(mroot))
then 5333 if (.not.
present(idebug))
then 5340 icount =
size( lvalue )
5342 call mpi_allreduce( lvalue, gvalue, icount, mpi_logical, &
5343 mpi_land, mpi_comm_world, ierror )
5345 call mpi_check(
'global_all_and_1d ', ierror )
5355 logical,
intent(in) :: lvalue
5356 logical,
intent(out) :: gvalue
5357 integer,
optional,
intent(in) :: mroot, idebug
5363 integer :: ierror, icount
5364 integer :: lroot, lidebug
5366 if (.not.
present(mroot))
then 5372 if (.not.
present(idebug))
then 5381 call mpi_allreduce( lvalue, gvalue, icount, mpi_logical, &
5382 mpi_lor, mpi_comm_world, ierror )
5384 call mpi_check(
'global_all_or_0d ', ierror )
5393 logical,
intent(in),
dimension(:) :: lvalue
5394 logical,
intent(out),
dimension(:) :: gvalue
5395 integer,
optional,
intent(in) :: mroot, idebug
5401 integer :: ierror, icount
5402 integer :: lroot, lidebug
5404 if (.not.
present(mroot))
then 5410 if (.not.
present(idebug))
then 5417 icount =
size( lvalue )
5419 call mpi_allreduce( lvalue, gvalue, icount, mpi_logical, &
5420 mpi_lor, mpi_comm_world, ierror )
5422 call mpi_check(
'global_all_or_1d ', ierror )
5443 INTEGER,
optional,
intent(in) :: MyID
5447 INTEGER :: ERRORCODE
5451 LOGICAL,
PARAMETER :: FORCED_ABORT = .false.
5454 CHARACTER(len=64) :: myID_c
5458 myid_l= merge(myid,
mype,
PRESENT(myid))
5459 myid_c=
'';
WRITE(myid_c,*) myid_l
5465 IF(forced_abort)
THEN 5466 errorcode = 100 +
mype 5467 CALL mpi_abort(mpi_comm_world, errorcode,
mpierr)
5468 WRITE(*,2000) myid_c,
mpierr 5475 CALL mpi_barrier(mpi_comm_world,
mpierr)
5476 CALL mpi_finalize(
mpierr)
5486 1000
FORMAT(2/,1
x,
'MPI Terminated.')
5487 2000
FORMAT(2/,1
x,
'Rank ',a,
' :: MPI_ABORT CODE = ',i4)
integer, dimension(:), allocatable istart1_all
subroutine global_all_min_onevar_2r(gbuf)
subroutine allgather_1d(lbuf, gbuf, idebug)
subroutine global_all_sum_onevar_0i(gbuf)
subroutine global_all_min_2i(lbuf, gbuf, mroot, idebug)
integer, dimension(:), allocatable kstart1_all
subroutine global_all_and_onevar_1d(gbuf)
subroutine bcast_1l(buffer, mroot, idebug)
subroutine global_all_max_3d(lbuf, gbuf, mroot, idebug)
subroutine global_all_max_onevar_3r(gbuf)
subroutine global_all_sum_3r(lbuf, gbuf, mroot, idebug)
subroutine global_all_and_onevar_0d(gbuf)
subroutine global_all_min_onevar_1d(gbuf)
subroutine global_max_1i(lbuf, gbuf, mroot, idebug)
subroutine gather_1d(lbuf, gbuf, mroot, idebug)
subroutine global_all_max_2d(lbuf, gbuf, mroot, idebug)
subroutine global_all_min_onevar_0i(gbuf)
subroutine global_sum_0i(lbuf, gbuf, mroot, idebug)
subroutine global_all_max_onevar_1d(gbuf)
subroutine global_all_max_onevar_1i(gbuf)
subroutine global_all_max_onevar_2r(gbuf)
integer background_ijkend3
subroutine global_min_1r(lbuf, gbuf, mroot, idebug)
integer, dimension(:), allocatable kend1_all
subroutine global_max_3r(lbuf, gbuf, mroot, idebug)
subroutine global_all_sum_onevar_3d(gbuf)
subroutine scatter_1l(lbuf, gbuf, mroot, idebug)
subroutine scatter_2r(lbuf, gbuf, mroot, idebug)
subroutine bcast_0c(buffer, mroot, idebug)
subroutine global_min_2r(lbuf, gbuf, mroot, idebug)
subroutine global_max_2r(lbuf, gbuf, mroot, idebug)
subroutine bcast_1i(buffer, mroot, idebug)
subroutine bcast_3i(buffer, mroot, idebug)
subroutine gatherv_1d(lbuf, sendcnt, gbuf, rcount, disp, mroot, idebug)
subroutine bcast_1r(buffer, mroot, idebug)
subroutine global_sum_3r(lbuf, gbuf, mroot, idebug)
subroutine global_all_min_1d(lbuf, gbuf, mroot, idebug)
subroutine global_sum_3i(lbuf, gbuf, mroot, idebug)
subroutine bcast_2i(buffer, mroot, idebug)
subroutine global_all_sum_onevar_1r(gbuf)
subroutine gather_2i(lbuf, gbuf, mroot, idebug)
subroutine global_all_or_0d(lvalue, gvalue, mroot, idebug)
subroutine global_all_max_0d(lbuf, gbuf, mroot, idebug)
subroutine bcast_0l(buffer, mroot, idebug)
subroutine global_all_min_onevar_3r(gbuf)
integer, dimension(:), allocatable iend3_all
subroutine global_all_sum_1r(lbuf, gbuf, mroot, idebug)
subroutine bcast_3d(buffer, mroot, idebug)
subroutine global_all_min_onevar_3d(gbuf)
subroutine global_all_sum_3i(lbuf, gbuf, mroot, idebug)
subroutine global_sum_2i(lbuf, gbuf, mroot, idebug)
subroutine global_all_min_2d(lbuf, gbuf, mroot, idebug)
subroutine global_all_min_onevar_2i(gbuf)
subroutine global_all_min_2r(lbuf, gbuf, mroot, idebug)
subroutine global_all_min_onevar_0r(gbuf)
subroutine global_all_sum_2d(lbuf, gbuf, mroot, idebug)
subroutine bcast_1c(buffer, mroot, idebug)
subroutine global_all_or_onevar_0d(gbuf)
subroutine global_all_min_0d(lbuf, gbuf, mroot, idebug)
subroutine allgather_1i(lbuf, gbuf, idebug)
subroutine scatter_1r(lbuf, gbuf, mroot, idebug)
subroutine global_all_min_onevar_1r(gbuf)
subroutine global_all_sum_onevar_3i(gbuf)
subroutine gather_2r(lbuf, gbuf, mroot, idebug)
subroutine bcast_2d(buffer, mroot, idebug)
subroutine global_all_max_3i(lbuf, gbuf, mroot, idebug)
subroutine global_all_sum_0d(lbuf, gbuf, mroot, idebug)
subroutine global_all_min_1i(lbuf, gbuf, mroot, idebug)
subroutine global_all_min_1r(lbuf, gbuf, mroot, idebug)
subroutine global_all_sum_onevar_1i(gbuf)
subroutine global_all_sum_onevar_2d(gbuf)
subroutine global_all_sum_0r(lbuf, gbuf, mroot, idebug)
subroutine global_max_0i(lbuf, gbuf, mroot, idebug)
subroutine global_min_1i(lbuf, gbuf, mroot, idebug)
subroutine global_min_0d(lbuf, gbuf, mroot, idebug)
subroutine gather_1i(lbuf, gbuf, mroot, idebug)
subroutine global_all_min_3d(lbuf, gbuf, mroot, idebug)
subroutine global_all_min_3i(lbuf, gbuf, mroot, idebug)
subroutine global_all_max_onevar_1r(gbuf)
subroutine global_all_sum_onevar_0r(gbuf)
integer, dimension(:), allocatable kstart3_all
integer, dimension(:), allocatable istart3_all
subroutine global_all_max_onevar_3i(gbuf)
subroutine global_all_min_0r(lbuf, gbuf, mroot, idebug)
subroutine global_sum_0d(lbuf, gbuf, mroot, idebug)
subroutine global_sum_2r(lbuf, gbuf, mroot, idebug)
subroutine bcast_2r(buffer, mroot, idebug)
subroutine global_all_sum_onevar_2i(gbuf)
subroutine global_min_3r(lbuf, gbuf, mroot, idebug)
subroutine global_all_sum_2i(lbuf, gbuf, mroot, idebug)
integer, dimension(:), allocatable jstart3_all
subroutine gather_2d(lbuf, gbuf, mroot, idebug)
subroutine global_all_max_1d(lbuf, gbuf, mroot, idebug)
subroutine global_all_max_onevar_2d(gbuf)
subroutine scatter_3i(lbuf, gbuf, mroot, idebug)
subroutine global_all_sum_onevar_1d(gbuf)
subroutine global_max_2d(lbuf, gbuf, mroot, idebug)
subroutine global_all_max_0i(lbuf, gbuf, mroot, idebug)
subroutine global_max_2i(lbuf, gbuf, mroot, idebug)
subroutine gather_3r(lbuf, gbuf, mroot, idebug)
subroutine scatter_3d(lbuf, gbuf, mroot, idebug)
subroutine global_min_0r(lbuf, gbuf, mroot, idebug)
subroutine global_sum_1d(lbuf, gbuf, mroot, idebug)
subroutine global_sum_1i(lbuf, gbuf, mroot, idebug)
integer, parameter unit_log
subroutine global_min_1d(lbuf, gbuf, mroot, idebug)
subroutine global_min_2d(lbuf, gbuf, mroot, idebug)
subroutine global_all_max_3r(lbuf, gbuf, mroot, idebug)
subroutine mpi_check(msg, ierr)
subroutine global_all_min_onevar_2d(gbuf)
integer, dimension(:), allocatable jstart1_all
subroutine global_max_3i(lbuf, gbuf, mroot, idebug)
subroutine global_all_and_1d(lvalue, gvalue, mroot, idebug)
subroutine global_all_max_0r(lbuf, gbuf, mroot, idebug)
subroutine global_min_3i(lbuf, gbuf, mroot, idebug)
integer, dimension(:), allocatable kend3_all
subroutine bcast_0i(buffer, mroot, idebug)
subroutine bcast_3r(buffer, mroot, idebug)
subroutine global_all_max_2i(lbuf, gbuf, mroot, idebug)
subroutine global_all_min_3r(lbuf, gbuf, mroot, idebug)
subroutine global_max_1r(lbuf, gbuf, mroot, idebug)
integer, dimension(:), allocatable jend3_all
subroutine global_all_sum_1d(lbuf, gbuf, mroot, idebug)
subroutine global_all_or_onevar_1d(gbuf)
integer, dimension(:), allocatable jend1_all
subroutine gather_1c(lbuf, gbuf, mroot, idebug)
subroutine global_all_sum_0i(lbuf, gbuf, mroot, idebug)
subroutine scatter_1c(lbuf, gbuf, mroot, idebug)
subroutine scatter_2i(lbuf, gbuf, mroot, idebug)
subroutine global_sum_2d(lbuf, gbuf, mroot, idebug)
subroutine global_sum_1r(lbuf, gbuf, mroot, idebug)
subroutine global_all_min_0i(lbuf, gbuf, mroot, idebug)
subroutine global_max_1d(lbuf, gbuf, mroot, idebug)
subroutine scatter_2d(lbuf, gbuf, mroot, idebug)
subroutine global_all_max_onevar_0i(gbuf)
subroutine global_all_max_onevar_3d(gbuf)
subroutine global_all_sum_2r(lbuf, gbuf, mroot, idebug)
subroutine global_all_max_onevar_0r(gbuf)
subroutine gather_1l(lbuf, gbuf, mroot, idebug)
subroutine global_all_max_onevar_2i(gbuf)
subroutine global_all_and_0d(lvalue, gvalue, mroot, idebug)
subroutine bcast_0d(buffer, mroot, idebug)
subroutine scatter_1d(lbuf, gbuf, mroot, idebug)
integer, dimension(:), allocatable displs
subroutine gather_3d(lbuf, gbuf, mroot, idebug)
subroutine bcast_0r(buffer, mroot, idebug)
subroutine global_all_max_2r(lbuf, gbuf, mroot, idebug)
subroutine scatter_3r(lbuf, gbuf, mroot, idebug)
subroutine gather_3i(lbuf, gbuf, mroot, idebug)
subroutine bcast_1d(buffer, mroot, idebug)
subroutine global_min_3d(lbuf, gbuf, mroot, idebug)
subroutine scatter_1i(lbuf, gbuf, mroot, idebug)
subroutine global_all_sum_onevar_0d(gbuf)
subroutine global_sum_0r(lbuf, gbuf, mroot, idebug)
subroutine global_all_sum_3d(lbuf, gbuf, mroot, idebug)
subroutine global_all_max_1i(lbuf, gbuf, mroot, idebug)
subroutine global_all_max_onevar_0d(gbuf)
subroutine global_max_0r(lbuf, gbuf, mroot, idebug)
subroutine global_all_min_onevar_0d(gbuf)
integer, dimension(:), allocatable ijksize3_all
subroutine global_all_max_1r(lbuf, gbuf, mroot, idebug)
subroutine global_sum_3d(lbuf, gbuf, mroot, idebug)
subroutine global_all_min_onevar_1i(gbuf)
subroutine global_all_sum_onevar_2r(gbuf)
subroutine global_all_or_1d(lvalue, gvalue, mroot, idebug)
integer, dimension(:), allocatable iend1_all
double precision, dimension(:), allocatable x
subroutine global_min_0i(lbuf, gbuf, mroot, idebug)
subroutine global_max_0d(lbuf, gbuf, mroot, idebug)
subroutine global_all_sum_onevar_3r(gbuf)
subroutine gatherv_1i(lbuf, sendcnt, gbuf, rcount, disp, mroot, idebug)
subroutine global_min_2i(lbuf, gbuf, mroot, idebug)
subroutine global_max_3d(lbuf, gbuf, mroot, idebug)
subroutine global_all_sum_1i(lbuf, gbuf, mroot, idebug)
subroutine global_all_min_onevar_3i(gbuf)
subroutine gather_1r(lbuf, gbuf, mroot, idebug)