OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_lagbounds_exch_i22.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/.
23
24!||====================================================================
25!|| spmd_lagbounds_exch_i22 ../engine/source/mpi/interfaces/spmd_lagbounds_exch_i22.f
26!||--- called by ------------------------------------------------------
27!|| i22main_tri ../engine/source/interfaces/intsort/i22main_tri.F
28!||--- calls -----------------------------------------------------
29!||--- uses -----------------------------------------------------
30!|| message_mod ../engine/share/message_module/message_mod.F
31!|| spmd_comm_world_mod ../engine/source/mpi/spmd_comm_world.F90
32!||====================================================================
34 1 BMINMAL_SPMD, BMINMAL ,ISENDTO, IRCVFROM , NIN )
35C-----------------------------------------------
36C M o d u l e s
37C-----------------------------------------------
38 USE message_mod
39C-----------------------------------------------
40C I m p l i c i t T y p e s
41C-----------------------------------------------
42 USE spmd_comm_world_mod, ONLY : spmd_comm_world
43#include "implicit_f.inc"
44C-----------------------------------------------
45C M e s s a g e P a s s i n g
46C-----------------------------------------------
47#include "spmd.inc"
48C-----------------------------------------------
49C C o m m o n B l o c k s
50C-----------------------------------------------
51#include "com01_c.inc"
52#include "com04_c.inc"
53#include "task_c.inc"
54#include "timeri_c.inc"
55C-----------------------------------------------
56C D u m m y A r g u m e n t s
57C-----------------------------------------------
58 INTEGER ::
59 . isendto(ninter+1,*), ircvfrom(ninter+1,*), nin
60
62 . bminmal(6), bminmal_spmd(6, nspmd)
63C-----------------------------------------------
64C L o c a l V a r i a b l e s
65C-----------------------------------------------
66#ifdef MPI
67 INTEGER MSGTYP, LOC_PROC,P, MSGOFF,
68 . status(mpi_status_size),ierror,req_sb(nspmd),
69 . req_rb(nspmd),kk,nbirecv,irindexi(nspmd),
70 . req_rd(nspmd),req_sd(nspmd),req_sd2(nspmd),
71 . req_rc(nspmd),req_sc(nspmd),
72 . isindexi(nspmd),
73 . nbx,nby,nbz
75 . bminma(6,nspmd),
76 . xmaxb,ymaxb,zmaxb,xminb,yminb,zminb
77 my_real ::
78 . dx, dy, dz,
79 . xmin,ymin,zmin,xmax,ymax,zmax
80 LOGICAL ::
81 . test
82 DATA msgoff/142/
83
84C-----------------------------------------------
85C S o u r c e L i n e s
86C-----------------------------------------------
87C
88C=======================================================================
89C Exchanging each local lagrangian bounds.
90C=======================================================================
91 IF(nspmd == 1)RETURN !precondition
92 loc_proc = ispmd + 1
93 !-------------------------------------------!
94 ! Domain Bounds from i22xsave !
95 !-------------------------------------------!
96 bminma(1,loc_proc) = bminmal(1)
97 bminma(2,loc_proc) = bminmal(2)
98 bminma(3,loc_proc) = bminmal(3)
99 bminma(4,loc_proc) = bminmal(4)
100 bminma(5,loc_proc) = bminmal(5)
101 bminma(6,loc_proc) = bminmal(6)
102 !-------------------------------------------!
103 ! Local Lagrangian Domain Bounds Sending !
104 !-------------------------------------------!
105 DO p = 1, nspmd
106 IF(p/=loc_proc) THEN
107 msgtyp = msgoff
108 CALL mpi_isend(
109 . bminma(1,loc_proc),6 ,real ,it_spmd(p),msgtyp,
110 . spmd_comm_world ,req_sb(p),ierror)
111 ENDIF
112 ENDDO
113 !-------------------------------------------!
114 ! Remote Lagrangian Domain Bounds Receiving !
115 !-------------------------------------------!
116 nbirecv=0
117 DO p = 1, nspmd
118 IF(loc_proc/=p) THEN
119 nbirecv=nbirecv+1
120 irindexi(nbirecv)=p
121 msgtyp = msgoff
122 CALL mpi_recv(
123 . bminma(1,p) ,6 ,real ,it_spmd(p),msgtyp,
124 . spmd_comm_world,status,ierror)
125 ENDIF
126 ENDDO
127 !-------------------------------------------!
128 ! MPI_WAITING !
129 !-------------------------------------------!
130 DO p = 1, nspmd
131 IF(p/=loc_proc) THEN
132 CALL mpi_wait(req_sb(p),status,ierror)
133 ENDIF
134 ENDDO
135 !-------------------------------------------!
136 ! Returning complete bounds data
137 bminmal_spmd = bminma
138#endif
139 RETURN
140 END
#define my_real
Definition cppsort.cpp:32
subroutine ymax(idn, fac, npc, pld, stiffmin, stiffmax, stiffini, stiffavg)
Definition law100_upd.F:272
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_wait(ireq, status, ierr)
Definition mpi.f:525
subroutine spmd_lagbounds_exch_i22(bminmal_spmd, bminmal, isendto, ircvfrom, nin)