OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_exch_fr6.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_fr6 (fr, fs6, len)

Function/Subroutine Documentation

◆ spmd_exch_fr6()

subroutine spmd_exch_fr6 ( integer, dimension(*) fr,
double precision, dimension(len) fs6,
integer len )

Definition at line 51 of file spmd_exch_fr6.F.

52C cumul force sur frontiere en parith/on
53C-----------------------------------------------
54C I m p l i c i t T y p e s
55C-----------------------------------------------
56 USE spmd_comm_world_mod, ONLY : spmd_comm_world
57#include "implicit_f.inc"
58C-----------------------------------------------------------------
59C M e s s a g e P a s s i n g
60C-----------------------------------------------
61#include "spmd.inc"
62C-----------------------------------------------
63C C o m m o n B l o c k s
64C-----------------------------------------------
65#include "com01_c.inc"
66#include "task_c.inc"
67C-----------------------------------------------
68C D u m m y A r g u m e n t s
69C-----------------------------------------------
70 INTEGER LEN, FR(*)
71 DOUBLE PRECISION FS6(LEN)
72C-----------------------------------------------
73C L o c a l V a r i a b l e s
74C-----------------------------------------------
75#ifdef MPI
76 INTEGER MSGOFF,MSGTYP,P,PMAIN, LOC_PROC, J, L,
77 . IDEB, NBINDEX, INDEX, REQ(NSPMD-1)
78 DATA msgoff/162/
79 INTEGER STATUS(MPI_STATUS_SIZE),IERROR
80 DOUBLE PRECISION FTMP(LEN*(NSPMD-1))
81C-----------------------------------------------
82C S o u r c e L i n e s
83C-----------------------------------------------
84 pmain = fr(nspmd+2)
85 loc_proc = ispmd+1
86 IF(loc_proc==pmain) THEN
87 ideb = 1
88 l = 0
89 DO p = 1, nspmd
90 IF(loc_proc/=p.AND.fr(p)/=0)THEN
91 l=l+1
92C INDEXI(L)=P
93 msgtyp = msgoff
94 CALL mpi_irecv(ftmp(ideb) ,len ,mpi_double_precision,it_spmd(p),
95 . msgtyp,spmd_comm_world,req(l),ierror )
96 ideb = ideb + len
97 END IF
98 END DO
99 nbindex = l
100C
101 DO l = 1, nbindex
102 CALL mpi_waitany(nbindex,req,index,status,ierror)
103C P = INDEXI(INDEX)
104 ideb = len*(index-1)
105 DO j = 1, len
106 fs6(j) = fs6(j) + ftmp(ideb+j)
107 END DO
108 ENDDO
109C
110 DO p = 1, nspmd
111 IF(loc_proc/=p.AND.fr(p)/=0)THEN
112 msgtyp = msgoff
113 CALL mpi_send(fs6 ,len ,mpi_double_precision,it_spmd(p),
114 . msgtyp,spmd_comm_world,ierror)
115 ENDIF
116 ENDDO
117C
118 ELSE
119 IF(fr(loc_proc)/=0) THEN
120 msgtyp = msgoff
121 CALL mpi_send(fs6 ,len ,mpi_double_precision,it_spmd(pmain),
122 . msgtyp,spmd_comm_world,ierror)
123 CALL mpi_recv(fs6 ,len ,mpi_double_precision,it_spmd(pmain),
124 . msgtyp,spmd_comm_world,status,ierror )
125 ENDIF
126 ENDIF
127C
128#endif
129 RETURN
subroutine mpi_recv(buf, cnt, datatype, source, tag, comm, status, ierr)
Definition mpi.f:461
subroutine mpi_send(buf, cnt, datatype, dest, tag, comm, ierr)
Definition mpi.f:480
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