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

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_exch_idel_seglo (ipari, intbuf_tab, indseglo, ibufseglo)

Function/Subroutine Documentation

◆ spmd_exch_idel_seglo()

subroutine spmd_exch_idel_seglo ( integer, dimension(npari,*) ipari,
type(intbuf_struct_), dimension(*) intbuf_tab,
integer, dimension(*) indseglo,
integer, dimension(*) ibufseglo )

Definition at line 33 of file spmd_exch_idel_seglo.F.

34C-----------------------------------------------
35C M o d u l e s
36C-----------------------------------------------
37 USE intbufdef_mod
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"
52#include "com04_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 IPARI(NPARI,*),INDSEGLO(*),IBUFSEGLO(*)
58
59 TYPE(INTBUF_STRUCT_) INTBUF_TAB(*)
60C-----------------------------------------------
61C L o c a l V a r i a b l e s
62C-----------------------------------------------
63#ifdef MPI
64 INTEGER MSGOFF1 ,MSGOFF2, MSGTYP, LOC_PROC,IERROR,REQ_S1(NSPMD),REQ_S2(NSPMD),
65 . STATUS(MPI_STATUS_SIZE)
66 INTEGER RSEGLO(NINTER+1)
67C
68 INTEGER NRTM,NG,IND_SEG
69 INTEGER I,SIZ,IAD
70 INTEGER, DIMENSION(:), ALLOCATABLE :: RBUF
71C-----------------------------------------------
72 DATA msgoff1/125/
73 DATA msgoff2/126/
74
75
76 loc_proc = ispmd+1
77 DO i = 1, nspmd
78 IF(i/=loc_proc) THEN
79 msgtyp = msgoff1
80 CALL mpi_isend(
81 c indseglo,ninter+1,mpi_integer,it_spmd(i),msgtyp,
82 g spmd_comm_world,req_s1(i),ierror)
83
84 siz = indseglo(ninter+1)-indseglo(1)
85 IF(siz>0)THEN
86 msgtyp = msgoff2
87 CALL mpi_isend(
88 c ibufseglo,siz,mpi_integer,it_spmd(i),msgtyp,
89 g spmd_comm_world,req_s2(i),ierror)
90 ENDIF
91 ENDIF
92 ENDDO
93
94 DO i = 1, nspmd
95 IF(i/=loc_proc) THEN
96 msgtyp = msgoff1
97 CALL mpi_recv(
98 . rseglo,ninter+1,mpi_integer,it_spmd(i),msgtyp,
99 . spmd_comm_world,status,ierror)
100
101 siz = rseglo(ninter+1)-rseglo(1)
102 IF(siz>0)THEN
103 ALLOCATE(rbuf(siz))
104 msgtyp = msgoff2
105 CALL mpi_recv(
106 . rbuf,siz,mpi_integer,it_spmd(i),msgtyp,
107 . spmd_comm_world,status,ierror)
108
109 DO ng=1,ninter
110 ind_seg=rseglo(ng+1)-rseglo(ng)
111 iad=rseglo(ng)
112 IF(ind_seg >0)THEN
113 IF(ipari(7,ng)==24)THEN
114 nrtm=ipari(4,ng)
115 CALL i24_remove_global_segment(rbuf(iad),ind_seg,ng,nrtm,
116 . intbuf_tab(ng)%MSEGLO,intbuf_tab(ng)%MVOISIN,2)
117 ELSEIF(ipari(7,ng)==25)THEN
118 nrtm=ipari(4,ng)
119 CALL i25_remove_global_segment(rbuf(iad),ind_seg,ng,nrtm,
120 . intbuf_tab(ng)%MSEGLO,intbuf_tab(ng)%MVOISIN,2)
121 END IF
122 ENDIF ! IF(IND_SEG >0)
123 ENDDO ! DO NG=1,NINTER
124 DEALLOCATE(rbuf)
125 ENDIF ! IF(SIZ>0)THEN
126 ENDIF ! IF(I/=LOC_PROC) THEN
127 ENDDO
128C
129C Test reception envoi BUFR
130C
131 DO i = 1, nspmd
132 IF(i/=loc_proc) THEN
133 CALL mpi_wait(req_s1(i),status,ierror)
134 siz = indseglo(ninter+1)-indseglo(1)
135 IF(siz>0)THEN
136 CALL mpi_wait(req_s2(i),status,ierror)
137 ENDIF
138 ENDIF
139 ENDDO
140C
141 RETURN
142#endif
subroutine i24_remove_global_segment(ind_seglo, nind_seglo, nin, nrtm, mseglo, mvoisin, flag)
Definition chkstfn3.F:3965
subroutine i25_remove_global_segment(ind_seglo, nind_seglo, nin, nrtm, mseglo, mvoisin, flag)
Definition chkstfn3.F:4006
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