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

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_lagbounds_exch_i22 (bminmal_spmd, bminmal, isendto, ircvfrom, nin)

Function/Subroutine Documentation

◆ spmd_lagbounds_exch_i22()

subroutine spmd_lagbounds_exch_i22 ( bminmal_spmd,
bminmal,
integer, dimension(ninter+1,*) isendto,
integer, dimension(ninter+1,*) ircvfrom,
integer nin )

Definition at line 33 of file spmd_lagbounds_exch_i22.F.

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
#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