OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_i18kine_macc_com_poff.F File Reference
#include "implicit_f.inc"
#include "spmd.inc"
#include "task_c.inc"
#include "com01_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_i18kine_macc_com_poff (mtf, a, iad_elem, fr_elem, itab)

Function/Subroutine Documentation

◆ spmd_i18kine_macc_com_poff()

subroutine spmd_i18kine_macc_com_poff ( mtf,
a,
integer, dimension(2,*) iad_elem,
integer, dimension(*) fr_elem,
integer, dimension(*) itab )

Definition at line 33 of file spmd_i18kine_macc_com_poff.F.

35C-----------------------------------------------
36C M o d u l e s
37C-----------------------------------------------
38 USE tri7box
39C-----------------------------------------------
40C I m p l i c i t T y p e s
41C-----------------------------------------------
42 USE spmd_comm_world_mod, ONLY : spmd_comm_world
43#include "implicit_f.inc"
44C-----------------------------------------------
45C M e s s a g e P a s s i n g
46C-----------------------------------------------
47#include "spmd.inc"
48C-----------------------------------------------
49C C o m m o n B l o c k s
50C-----------------------------------------------
51#include "task_c.inc"
52#include "com01_c.inc"
53C-----------------------------------------------
54C D u m m y A r g u m e n t s
55C-----------------------------------------------
56 INTEGER IAD_ELEM(2,*), FR_ELEM(*),ITAB(*)
58 * mtf(14,*),a(3,*)
59C-----------------------------------------------
60C L o c a l V a r i a b l e s
61C-----------------------------------------------
62#ifdef MPI
63 INTEGER STATUS(MPI_STATUS_SIZE),
64 * REQ_SI(NSPMD),REQ_RI(NSPMD),MSGTYP,IERROR,MSGOFF
65 INTEGER L,NNOD,P,J,LOC_PROC,PTR,SIZ,NB,NOD
66 INTEGER IADS(NSPMD+1),IADR(NSPMD+1),LENRV
68 * testval
69 my_real ,
70 * DIMENSION(:), ALLOCATABLE :: bbufs,bbufr
71 DATA msgoff/155/
72C--------------------------------------------------------------------
73 lenrv = (iad_elem(1,nspmd+1)-iad_elem(1,1))*4
74 ALLOCATE (bbufs(lenrv),bbufr(lenrv))
75 loc_proc=ispmd+1
76C
77 bbufr=-1.
78C Preparation du recv
79 iadr(1) = 1
80 l=1
81 DO p=1,nspmd
82 iadr(p) = l
83 siz = (iad_elem(1,p+1)-iad_elem(1,p))*4
84 IF(siz/=0)THEN
85 msgtyp = msgoff
86 CALL mpi_irecv(
87 s bbufr(l),siz,real,it_spmd(p),msgtyp,
88 g spmd_comm_world,req_ri(p),ierror)
89 l = l + siz
90 ENDIF
91 END DO
92 iadr(nspmd+1) = l
93
94
95 l=1
96 nnod=0
97 DO p=1,nspmd
98 iads(p)=l
99 DO j=iad_elem(1,p),iad_elem(1,p+1)-1
100 nod = fr_elem(j)
101 bbufs(l) = mtf(1,nod)
102 bbufs(l+1) = a(1,nod)
103 bbufs(l+2) = a(2,nod)
104 bbufs(l+3) = a(3,nod)
105 l = l + 4
106 ENDDO
107 ENDDO
108 iads(nspmd+1)=l
109
110 DO p=1,nspmd
111 IF(iad_elem(1,p+1)-iad_elem(1,p)>0)THEN
112 msgtyp = msgoff
113 siz=iads(p+1)-iads(p)
114 l=iads(p)
115 CALL mpi_isend(
116 s bbufs(l),siz,real,it_spmd(p),msgtyp,
117 g spmd_comm_world,req_si(p),ierror)
118 ENDIF
119 ENDDO
120C--------------------------------------------------------------------
121C Recv
122
123 DO p = 1, nspmd
124C test si msg necessaire a envoyer a completer par test interface
125 nb = iad_elem(1,p+1)-iad_elem(1,p)
126 IF(nb>0)THEN
127 CALL mpi_wait(req_ri(p),status,ierror)
128 l=iadr(p)
129 DO j=iad_elem(1,p),iad_elem(1,p+1)-1
130 nod = fr_elem(j)
131 IF (bbufr(l) > zero)THEN
132 a(1,nod)=bbufr(l+1)
133 a(2,nod)=bbufr(l+2)
134 a(3,nod)=bbufr(l+3)
135 ENDIF
136 l=l+4
137 ENDDO
138 ENDIF
139 ENDDO
140
141C Fin du send
142 DO p = 1, nspmd
143 siz=iads(p+1)-iads(p)
144 IF(siz>0) THEN
145 CALL mpi_wait(req_si(p),status,ierror)
146 ENDIF
147 ENDDO
148#endif
149 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine mpi_isend(buf, cnt, datatype, dest, tag, comm, ireq, ierr)
Definition mpi.f:382
subroutine mpi_wait(ireq, status, ierr)
Definition mpi.f:525
subroutine mpi_irecv(buf, cnt, datatype, source, tag, comm, ireq, ierr)
Definition mpi.f:372