OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spmd_agetmsr.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_agetmsr (fr_wall, x, msr, xwl, ywl, zwl, rwl)

Function/Subroutine Documentation

◆ spmd_agetmsr()

subroutine spmd_agetmsr ( integer, dimension(nspmd+2) fr_wall,
x,
integer msr,
xwl,
ywl,
zwl,
rwl )

Definition at line 35 of file spmd_agetmsr.F.

36 use spmd_mod
37C-----------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
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-----------------------------------------------
51 . x(3,*),xwl,ywl,zwl,rwl(*)
52 INTEGER MSR,FR_WALL(NSPMD+2)
53C-----------------------------------------------
54C L O C A L V A R I A B L E S
55C-----------------------------------------------
56#ifdef MPI
57 INTEGER P
58 INTEGER STATUS(MPI_STATUS_SIZE),IERROR,MSGOFF,MSGTYP
60 . xyzwl(3)
61 DATA msgoff/7032/
62
63 p = fr_wall(nspmd+2)
64 IF (p==1.OR.p==0) THEN
65 IF (ispmd==0) THEN
66 IF (msr==0) THEN
67 xwl = rwl(4)
68 ywl = rwl(5)
69 zwl = rwl(6)
70 ELSE
71 xwl = x(1,msr)
72 ywl = x(2,msr)
73 zwl = x(3,msr)
74 END IF
75 END IF
76 ELSE
77 IF (p==ispmd+1) THEN
78 IF (msr==0) THEN
79 xwl = rwl(4)
80 ywl = rwl(5)
81 zwl = rwl(6)
82 ELSE
83 xyzwl(1)= x(1,msr)
84 xyzwl(2)= x(2,msr)
85 xyzwl(3)= x(3,msr)
86 END IF
87
88 msgtyp = msgoff
89 CALL mpi_send(xyzwl,3,real,it_spmd(1),msgtyp,
90 . spmd_comm_world,ierror)
91 END IF
92 IF (ispmd==0) THEN
93 msgtyp = msgoff
94 CALL mpi_recv(xyzwl,3,real,it_spmd(p),msgtyp,
95 . spmd_comm_world,status,ierror)
96 xwl = xyzwl(1)
97 ywl = xyzwl(2)
98 zwl = xyzwl(3)
99 END IF
100 END IF
101#endif
102 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