35
36
37
38 USE spmd_comm_world_mod, ONLY : spmd_comm_world
39#include "implicit_f.inc"
40#include "spmd.inc"
41
42
43
44#include "com01_c.inc"
45#include "task_c.inc"
46
47
48
49 real
50 . v(*)
51 INTEGER NUM,TV
52
53
54
55#ifdef MPI
56 INTEGER STATUS(MPI_STATUS_SIZE),IERROR,MSGOFF
57 INTEGER SIZ,MSGTYP,I,K,NG,NREC,MSGOFF2
58
59 DATA msgoff/7034/
60
61
62 REAL, DIMENSION(:),ALLOCATABLE :: XGLOB
63
64 ALLOCATE(xglob(num))
65
66 IF (ispmd/=0) THEN
67 msgtyp = msgoff
68 CALL mpi_send(v,3*tv,mpi_real,it_spmd(1),msgtyp,
69 . spmd_comm_world,ierror)
70
71 ELSE
72
74
75 DO i=2,nspmd
76
77
78 msgtyp = msgoff
79
81 . spmd_comm_world,status,ierror)
83
84 CALL mpi_recv(xglob,siz,mpi_real,it_spmd(i),msgtyp,
85 . spmd_comm_world,status,ierror)
86
87
88
90 ENDDO
91
92 ENDIF
93
94 DEALLOCATE(xglob)
95
96#endif
97 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)
void write_r_c(float *w, int *len)