OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_frwall_nn.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_frwall_nn (fr_wall, iwadd)

Function/Subroutine Documentation

◆ spmd_frwall_nn()

subroutine spmd_frwall_nn ( integer, dimension(nspmd+2) fr_wall,
integer iwadd )

Definition at line 33 of file spmd_frwall_nn.F.

34C
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 FR_WALL(NSPMD+2), IWADD
53C-----------------------------------------------
54C L o c a l V a r i a b l e s
55C-----------------------------------------------
56#ifdef MPI
57 INTEGER MSGOFF,MSGOFF2,MSGTYP,INFO,P,PMAIN, LOC_PROC, J, LEN
58 DATA msgoff/112/
59 DATA msgoff2/113/
60 INTEGER STATUS(MPI_STATUS_SIZE),IERROR
61 INTEGER ITMP
62C-----------------------------------------------
63C S o u r c e L i n e s
64C-----------------------------------------------
65 len=1
66C
67 pmain = fr_wall(nspmd+2)
68 loc_proc = ispmd+1
69 IF(loc_proc==pmain) THEN
70 DO p = 1, nspmd
71 IF(loc_proc/=p.AND.fr_wall(p)/=0)THEN
72 msgtyp = msgoff
73 CALL mpi_recv(itmp ,len ,mpi_integer,it_spmd(p),
74 . msgtyp,spmd_comm_world,status,ierror )
75C
76 iwadd = iwadd + itmp
77 ENDIF
78 ENDDO
79C
80 DO p = 1, nspmd
81 IF(loc_proc/=p.AND.fr_wall(p)/=0)THEN
82 msgtyp = msgoff2
83 CALL mpi_send(iwadd ,len ,mpi_integer,it_spmd(p),
84 . msgtyp,spmd_comm_world,ierror)
85 ENDIF
86 ENDDO
87C
88 ELSE
89 msgtyp = msgoff
90 CALL mpi_send(iwadd ,len ,mpi_integer,it_spmd(pmain),
91 . msgtyp,spmd_comm_world,ierror)
92 msgtyp = msgoff2
93 CALL mpi_recv(iwadd ,len ,mpi_integer,it_spmd(pmain),
94 . msgtyp,spmd_comm_world,status,ierror )
95 ENDIF
96C
97#endif
98 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