33
34
35
37
38
39
40 USE spmd_comm_world_mod, ONLY : spmd_comm_world
41#include "implicit_f.inc"
42
43
44
45#include "spmd.inc"
46
47
48
49#include "task_c.inc"
50
51
52
53 INTEGER IREDUCE
55 . spaglob
56
57
58
59#ifdef MPI
60 INTEGER P, I, MSGTYP, LOC_PROC, IERROR,
61 . STATUS(MPI_STATUS_SIZE),MSGOFF
62 INTEGER :: type_reduc,myop,I_LEN
63
64 my_real,
DIMENSION(2) :: sbuf,rbuf
65 DATA msgoff/2007/
66
67
68
69 loc_proc = ispmd+1
70
71 i_len = 2
72
73 sbuf(1) = ireduce
74 sbuf(2) = -spaglob
75
76
77
79 & spmd_comm_world, ierror)
80
81
82 ireduce = nint(rbuf(1))
83 spaglob = -rbuf(2)
84
85#endif
86 RETURN
subroutine mpi_allreduce(sendbuf, recvbuf, cnt, datatype, operation, comm, ierr)