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 50 of file spmd_exch_fr6.F.

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