45 USE spmd_comm_world_mod,
ONLY : spmd_comm_world
46#include "implicit_f.inc"
61 INTEGER :: NBINTC,FLAG
62 INTEGER IPARI(NPARI,*),INTLIST(*)
64 TYPE(intbuf_struct_) INTBUF_TAB(*)
76 INTEGER :: STATUS(MPI_STATUS_SIZE),REQ_S(PARASIZ),REQ_R(PARASIZ)
77 INTEGER :: P,LENSD,LENRV,IADS(PARASIZ+1),IADR(PARASIZ
78,MSGTYP,IDEB(NINTER),PROC,MSGOFF
81 INTEGER :: I,J,L,NB,NL,NN,K,N,NOD,LEN,ND,NIN,NTY,
85INTEGER,
DIMENSION(NINTER) :: LLL
86 INTEGER,
DIMENSION(:),
ALLOCATABLE :: BBUFS, BBUFR
91 SAVE iads,iadr,bbufs,bbufr,req_s,
92 * req_r,ilen,rlen,len,lensd,lenrv
162 IF(nty==10 .OR.(nty==7.AND.itied/=0))
THEN
163 lensd = lensd +
nsnfi(nin)%P(p)
164 lenrv = lenrv +
nsnsi(nin)%P(p)
169 iadr(nspmd+1)=lenrv+1
172 ALLOCATE(bbufs(lensd))
176 ALLOCATE(bbufr(lenrv))
182 siz=iadr(p+1)-iadr(p)
185 CALL mpi_irecv( bbufr(iadr(p)),siz,mpi_integer,it_spmd(p),msgtyp,
186 . spmd_comm_world,req_r(p),ierror )
196 IF (p/= loc_proc)
THEN
200 itied = ipari(85,nin)
203 IF(nty==10) len_candf=6
204 IF(nty==10 .OR. (nty==7.AND.itied/=0))
THEN
208 numero=numero+
nsnfi(nin)%P(p2)
212 DO nn=1,intbuf_tab(nin)%I_STOK(1)
213 nii = intbuf_tab(nin)%CAND_N(nn)
217 . .AND. ((nii-nsn)>numero)
218 . .AND. ((nii-nsn)<=numero+
nsnfi(nin)%P(p)) )
THEN
220 IF(intbuf_tab(nin)%CAND_F(len_candf*(nn-1)+1)/=zero)
THEN
221 bbufs(l-1+nii-nsn-numero)= 1
233 CALL mpi_isend(bbufs(iads(p)),siz,mpi_integer,it_spmd(p),msgtyp,
234 . spmd_comm_world,req_s(p),ierror)
251 itied = ipari(85,nin)
253 IF(nty==10 .OR. (nty==7.AND.itied/=0))
THEN
260 siz=iadr(p+1)-iadr(p)
263 CALL mpi_wait(req_r(p),status,ierror)
267 itied = ipari(85,nin)
272 numero=numero+
nsnsi(nin)%P(p2)
274 IF(nty==10 .OR. (nty==7.AND.itied/=0))
THEN
278 ll = bbufr(iadr(p)+l)
280 sn=
nsvsi(nin)%P(k+ideb(nin))
286 ideb(nin)=ideb(nin)+nb
296 siz=iads(p+1)-iads(p)
299 CALL mpi_wait(req_s(p),status,ierror)
303 IF (
ALLOCATED(bbufs))
DEALLOCATE(bbufs)
304 IF (
ALLOCATED(bbufr))
DEALLOCATE(bbufr)
subroutine mpi_isend(buf, cnt, datatype, dest, tag, comm, ireq, ierr)
subroutine mpi_irecv(buf, cnt, datatype, source, tag, comm, ireq, ierr)