36
37
38
40
41
42
43 USE spmd_comm_world_mod, ONLY : spmd_comm_world
44#include "implicit_f.inc"
45#include "spmd.inc"
46
47
48
49#include "com01_c.inc"
50#include "task_c.inc"
51
52
53
54
55
56
57
58#ifdef MPI
59 INTEGER STATUS(MPI_STATUS_SIZE),IERROR,MSGOFF
60 INTEGER SIZ,MSGTYP,I,K,NG,NREC,MSGOFF2
61
62 DATA msgoff/10002/
63 DATA msgoff2/10002/
64 INTEGER BUFF_I(4)
66
67 IF (ispmd/=0) THEN
72
78
79 msgtyp = msgoff2
80 CALL mpi_send(buff_i, 4,mpi_integer,it_spmd(1),msgtyp,spmd_comm_world,ierror)
81
82 msgtyp = msgoff
83 CALL mpi_send(buff_r, 5, real,it_spmd(1),msgtyp,spmd_comm_world,ierror)
84
85 ELSE
86
87 DO i=2,nspmd
88
89
90 msgtyp = msgoff2
91 CALL mpi_probe(it_spmd(i),msgtyp,spmd_comm_world,status,ierror)
93 CALL mpi_recv(buff_i,4,mpi_integer,it_spmd(i),msgtyp,spmd_comm_world,status,ierror)
94
95
96 msgtyp = msgoff
97 CALL mpi_recv(buff_r,5,real,it_spmd(i),msgtyp,spmd_comm_world,status,ierror)
98
103
109
110 ENDDO
111
112 ENDIF
113
114#endif
115 RETURN
subroutine mpi_recv(buf, cnt, datatype, source, tag, comm, status, ierr)
subroutine mpi_get_count(status, datatype, cnt, ierr)
subroutine mpi_send(buf, cnt, datatype, dest, tag, comm, ierr)
subroutine mpi_probe(source, tag, comm, status, ierr)
type(map_struct), dimension(:), allocatable state_inimap_buf