32
33
34
35 USE spmd_comm_world_mod, ONLY : spmd_comm_world
36#include "implicit_f.inc"
37#include "spmd.inc"
38
39
40
41#include "com01_c.inc"
42#include "task_c.inc"
43
44
45
47 . x(3,*),xwl,ywl,zwl,rwl(*)
48 INTEGER MSR,FR_WALL(NSPMD+2)
49
50
51
52#ifdef MPI
53 INTEGER P
54 INTEGER STATUS(MPI_STATUS_SIZE),IERROR,,MSGTYP
56 . xyzwl(3)
57 DATA msgoff/7032/
58
59 p = fr_wall(nspmd+2)
60 IF (p==1.OR.p==0) THEN
61 IF (ispmd==0) THEN
62 IF (msr==0) THEN
63 xwl = rwl(4)
64 ywl = rwl(5)
65 zwl = rwl(6)
66 ELSE
67 xwl = x(1,msr)
68 ywl = x(2,msr)
69 zwl = x(3,msr)
70 END IF
71 END IF
72 ELSE
73 IF (p==ispmd+1) THEN
74 IF (msr==0) THEN
75 xwl = rwl(4)
76 ywl = rwl(5)
77 zwl = rwl(6)
78 ELSE
79 xyzwl(1)= x(1,msr)
80 xyzwl(2)= x(2,msr)
81 xyzwl(3)= x(3,msr)
82 END IF
83
84 msgtyp = msgoff
85 CALL mpi_send(xyzwl,3,real,it_spmd(1),msgtyp,
86 . spmd_comm_world,ierror)
87 END IF
88 IF (ispmd==0) THEN
89 msgtyp = msgoff
90 CALL mpi_recv(xyzwl,3,real,it_spmd(p),msgtyp,
91 . spmd_comm_world,status,ierror)
92 xwl = xyzwl(1)
93 ywl = xyzwl(2)
94 zwl = xyzwl(3)
95 END IF
96 END IF
97#endif
98 RETURN
subroutine mpi_recv(buf, cnt, datatype, source, tag, comm, status, ierr)
subroutine mpi_send(buf, cnt, datatype, dest, tag, comm, ierr)