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

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_sd_cj_2 (nod2add, ljoint, fr_cj, iadcj, icsize, tag_lnk_sms, nodnx_sms, indx1_sms)

Function/Subroutine Documentation

◆ spmd_sd_cj_2()

subroutine spmd_sd_cj_2 ( integer, dimension(*) nod2add,
integer, dimension(*) ljoint,
integer, dimension(*) fr_cj,
integer, dimension(nspmd+1,*) iadcj,
integer icsize,
integer, dimension(*) tag_lnk_sms,
integer, dimension(*) nodnx_sms,
integer, dimension(*) indx1_sms )

Definition at line 33 of file spmd_sd_cj_2.F.

35C envoi de p0 vers les autres procs de A, AR, V, VR
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"
52#include "sms_c.inc"
53C-----------------------------------------------
54C D u m m y A r g u m e n t s
55C-----------------------------------------------
56 INTEGER ICSIZE, NOD2ADD(*),LJOINT(*),FR_CJ(*),
57 . IADCJ(NSPMD+1,*), TAG_LNK_SMS(*), NODNX_SMS(*),
58 . INDX1_SMS(*)
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),IBUF(ICSIZE)
67 DATA msgoff/104/
68C-----------------------------------------------
69C S o u r c e L i n e s
70C-----------------------------------------------
71 loc_proc = ispmd + 1
72 IF (loc_proc==1) THEN
73 l = 0
74 ideb = 1
75
76 DO i = 2, nspmd
77 len(i)=0
78 DO n=1,njoint
79 IF(tag_lnk_sms(n)/=0)
80 . len(i) = len(i)+iadcj(i+1,n)-iadcj(i,n)
81 END DO
82 IF(len(i)>0) THEN
83 l=l+1
84 indexi(l)=i
85 DO n=1,njoint
86 IF(tag_lnk_sms(n)==0)cycle
87 DO j = iadcj(i,n), iadcj(i+1,n)-1
88 nod = fr_cj(j)
89 ibuf(ideb ) = nod2add(nod)
90 ideb = ideb + 1
91 END DO
92 END DO
93 END IF
94 END DO
95 nbindex = l
96C
97 ideb = 1
98
99 DO l=1,nbindex
100 i = indexi(l)
101 siz = len(i)
102 msgtyp = msgoff
103 CALL mpi_isend(
104 s ibuf(ideb),siz,mpi_integer,it_spmd(i),msgtyp,
105 g spmd_comm_world,req_s(l),ierror)
106 ideb = ideb + siz
107 END DO
108C
109 DO l=1,nbindex
110 CALL mpi_waitany(nbindex,req_s,i,status,ierror)
111 ENDDO
112 ELSEIF(icsize>0) THEN
113C proc <> 0
114 ideb = 1
115 siz = icsize
116 msgtyp = msgoff
117 CALL mpi_recv(
118 s ibuf,siz,mpi_integer,it_spmd(1),msgtyp,
119 g spmd_comm_world,status,ierror)
120 DO n = 1, njoint
121 IF(tag_lnk_sms(n)==0)cycle
122 DO j = iadcj(1,n),iadcj(nspmd+1,n)-1
123 nod = fr_cj(j)
124 IF(nodnx_sms(nod)==0.AND.nod2add(nod)==0.AND.
125 . ibuf(ideb)/=0)THEN
126 nindx1_sms=nindx1_sms+1
127 indx1_sms(nindx1_sms)=nod
128 nodnx_sms(nod)=nindx1_sms
129 nod2add(nod)=1
130 END IF
131 ideb = ideb + 1
132 END DO
133 END DO
134 END IF
135C
136#endif
137 RETURN
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