OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_fr_poff.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_fr_poff (fr_wall, fs, len)

Function/Subroutine Documentation

◆ spmd_fr_poff()

subroutine spmd_fr_poff ( integer, dimension(*) fr_wall,
fs,
integer len )

Definition at line 33 of file spmd_fr_poff.F.

34C cumul force sur frontiere en parith/Off
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38 USE spmd_comm_world_mod, ONLY : spmd_comm_world
39#include "implicit_f.inc"
40C-----------------------------------------------------------------
41C M e s s a g e P a s s i n g
42C-----------------------------------------------
43#include "spmd.inc"
44C-----------------------------------------------
45C C o m m o n B l o c k s
46C-----------------------------------------------
47#include "com01_c.inc"
48#include "task_c.inc"
49C-----------------------------------------------
50C D u m m y A r g u m e n t s
51C-----------------------------------------------
52 INTEGER LEN, FR_WALL(*)
54 . fs(len)
55C-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58#ifdef MPI
59 INTEGER MSGOFF,MSGOFF2,MSGTYP,INFO,P,PMAIN, LOC_PROC, J
60 DATA msgoff/110/
61 DATA msgoff2/111/
62 INTEGER STATUS(MPI_STATUS_SIZE),IERROR
64 . ftmp(len)
65C-----------------------------------------------
66C S o u r c e L i n e s
67C-----------------------------------------------
68 pmain = fr_wall(nspmd+2)
69 loc_proc = ispmd+1
70 IF(loc_proc==pmain) THEN
71 DO p = 1, nspmd
72 IF(loc_proc/=p.AND.fr_wall(p)/=0)THEN
73 msgtyp = msgoff
74 CALL mpi_recv(ftmp ,len ,real ,it_spmd(p),
75 . msgtyp,spmd_comm_world,status,ierror )
76C
77 DO j = 1, len
78 fs(j) = fs(j) + ftmp(j)
79 END DO
80 ENDIF
81 ENDDO
82C
83 DO p = 1, nspmd
84 IF(loc_proc/=p.AND.fr_wall(p)/=0)THEN
85 msgtyp = msgoff2
86 CALL mpi_send(fs ,len ,real ,it_spmd(p),
87 . msgtyp,spmd_comm_world,ierror)
88 ENDIF
89 ENDDO
90C
91 ELSE
92 msgtyp = msgoff
93 CALL mpi_send(fs ,len ,real ,it_spmd(pmain),
94 . msgtyp,spmd_comm_world,ierror)
95 msgtyp = msgoff2
96 CALL mpi_recv(fs ,len ,real ,it_spmd(pmain),
97 . msgtyp,spmd_comm_world,status,ierror )
98 ENDIF
99C
100#endif
101 RETURN
#define my_real
Definition cppsort.cpp:32
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