35
36
37
39
40
41
42 USE spmd_comm_world_mod, ONLY : spmd_comm_world
43#include "implicit_f.inc"
44
45
46
47#include "spmd.inc"
48
49
50
51#include "com01_c.inc"
52#include "com04_c.inc"
53#include "task_c.inc"
54#include "timeri_c.inc"
55
56
57
58 INTEGER ::
59 . ISENDTO(NINTER+1,*), IRCVFROM(NINTER+1,*), NIN
60
62 . bminmal(6), bminmal_spmd(6, nspmd)
63
64
65
66#ifdef MPI
67 INTEGER MSGTYP, LOC_PROC,P, MSGOFF,
68 . STATUS(MPI_STATUS_SIZE),IERROR,REQ_SB(NSPMD),
69 . REQ_RB(NSPMD),KK,NBIRECV,IRINDEXI(NSPMD),
70 . REQ_RD(NSPMD),REQ_SD(NSPMD),REQ_SD2(NSPMD),
71 . REQ_RC(NSPMD),REQ_SC(NSPMD),
72 . ISINDEXI(NSPMD),
73 . NBX,NBY,NBZ
75 . bminma(6,nspmd),
76 . xmaxb,ymaxb,zmaxb,xminb,yminb,zminb
78 . dx, dy, dz,
79 . xmin,ymin,zmin,xmax,
ymax,zmax
80 LOGICAL ::
81 . TEST
82 DATA msgoff/142/
83
84
85
86
87
88
89
90
91 IF(nspmd == 1)RETURN
92 loc_proc = ispmd + 1
93
94
95
96 bminma(1,loc_proc) = bminmal(1)
97 bminma(2,loc_proc) = bminmal(2)
98 bminma(3,loc_proc) = bminmal(3)
99 bminma(4,loc_proc) = bminmal(4)
100 bminma(5,loc_proc) = bminmal(5)
101 bminma(6,loc_proc) = bminmal(6)
102
103
104
105 DO p = 1, nspmd
106 IF(p/=loc_proc) THEN
107 msgtyp = msgoff
109 . bminma(1,loc_proc),6 ,real ,it_spmd(p),msgtyp,
110 . spmd_comm_world ,req_sb(p),ierror)
111 ENDIF
112 ENDDO
113
114
115
116 nbirecv=0
117 DO p = 1, nspmd
118 IF(loc_proc/=p) THEN
119 nbirecv=nbirecv+1
120 irindexi(nbirecv)=p
121 msgtyp = msgoff
123 . bminma(1,p) ,6 ,real ,it_spmd(p),msgtyp,
124 . spmd_comm_world,status,ierror)
125 ENDIF
126 ENDDO
127
128
129
130 DO p = 1, nspmd
131 IF(p/=loc_proc) THEN
132 CALL mpi_wait(req_sb(p),status,ierror)
133 ENDIF
134 ENDDO
135
136
137 bminmal_spmd = bminma
138#endif
139 RETURN
subroutine ymax(idn, fac, npc, pld, stiffmin, stiffmax, stiffini, stiffavg)
subroutine mpi_recv(buf, cnt, datatype, source, tag, comm, status, ierr)
subroutine mpi_isend(buf, cnt, datatype, dest, tag, comm, ireq, ierr)
subroutine mpi_wait(ireq, status, ierr)