OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_sd_cj_1.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_1 (a, ljoint, fr_cj, iadcj, icsize, tag_lnk_sms)

Function/Subroutine Documentation

◆ spmd_sd_cj_1()

subroutine spmd_sd_cj_1 ( a,
integer, dimension(*) ljoint,
integer, dimension(*) fr_cj,
integer, dimension(nspmd+1,*) iadcj,
integer icsize,
integer, dimension(*) tag_lnk_sms )

Definition at line 33 of file spmd_sd_cj_1.F.

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