OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_i7curvcom.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_i7curvcom ../engine/source/mpi/interfaces/spmd_i7curvcom.f
26!||--- called by ------------------------------------------------------
27!|| i20normnp ../engine/source/interfaces/int20/i20rcurv.F
28!|| i20normp ../engine/source/interfaces/int20/i20curv.F
29!|| i20normsp ../engine/source/interfaces/int20/i20curv.f
30!|| i7normnp ../engine/source/interfaces/int07/i7rcurv.F
31!|| i7normp ../engine/source/interfaces/int07/i7curv.F
32!||--- calls -----------------------------------------------------
33!||--- uses -----------------------------------------------------
34!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
35!||====================================================================
36 SUBROUTINE spmd_i7curvcom(IAD_ELEM,FR_ELEM,ADSKYT,FSKYT,
37 . ISDSIZ ,IRCSIZ ,ITAG ,LENR ,LENS)
38C-----------------------------------------------
39C I m p l i c i t T y p e s
40C-----------------------------------------------
41 USE spmd_comm_world_mod, ONLY : spmd_comm_world
42#include "implicit_f.inc"
43C-----------------------------------------------
44C M e s s a g e P a s s i n g
45C-----------------------------------------------
46#include "spmd.inc"
47C-----------------------------------------------
48C C o m m o n B l o c k s
49C-----------------------------------------------
50#include "task_c.inc"
51#include "com01_c.inc"
52C-----------------------------------------------
53C D u m m y A r g u m e n t s
54C-----------------------------------------------
55 INTEGER LENR,LENS,ITAG(*),
56 . iad_elem(2,*), fr_elem(*), isdsiz(*), ircsiz(*),
57 . adskyt(0:*)
59 . fskyt(3,*)
60C-----------------------------------------------
61C L o c a l V a r i a b l e s
62C-----------------------------------------------
63#ifdef MPI
64 INTEGER I ,J ,N1, N2, N3, N4,IERROR, IAD, IAD1, IAD2, SIZ, NB,
65 . msgtyp, loc_proc, cc, msgoff,
66 . status(mpi_status_size),req_r(nspmd)
67C REAL
69 . bufr(lenr), bufs(lens)
70 DATA msgoff/195/
71C-----------------------------------------------
72C
73 loc_proc = ispmd+1
74C
75 iad = 1
76 DO i=1,nspmd
77 siz = ircsiz(i)
78 IF(siz>0)THEN
79 siz = siz*3+iad_elem(1,i+1)-iad_elem(1,i)
80 msgtyp = msgoff
81 CALL mpi_irecv(
82 s bufr(iad),siz,real,it_spmd(i),msgtyp,
83 g spmd_comm_world,req_r(i),ierror)
84 iad = iad + siz
85 ENDIF
86 END DO
87
88 DO i=1,nspmd
89 IF(isdsiz(i)>0)THEN
90 iad = 0
91#include "vectorize.inc"
92 DO j=iad_elem(1,i),iad_elem(1,i+1)-1
93 n1 = fr_elem(j)
94 iad1 = itag(n1)
95 iad2 = adskyt(n1)-1
96 nb = iad2-iad1+1
97 iad = iad + 1
98 bufs(iad) = nb
99 DO cc = iad1, iad2
100 iad = iad + 1
101 bufs(iad) = fskyt(1,cc)
102 iad = iad + 1
103 bufs(iad) = fskyt(2,cc)
104 iad = iad + 1
105 bufs(iad) = fskyt(3,cc)
106 END DO
107 END DO
108
109 siz = 3*isdsiz(i)+iad_elem(1,i+1)-iad_elem(1,i)
110 msgtyp = msgoff
111 CALL mpi_send(
112 s bufs,siz,real,it_spmd(i),msgtyp,
113 g spmd_comm_world,ierror)
114 END IF
115 END DO
116C
117 iad = 0
118 DO i = 1, nspmd
119 IF(ircsiz(i)>0)THEN
120 CALL mpi_wait(req_r(i),status,ierror)
121 DO j=iad_elem(1,i),iad_elem(1,i+1)-1
122 n1 = fr_elem(j)
123 iad = iad + 1
124 nb = nint(bufr(iad))
125 DO cc = 1, nb
126 iad1 = adskyt(n1)
127 adskyt(n1) = adskyt(n1)+1
128 iad = iad + 1
129 fskyt(1,iad1) = bufr(iad)
130 iad = iad + 1
131 fskyt(2,iad1) = bufr(iad)
132 iad = iad + 1
133 fskyt(3,iad1) = bufr(iad)
134 END DO
135 END DO
136 END IF
137 END DO
138C
139#endif
140 RETURN
141 END
#define my_real
Definition cppsort.cpp:32
subroutine i20normsp(nrtm, irect, numnod, x, nod_normal, nmn, msr, lent, maxcc, isdsiz, ircsiz, iad_elem, fr_elem, itag, nln, nlg, gap_sh)
Definition i20curv.F:174
subroutine mpi_wait(ireq, status, ierr)
Definition mpi.f:525
subroutine mpi_send(buf, cnt, datatype, dest, tag, comm, ierr)
Definition mpi.f:480
subroutine mpi_irecv(buf, cnt, datatype, source, tag, comm, ireq, ierr)
Definition mpi.f:372
subroutine spmd_i7curvcom(iad_elem, fr_elem, adskyt, fskyt, isdsiz, ircsiz, itag, lenr, lens)