OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_glob_min5.F File Reference
#include "implicit_f.inc"
#include "spmd.inc"
#include "task_c.inc"
#include "param_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_glob_min5 (dt2, itypts, nelts, icodt, imsch, tstop, iwiout, mstop, ismsch, int24use, nbintc, intlist, ipari, intbuf_tab)

Function/Subroutine Documentation

◆ spmd_glob_min5()

subroutine spmd_glob_min5 ( dt2,
integer itypts,
integer nelts,
integer icodt,
integer imsch,
tstop,
integer iwiout,
integer mstop,
integer ismsch,
integer int24use,
integer nbintc,
integer, dimension(*) intlist,
integer, dimension(npari,*) ipari,
type(intbuf_struct_), dimension(*) intbuf_tab )

Definition at line 33 of file spmd_glob_min5.F.

36C-----------------------------------------------
37C M o d u l e s
38C-----------------------------------------------
39 USE intbufdef_mod
40C-----------------------------------------------
41C I m p l i c i t T y p e s
42C-----------------------------------------------
43 USE spmd_comm_world_mod, ONLY : spmd_comm_world
44#include "implicit_f.inc"
45C-----------------------------------------------------------------
46C M e s s a g e P a s s i n g
47C-----------------------------------------------
48#include "spmd.inc"
49C-----------------------------------------------
50C C o m m o n B l o c k s
51C-----------------------------------------------
52#include "task_c.inc"
53#include "param_c.inc"
54C-----------------------------------------------
55C D u m m y A r g u m e n t s
56C-----------------------------------------------
57 INTEGER ITYPTS, NELTS, ICODT ,IMSCH, IWIOUT,MSTOP,
58 . ISMSCH
59C Interface type 24 communication addon
60 INTEGER INT24USE,NBINTC,INTLIST(*),IPARI(NPARI,*)
62 . dt2, tstop
63 TYPE(INTBUF_STRUCT_) INTBUF_TAB(*)
64C-----------------------------------------------
65C L o c a l V a r i a b l e s
66C-----------------------------------------------
67#ifdef MPI
68 INTEGER IERROR, LOC_PROC, MSTOP1, MSTOP2, LEN, myop
69 my_real,
70 . DIMENSION(:),ALLOCATABLE :: rbuf, sbuf
71C interface type 24 comm Addon
72 INTEGER NIN,NI,NTY
73 INTEGER :: MY_TYPE
74 INTEGER GLOB_MIN
75 EXTERNAL glob_min
76C-----------------------------------------------
77C S o u r c e L i n e s
78C-----------------------------------------------
79 IF(int24use==1)THEN
80 len = 10 + nbintc
81 ELSE
82 len = 10
83 ENDIF
84 ALLOCATE(rbuf(len))
85 ALLOCATE(sbuf(len))
86 rbuf(1:len)=zero
87
88 mstop1=0
89 mstop2=0
90 IF(mstop==1)mstop1=1
91 IF(mstop==2)mstop2=1
92C
93 loc_proc=ispmd+1
94C
95 sbuf(1) = dt2
96 sbuf(2) = itypts
97 sbuf(3) = nelts
98 sbuf(4) = iexicodt
99 sbuf(5) = imsch
100 sbuf(6) = tstop
101 sbuf(7) = iwiout
102 sbuf(8) = mstop1
103 sbuf(9) = mstop2
104 sbuf(10)= ismsch
105
106 IF (int24use==1)THEN
107 DO ni=1,nbintc
108 nin = intlist(ni)
109 nty = ipari( 7,nin)
110 IF(nty==24.OR.nty==25) THEN
111 sbuf(10+ni) = intbuf_tab(nin)%VARIABLES(23)
112 ELSE
113 sbuf(10+ni) = zero
114 ENDIF
115 ENDDO
116 ENDIF
117
118 CALL mpi_type_contiguous(10,real,my_type,ierror)
119 CALL mpi_type_commit(my_type,ierror)
120C
121 CALL mpi_op_create(glob_min, .true., myop, ierror)
122
123 CALL mpi_allreduce(sbuf, rbuf, 1, my_type, myop,
124 & spmd_comm_world, ierror)
125
126 IF (int24use==1)THEN
127 CALL mpi_allreduce(sbuf(11), rbuf(11), nbintc, real , mpi_max,
128 & spmd_comm_world, ierror)
129 ENDIF
130
131 CALL mpi_op_free(myop, ierror)
132 CALL mpi_type_free(my_type,ierror)
133
134C
135 dt2 = rbuf(1)
136 itypts = nint(rbuf(2))
137 nelts = nint(rbuf(3))
138 iexicodt = nint(rbuf(4))
139 imsch = nint(rbuf(5))
140 tstop = rbuf(6)
141 iwiout = nint(rbuf(7))
142 mstop1 = nint(rbuf(8))
143 mstop2 = nint(rbuf(9))
144 IF(mstop1/=0)mstop=1
145 IF(mstop2/=0)mstop=2
146 ismsch = rbuf(10)
147C
148 IF (int24use==1)THEN
149 DO ni=1,nbintc
150 nin = intlist(ni)
151 nty = ipari( 7,nin)
152 IF(nty==24.OR.nty==25) THEN
153 intbuf_tab(nin)%VARIABLES(23) = rbuf(10+ni)
154 ENDIF
155 ENDDO
156 ENDIF
157C
158 DEALLOCATE(rbuf)
159 DEALLOCATE(sbuf)
160C
161#endif
162 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine glob_min(rin, rinout, len, type)
Definition glob_min.F:29
subroutine mpi_type_free(newtyp, ierr_mpi)
Definition mpi.f:399
subroutine mpi_type_contiguous(length, datatype, newtype, ierr_mpi)
Definition mpi.f:406
subroutine mpi_allreduce(sendbuf, recvbuf, cnt, datatype, operation, comm, ierr)
Definition mpi.f:103
subroutine mpi_type_commit(newtyp, ierr_mpi)
Definition mpi.f:393
subroutine mpi_op_create(func, commute, op, ierr)
Definition mpi.f:412
subroutine mpi_op_free(op, ierr)
Definition mpi.f:421