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

Go to the source code of this file.

Functions/Subroutines

subroutine spmd_exch_stif_scnd (stifnd, fr_cdns, iad_cdns, lcomm)

Function/Subroutine Documentation

◆ spmd_exch_stif_scnd()

subroutine spmd_exch_stif_scnd ( stifnd,
integer, dimension(*) fr_cdns,
integer, dimension(*) iad_cdns,
integer lcomm )

Definition at line 31 of file spmd_exch_stif_scnd.F.

33C-----------------------------------------------
34C I m p l i c i t T y p e s
35C-----------------------------------------------
36 USE spmd_comm_world_mod, ONLY : spmd_comm_world
37#include "implicit_f.inc"
38C-----------------------------------------------
39C M e s s a g e P a s s i n g
40C-----------------------------------------------
41#include "spmd.inc"
42C-----------------------------------------------
43C C o m m o n B l o c k s
44C-----------------------------------------------
45#include "com01_c.inc"
46#include "task_c.inc"
47C-----------------------------------------------
48C D u m m y A r g u m e n t s
49C-----------------------------------------------
50 INTEGER LCOMM, FR_CDNS(*), IAD_CDNS(*)
52 . stifnd(*)
53C-----------------------------------------------
54C L o c a l V a r i a b l e s
55C-----------------------------------------------
56#ifdef MPI
57 INTEGER MSGTYP,LOC_PROC,NOD,I,J,L,IDEB,IAD,LEN,
58 . NBINDEX,INDEX,MSGOFF,SIZ,IERROR,
59 . STATUS(MPI_STATUS_SIZE),
60 . REQ_S(NSPMD),REQ_R(NSPMD),INDEXI(NSPMD)
61 DATA msgoff/1179/
63 . sbuf(lcomm),rbuf(lcomm)
64C-----------------------------------------------
65C S o u r c e L i n e s
66C-----------------------------------------------
67 loc_proc = ispmd + 1
68C
69 ideb = 1
70 l = 0
71c ISIZE = 1
72 DO i = 1, nspmd
73 len = iad_cdns(i+1)-iad_cdns(i)
74 IF(len>0) THEN
75 siz = len
76 l=l+1
77 indexi(l)=i
78 msgtyp = msgoff
79 CALL mpi_irecv(
80 s rbuf(ideb),siz,real,it_spmd(i),msgtyp,
81 g spmd_comm_world,req_r(l),ierror)
82 ideb = ideb + siz
83 ENDIF
84 ENDDO
85 nbindex = l
86C
87 ideb = 1
88 DO l = 1, nbindex
89 i = indexi(l)
90 len = iad_cdns(i+1) - iad_cdns(i)
91 iad = iad_cdns(i)-1
92 DO j = 1, len
93 nod = fr_cdns(iad+j)
94 sbuf(ideb) = stifnd(nod)
95 ideb = ideb + 1
96 ENDDO
97 ENDDO
98C
99 ideb = 1
100 DO l=1,nbindex
101 i = indexi(l)
102 len = iad_cdns(i+1)-iad_cdns(i)
103 siz = len
104 msgtyp = msgoff
105 CALL mpi_isend(
106 s sbuf(ideb),siz,real,it_spmd(i),msgtyp,
107 g spmd_comm_world,req_s(l),ierror)
108 ideb = ideb + siz
109 ENDDO
110C
111 DO l=1,nbindex
112 CALL mpi_waitany(nbindex,req_r,index,status,ierror)
113 i = indexi(index)
114 ideb = iad_cdns(i)
115 len = iad_cdns(i+1)-iad_cdns(i)
116 iad = iad_cdns(i)-1
117 DO j = 1, len
118 nod = fr_cdns(iad+j)
119 stifnd(nod) = stifnd(nod) + rbuf(ideb)
120 ideb = ideb + 1
121 ENDDO
122 ENDDO
123C
124 DO l=1,nbindex
125 CALL mpi_waitany(nbindex,req_s,index,status,ierror)
126 ENDDO
127C
128#endif
129 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine mpi_isend(buf, cnt, datatype, dest, tag, comm, ireq, ierr)
Definition mpi.f:382
subroutine mpi_waitany(cnt, array_of_requests, index, status, ierr)
Definition mpi.f:549
subroutine mpi_irecv(buf, cnt, datatype, source, tag, comm, ireq, ierr)
Definition mpi.f:372