OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_sd_cj_1.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23C
24!||====================================================================
25!|| spmd_sd_cj_1 ../engine/source/mpi/kinematic_conditions/spmd_sd_cj_1.F
26!||--- called by ------------------------------------------------------
27!|| sms_cjoint_1 ../engine/source/ams/sms_cjoint.F
28!|| sms_cjoint_2 ../engine/source/ams/sms_cjoint.F
29!||--- calls -----------------------------------------------------
30!||--- uses -----------------------------------------------------
31!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
32!||====================================================================
33 SUBROUTINE spmd_sd_cj_1(A,LJOINT,FR_CJ,IADCJ,ICSIZE,
34 . TAG_LNK_SMS)
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
139 END
#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
subroutine spmd_sd_cj_1(a, ljoint, fr_cj, iadcj, icsize, tag_lnk_sms)