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

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_sd_cj_0 (ar, v, vr, ljoint, fr_cj, iadcj, icsize, tag_lnk_sms)

Function/Subroutine Documentation

◆ spmd_sd_cj_0()

subroutine spmd_sd_cj_0 ( ar,
v,
vr,
integer, dimension(*) ljoint,
integer, dimension(*) fr_cj,
integer, dimension(nspmd+1,*) iadcj,
integer icsize,
integer, dimension(*) tag_lnk_sms )

Definition at line 32 of file spmd_sd_cj_0.F.

34C envoi de p0 vers les autres procs de A, AR, V, VR
35C apres traitement des joints cylindriques
36C-----------------------------------------------
37C I m p l i c i t T y p e s
38C-----------------------------------------------
39 USE spmd_comm_world_mod, ONLY : spmd_comm_world
40#include "implicit_f.inc"
41C-----------------------------------------------------------------
42C M e s s a g e P a s s i n g
43C-----------------------------------------------
44#include "spmd.inc"
45C-----------------------------------------------
46C C o m m o n B l o c k s
47C-----------------------------------------------
48#include "com01_c.inc"
49#include "com04_c.inc"
50#include "task_c.inc"
51C-----------------------------------------------
52C D u m m y A r g u m e n t s
53C-----------------------------------------------
54 INTEGER ICSIZE, LJOINT(*),FR_CJ(*), IADCJ(NSPMD+1,*),
55 . TAG_LNK_SMS(*)
57 . ar(3,*),v(3,*),vr(3,*)
58C-----------------------------------------------
59C L o c a l V a r i a b l e s
60C-----------------------------------------------
61#ifdef MPI
62 INTEGER MSGTYP,MSGOFF,IERROR,LOC_PROC,NOD,L,I,J,N,
63 . IDEB,IAD,SIZ,A_AR,NBINDEX,
64 . INDEXI(NSPMD),REQ_S(NSPMD),STATUS(MPI_STATUS_SIZE),
65 . LEN(NSPMD)
66 parameter(a_ar = 9)
68 . buf(icsize*a_ar)
69 DATA msgoff/102/
70C-----------------------------------------------
71C S o u r c e L i n e s
72C-----------------------------------------------
73 loc_proc = ispmd + 1
74 IF (loc_proc==1) THEN
75 l = 0
76 ideb = 1
77
78 DO i = 2, nspmd
79 len(i)=0
80 DO n=1,njoint
81 IF(tag_lnk_sms(n)/=0)
82 . len(i) = len(i)+iadcj(i+1,n)-iadcj(i,n)
83 END DO
84 IF(len(i)>0) THEN
85 l=l+1
86 indexi(l)=i
87 DO n=1,njoint
88 IF(tag_lnk_sms(n)==0)cycle
89 DO j = iadcj(i,n), iadcj(i+1,n)-1
90 nod = fr_cj(j)
91 buf(ideb ) = v(1,nod)
92 buf(ideb+1) = v(2,nod)
93 buf(ideb+2) = v(3,nod)
94 buf(ideb+3) = vr(1,nod)
95 buf(ideb+4) = vr(2,nod)
96 buf(ideb+5) = vr(3,nod)
97 buf(ideb+6) = ar(1,nod)
98 buf(ideb+7) = ar(2,nod)
99 buf(ideb+8) = ar(3,nod)
100 ideb = ideb + a_ar
101 END DO
102 END DO
103 END IF
104 END DO
105 nbindex = l
106C
107 ideb = 1
108
109 DO l=1,nbindex
110 i = indexi(l)
111 siz = len(i)*a_ar
112 msgtyp = msgoff
113 CALL mpi_isend(
114 s buf(ideb),siz,real,it_spmd(i),msgtyp,
115 g spmd_comm_world,req_s(l),ierror)
116 ideb = ideb + siz
117 END DO
118C
119 DO l=1,nbindex
120 CALL mpi_waitany(nbindex,req_s,i,status,ierror)
121 ENDDO
122 ELSEIF(icsize>0) THEN
123C proc <> 0
124 ideb = 1
125 siz = icsize*a_ar
126 msgtyp = msgoff
127 CALL mpi_recv(
128 s buf,siz,real,it_spmd(1),msgtyp,
129 g spmd_comm_world,status,ierror)
130 DO n = 1, njoint
131 IF(tag_lnk_sms(n)==0)cycle
132 DO j = iadcj(1,n),iadcj(nspmd+1,n)-1
133 nod = fr_cj(j)
134 v(1,nod) = buf(ideb)
135 v(2,nod) = buf(ideb+1)
136 v(3,nod) = buf(ideb+2)
137 vr(1,nod)= buf(ideb+3)
138 vr(2,nod)= buf(ideb+4)
139 vr(3,nod)= buf(ideb+5)
140 ar(1,nod)= buf(ideb+6)
141 ar(2,nod)= buf(ideb+7)
142 ar(3,nod)= buf(ideb+8)
143 ideb = ideb + a_ar
144 END DO
145 END DO
146 END IF
147C
148#endif
149 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine mpi_recv(buf, cnt, datatype, source, tag, comm, status, ierr)
Definition mpi.f:461
subroutine mpi_isend(buf, cnt, datatype, dest, tag, comm, ireq, ierr)
Definition mpi.f:382
subroutine mpi_waitany(cnt, array_of_requests, index, status, ierr)
Definition mpi.f:549