48 |
|
#ifdef IS_MPI |
49 |
|
implicit none |
50 |
|
PUBLIC !WARNING everything in this module is public |
51 |
– |
|
51 |
|
|
52 |
+ |
|
53 |
|
include "mpif.h" |
54 |
|
|
55 |
|
private :: dp |
56 |
|
|
57 |
|
|
58 |
< |
! interfaces for things that we use |
59 |
< |
! These routines are not overloaded and only include one argument type. |
60 |
< |
interface |
61 |
< |
SUBROUTINE MPI_INIT(IERROR) |
62 |
< |
INTEGER IERROR |
63 |
< |
END SUBROUTINE MPI_INIT |
64 |
< |
|
65 |
< |
SUBROUTINE MPI_FINALIZE(IERROR) |
66 |
< |
INTEGER IERROR |
67 |
< |
END SUBROUTINE MPI_FINALIZE |
68 |
< |
|
69 |
< |
SUBROUTINE MPI_BARRIER(COMM, IERROR) |
70 |
< |
INTEGER COMM, IERROR |
71 |
< |
END SUBROUTINE MPI_BARRIER |
72 |
< |
|
73 |
< |
SUBROUTINE MPI_COMM_RANK(COMM, RANK, IERROR) |
74 |
< |
INTEGER COMM, RANK, IERROR |
75 |
< |
END SUBROUTINE MPI_COMM_RANK |
76 |
< |
|
77 |
< |
SUBROUTINE MPI_COMM_SIZE(COMM, SIZE, IERROR) |
78 |
< |
INTEGER COMM, SIZE, IERROR |
79 |
< |
END SUBROUTINE MPI_COMM_SIZE |
80 |
< |
! |
81 |
< |
SUBROUTINE MPI_COMM_SPLIT(COMM, COLOR, KEY, NEWCOMM, IERROR) |
82 |
< |
INTEGER COMM, COLOR, KEY, NEWCOMM, IERROR |
83 |
< |
END SUBROUTINE MPI_COMM_SPLIT |
84 |
< |
|
85 |
< |
SUBROUTINE MPI_GET_PROCESSOR_NAME( NAME, RESULTLEN, IERROR) |
86 |
< |
CHARACTER(len=*) :: NAME |
87 |
< |
INTEGER RESULTLEN,IERROR |
88 |
< |
END SUBROUTINE MPI_GET_PROCESSOR_NAME |
58 |
> |
! interfaces for things that we use |
59 |
> |
! These routines are not overloaded and only include one argument type. |
60 |
> |
interface |
61 |
> |
SUBROUTINE MPI_INIT(IERROR) |
62 |
> |
INTEGER IERROR |
63 |
> |
END SUBROUTINE MPI_INIT |
64 |
|
|
65 |
< |
! FUNCTION MPI_WTICK() |
66 |
< |
! DOUBLE PRECISION MPI_WTICK |
67 |
< |
! END FUNCTION MPI_WTICK |
93 |
< |
end interface |
65 |
> |
SUBROUTINE MPI_FINALIZE(IERROR) |
66 |
> |
INTEGER IERROR |
67 |
> |
END SUBROUTINE MPI_FINALIZE |
68 |
|
|
69 |
< |
!! These routines are overloaded and require multiple argument types |
69 |
> |
SUBROUTINE MPI_BARRIER(COMM, IERROR) |
70 |
> |
INTEGER COMM, IERROR |
71 |
> |
END SUBROUTINE MPI_BARRIER |
72 |
> |
|
73 |
> |
SUBROUTINE MPI_COMM_RANK(COMM, RANK, IERROR) |
74 |
> |
INTEGER COMM, RANK, IERROR |
75 |
> |
END SUBROUTINE MPI_COMM_RANK |
76 |
> |
|
77 |
> |
SUBROUTINE MPI_COMM_SIZE(COMM, SIZE, IERROR) |
78 |
> |
INTEGER COMM, SIZE, IERROR |
79 |
> |
END SUBROUTINE MPI_COMM_SIZE |
80 |
> |
! |
81 |
> |
SUBROUTINE MPI_COMM_SPLIT(COMM, COLOR, KEY, NEWCOMM, IERROR) |
82 |
> |
INTEGER COMM, COLOR, KEY, NEWCOMM, IERROR |
83 |
> |
END SUBROUTINE MPI_COMM_SPLIT |
84 |
> |
|
85 |
> |
SUBROUTINE MPI_GET_PROCESSOR_NAME( NAME, RESULTLEN, IERROR) |
86 |
> |
CHARACTER(len=*) :: NAME |
87 |
> |
INTEGER RESULTLEN,IERROR |
88 |
> |
END SUBROUTINE MPI_GET_PROCESSOR_NAME |
89 |
> |
|
90 |
> |
! FUNCTION MPI_WTICK() |
91 |
> |
! DOUBLE PRECISION MPI_WTICK |
92 |
> |
! END FUNCTION MPI_WTICK |
93 |
> |
end interface |
94 |
> |
|
95 |
> |
!! These routines are overloaded and require multiple argument types |
96 |
|
interface mpi_allreduce |
97 |
|
module procedure mpi_allreduce_int |
98 |
|
module procedure mpi_allreduce_int_1d |
102 |
|
module procedure mpi_allreduce_dp_2d |
103 |
|
end interface |
104 |
|
|
105 |
< |
! interface mpi_reduce |
106 |
< |
! module procedure mpi_reduce_int |
107 |
< |
! module procedure mpi_reduce_int_1d |
108 |
< |
! module procedure mpi_reduce_int_2d |
109 |
< |
! module procedure mpi_reduce_dp |
110 |
< |
! module procedure mpi_reduce_dp_1d |
111 |
< |
! module procedure mpi_reduce_dp_2d |
112 |
< |
! end interface |
113 |
< |
|
105 |
> |
! interface mpi_reduce |
106 |
> |
! module procedure mpi_reduce_int |
107 |
> |
! module procedure mpi_reduce_int_1d |
108 |
> |
! module procedure mpi_reduce_int_2d |
109 |
> |
! module procedure mpi_reduce_dp |
110 |
> |
! module procedure mpi_reduce_dp_1d |
111 |
> |
! module procedure mpi_reduce_dp_2d |
112 |
> |
! end interface |
113 |
> |
|
114 |
|
interface mpi_reduce_scatter |
115 |
|
module procedure mpi_reduce_scatter_int |
116 |
|
module procedure mpi_reduce_scatter_int_1d |
162 |
|
module procedure mpi_bcast_char |
163 |
|
module procedure mpi_bcast_logical |
164 |
|
module procedure mpi_bcast_logical_1d |
165 |
< |
end interface |
165 |
> |
end interface |
166 |
|
|
167 |
|
interface mpi_recv |
168 |
|
module procedure mpi_recv_int |
175 |
|
module procedure mpi_recv_char |
176 |
|
module procedure mpi_recv_logical |
177 |
|
module procedure mpi_recv_logical_1d |
178 |
< |
end interface |
178 |
> |
end interface |
179 |
|
|
180 |
|
|
181 |
|
|
183 |
|
|
184 |
|
|
185 |
|
|
186 |
< |
!! MPI BCAST FUNCTIONS |
186 |
> |
!! MPI BCAST FUNCTIONS |
187 |
|
subroutine mpi_bcast_t(BUFFER, COUNT, DATATYPE, ROOT, COMM, & |
188 |
|
IERROR) |
189 |
< |
character (len=*),dimension(:) :: BUFFER |
190 |
< |
integer :: COUNT, DATATYPE, ROOT, COMM, IERROR |
191 |
< |
external MPI_BCAST |
192 |
< |
call MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR) |
189 |
> |
character (len=*),dimension(:) :: BUFFER |
190 |
> |
integer :: COUNT, DATATYPE, ROOT, COMM, IERROR |
191 |
> |
external MPI_BCAST |
192 |
> |
call MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR) |
193 |
|
end subroutine mpi_bcast_t |
194 |
|
|
195 |
|
subroutine mpi_bcast_char(BUFFER, COUNT, DATATYPE, ROOT, COMM, & |
196 |
|
IERROR) |
197 |
< |
character (len=*) :: BUFFER |
198 |
< |
integer :: COUNT, DATATYPE, ROOT, COMM, IERROR |
199 |
< |
external MPI_BCAST |
200 |
< |
call MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR) |
197 |
> |
character (len=*) :: BUFFER |
198 |
> |
integer :: COUNT, DATATYPE, ROOT, COMM, IERROR |
199 |
> |
external MPI_BCAST |
200 |
> |
call MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR) |
201 |
|
end subroutine mpi_bcast_char |
202 |
|
|
203 |
|
subroutine mpi_bcast_int(BUFFER, COUNT, DATATYPE, ROOT, COMM, & |
204 |
|
IERROR) |
205 |
< |
integer :: BUFFER |
206 |
< |
integer :: COUNT, DATATYPE, ROOT, COMM, IERROR |
207 |
< |
external MPI_BCAST |
208 |
< |
call MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR) |
205 |
> |
integer :: BUFFER |
206 |
> |
integer :: COUNT, DATATYPE, ROOT, COMM, IERROR |
207 |
> |
external MPI_BCAST |
208 |
> |
call MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR) |
209 |
|
end subroutine mpi_bcast_int |
210 |
|
|
211 |
|
subroutine mpi_bcast_int_1d(BUFFER, COUNT, DATATYPE, ROOT, COMM, & |
212 |
|
IERROR) |
213 |
< |
integer, dimension(:) :: BUFFER |
214 |
< |
integer :: COUNT, DATATYPE, ROOT, COMM, IERROR |
215 |
< |
external MPI_BCAST |
216 |
< |
call MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR) |
213 |
> |
integer, dimension(:) :: BUFFER |
214 |
> |
integer :: COUNT, DATATYPE, ROOT, COMM, IERROR |
215 |
> |
external MPI_BCAST |
216 |
> |
call MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR) |
217 |
|
end subroutine mpi_bcast_int_1d |
218 |
|
|
219 |
|
subroutine mpi_bcast_int_2d(BUFFER, COUNT, DATATYPE, ROOT, COMM, & |
220 |
|
IERROR) |
221 |
< |
integer, dimension(:,:) :: BUFFER |
222 |
< |
integer :: COUNT, DATATYPE, ROOT, COMM, IERROR |
223 |
< |
external MPI_BCAST |
224 |
< |
call MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR) |
221 |
> |
integer, dimension(:,:) :: BUFFER |
222 |
> |
integer :: COUNT, DATATYPE, ROOT, COMM, IERROR |
223 |
> |
external MPI_BCAST |
224 |
> |
call MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR) |
225 |
|
end subroutine mpi_bcast_int_2d |
226 |
|
|
227 |
|
subroutine mpi_bcast_dp(BUFFER, COUNT, DATATYPE, ROOT, COMM, & |
228 |
|
IERROR) |
229 |
< |
real(kind = dp) :: BUFFER |
230 |
< |
integer :: COUNT, DATATYPE, ROOT, COMM, IERROR |
231 |
< |
external MPI_BCAST |
232 |
< |
call MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR) |
229 |
> |
real(kind = dp) :: BUFFER |
230 |
> |
integer :: COUNT, DATATYPE, ROOT, COMM, IERROR |
231 |
> |
external MPI_BCAST |
232 |
> |
call MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR) |
233 |
|
end subroutine mpi_bcast_dp |
234 |
|
|
235 |
|
subroutine mpi_bcast_dp_1d(BUFFER, COUNT, DATATYPE, ROOT, COMM, & |
236 |
|
IERROR) |
237 |
< |
real(kind = dp),dimension(:) :: BUFFER |
238 |
< |
integer :: COUNT, DATATYPE, ROOT, COMM, IERROR |
239 |
< |
external MPI_BCAST |
240 |
< |
call MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR) |
237 |
> |
real(kind = dp),dimension(:) :: BUFFER |
238 |
> |
integer :: COUNT, DATATYPE, ROOT, COMM, IERROR |
239 |
> |
external MPI_BCAST |
240 |
> |
call MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR) |
241 |
|
end subroutine mpi_bcast_dp_1d |
242 |
|
|
243 |
|
subroutine mpi_bcast_dp_2d(BUFFER, COUNT, DATATYPE, ROOT, COMM, & |
244 |
|
IERROR) |
245 |
< |
real(kind = dp),dimension(:,:) :: BUFFER |
246 |
< |
integer :: COUNT, DATATYPE, ROOT, COMM, IERROR |
247 |
< |
external MPI_BCAST |
248 |
< |
call MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR) |
245 |
> |
real(kind = dp),dimension(:,:) :: BUFFER |
246 |
> |
integer :: COUNT, DATATYPE, ROOT, COMM, IERROR |
247 |
> |
external MPI_BCAST |
248 |
> |
call MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR) |
249 |
|
end subroutine mpi_bcast_dp_2d |
250 |
|
|
251 |
|
subroutine mpi_bcast_logical(BUFFER, COUNT, DATATYPE, ROOT, COMM, & |
266 |
|
|
267 |
|
|
268 |
|
|
269 |
< |
!---------------------END MPIBCAST--------------------------------- |
269 |
> |
!---------------------END MPIBCAST--------------------------------- |
270 |
|
|
271 |
|
|
272 |
< |
!--------------------MPISEND------------------------------------- |
272 |
> |
!--------------------MPISEND------------------------------------- |
273 |
|
SUBROUTINE MPI_SEND_T(BUF, COUNT, DATATYPE, DEST, TAG, COMM, & |
274 |
|
IERROR) |
275 |
|
character(len=*), dimension(:) :: BUF |
332 |
|
EXTERNAL MPI_SEND |
333 |
|
CALL MPI_SEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, IERROR) |
334 |
|
END SUBROUTINE MPI_SEND_INT_2D |
335 |
< |
|
335 |
> |
|
336 |
|
SUBROUTINE MPI_SEND_LOGICAL(BUF, COUNT, DATATYPE, DEST, TAG, COMM, & |
337 |
|
IERROR) |
338 |
|
LOGICAL :: BUF |
348 |
|
EXTERNAL MPI_SEND |
349 |
|
CALL MPI_SEND(BUF, COUNT, DATATYPE, DEST, TAG, COMM, IERROR) |
350 |
|
END SUBROUTINE MPI_SEND_LOGICAL_1D |
351 |
< |
! ----------------END MPISEND------------------------------> |
351 |
> |
! ----------------END MPISEND------------------------------> |
352 |
|
|
353 |
< |
!------------------BEGIN MPIRECV--------------------------> |
353 |
> |
!------------------BEGIN MPIRECV--------------------------> |
354 |
|
|
355 |
|
subroutine mpi_recv_T(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, & |
356 |
< |
STATUS, IERROR) |
357 |
< |
character(len=*), dimension(:) :: BUF |
358 |
< |
INTEGER COUNT, DATATYPE, SOURCE, TAG, COMM, & |
356 |
> |
STATUS, IERROR) |
357 |
> |
character(len=*), dimension(:) :: BUF |
358 |
> |
INTEGER COUNT, DATATYPE, SOURCE, TAG, COMM, & |
359 |
|
STATUS(MPI_STATUS_SIZE), IERROR |
360 |
< |
EXTERNAL MPI_RECV |
361 |
< |
CALL MPI_RECV(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, STATUS, & |
360 |
> |
EXTERNAL MPI_RECV |
361 |
> |
CALL MPI_RECV(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, STATUS, & |
362 |
|
IERROR) |
363 |
|
end subroutine mpi_recv_T |
364 |
|
|
365 |
|
subroutine mpi_recv_char(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, & |
366 |
< |
STATUS, IERROR) |
367 |
< |
character(len=*) :: BUF |
368 |
< |
INTEGER COUNT, DATATYPE, SOURCE, TAG, COMM, & |
366 |
> |
STATUS, IERROR) |
367 |
> |
character(len=*) :: BUF |
368 |
> |
INTEGER COUNT, DATATYPE, SOURCE, TAG, COMM, & |
369 |
|
STATUS(MPI_STATUS_SIZE), IERROR |
370 |
< |
EXTERNAL MPI_RECV |
371 |
< |
CALL MPI_RECV(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, STATUS, & |
370 |
> |
EXTERNAL MPI_RECV |
371 |
> |
CALL MPI_RECV(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, STATUS, & |
372 |
|
IERROR) |
373 |
|
end subroutine mpi_recv_char |
374 |
|
|
375 |
|
subroutine mpi_recv_int(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, & |
376 |
< |
STATUS, IERROR) |
377 |
< |
INTEGER :: BUF |
378 |
< |
INTEGER COUNT, DATATYPE, SOURCE, TAG, COMM, & |
376 |
> |
STATUS, IERROR) |
377 |
> |
INTEGER :: BUF |
378 |
> |
INTEGER COUNT, DATATYPE, SOURCE, TAG, COMM, & |
379 |
|
STATUS(MPI_STATUS_SIZE), IERROR |
380 |
< |
EXTERNAL MPI_RECV |
381 |
< |
CALL MPI_RECV(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, STATUS, & |
380 |
> |
EXTERNAL MPI_RECV |
381 |
> |
CALL MPI_RECV(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, STATUS, & |
382 |
|
IERROR) |
383 |
|
end subroutine mpi_recv_int |
384 |
|
|
385 |
|
subroutine mpi_recv_int_1d(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, & |
386 |
< |
STATUS, IERROR) |
387 |
< |
INTEGER, dimension(:) :: BUF |
388 |
< |
INTEGER COUNT, DATATYPE, SOURCE, TAG, COMM, & |
386 |
> |
STATUS, IERROR) |
387 |
> |
INTEGER, dimension(:) :: BUF |
388 |
> |
INTEGER COUNT, DATATYPE, SOURCE, TAG, COMM, & |
389 |
|
STATUS(MPI_STATUS_SIZE), IERROR |
390 |
< |
EXTERNAL MPI_RECV |
391 |
< |
CALL MPI_RECV(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, STATUS, & |
390 |
> |
EXTERNAL MPI_RECV |
391 |
> |
CALL MPI_RECV(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, STATUS, & |
392 |
|
IERROR) |
393 |
|
end subroutine mpi_recv_int_1d |
394 |
|
subroutine mpi_recv_int_2d(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, & |
395 |
|
STATUS, IERROR) |
396 |
|
INTEGER, dimension(:,:) :: BUF |
397 |
|
INTEGER COUNT, DATATYPE, SOURCE, TAG, COMM, & |
398 |
< |
STATUS(MPI_STATUS_SIZE), IERROR |
398 |
> |
STATUS(MPI_STATUS_SIZE), IERROR |
399 |
|
EXTERNAL MPI_RECV |
400 |
|
CALL MPI_RECV(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, STATUS, & |
401 |
< |
IERROR) |
401 |
> |
IERROR) |
402 |
|
end subroutine mpi_recv_int_2d |
403 |
|
|
404 |
|
subroutine mpi_recv_dp(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, & |
450 |
|
CALL MPI_RECV(BUF, COUNT, DATATYPE, SOURCE, TAG, COMM, STATUS, & |
451 |
|
IERROR) |
452 |
|
end subroutine mpi_recv_logical |
453 |
< |
!-------------------------END MPIRECV------------------------------ |
453 |
> |
!-------------------------END MPIRECV------------------------------ |
454 |
|
|
455 |
< |
!-------------------------MPI_ALLREDUCE---------------------------- |
455 |
> |
!-------------------------MPI_ALLREDUCE---------------------------- |
456 |
|
|
457 |
|
SUBROUTINE MPI_ALLREDUCE_int(SENDBUF, RECVBUF, COUNT, DATATYPE, & |
458 |
< |
OP, COMM, IERROR) |
458 |
> |
OP, COMM, IERROR) |
459 |
|
INTEGER :: SENDBUF, RECVBUF |
460 |
|
INTEGER COUNT, DATATYPE, OP, COMM, IERROR |
461 |
|
EXTERNAL MPI_ALLREDUCE |
462 |
|
CALL MPI_ALLREDUCE(SENDBUF, RECVBUF, COUNT, DATATYPE, OP, & |
463 |
< |
COMM, IERROR) |
463 |
> |
COMM, IERROR) |
464 |
|
END SUBROUTINE MPI_ALLREDUCE_INT |
465 |
|
|
466 |
|
SUBROUTINE MPI_ALLREDUCE_INT_1d(SENDBUF, RECVBUF, COUNT, DATATYPE, & |
467 |
< |
OP, COMM, IERROR) |
467 |
> |
OP, COMM, IERROR) |
468 |
|
INTEGER,dimension(:) :: SENDBUF, RECVBUF |
469 |
|
INTEGER COUNT, DATATYPE, OP, COMM, IERROR |
470 |
|
EXTERNAL MPI_ALLREDUCE |
471 |
|
CALL MPI_ALLREDUCE(SENDBUF, RECVBUF, COUNT, DATATYPE, OP, & |
472 |
< |
COMM, IERROR) |
472 |
> |
COMM, IERROR) |
473 |
|
END SUBROUTINE MPI_ALLREDUCE_INT_1D |
474 |
|
|
475 |
|
SUBROUTINE MPI_ALLREDUCE_INT_2D(SENDBUF, RECVBUF, COUNT, DATATYPE, & |
476 |
< |
OP, COMM, IERROR) |
476 |
> |
OP, COMM, IERROR) |
477 |
|
integer,dimension(:,:) :: SENDBUF, RECVBUF |
478 |
|
INTEGER COUNT, DATATYPE, OP, COMM, IERROR |
479 |
|
EXTERNAL MPI_ALLREDUCE |
480 |
|
CALL MPI_ALLREDUCE(SENDBUF, RECVBUF, COUNT, DATATYPE, OP, & |
481 |
< |
COMM, IERROR) |
481 |
> |
COMM, IERROR) |
482 |
|
END SUBROUTINE MPI_ALLREDUCE_INT_2D |
483 |
|
|
484 |
|
SUBROUTINE MPI_ALLREDUCE_DP(SENDBUF, RECVBUF, COUNT, DATATYPE, & |
485 |
< |
OP, COMM, IERROR) |
485 |
> |
OP, COMM, IERROR) |
486 |
|
REAL(kind=dp) :: SENDBUF, RECVBUF |
487 |
|
INTEGER COUNT, DATATYPE, OP, COMM, IERROR |
488 |
|
EXTERNAL MPI_ALLREDUCE |
489 |
|
CALL MPI_ALLREDUCE(SENDBUF, RECVBUF, COUNT, DATATYPE, OP, & |
490 |
< |
COMM, IERROR) |
490 |
> |
COMM, IERROR) |
491 |
|
END SUBROUTINE MPI_ALLREDUCE_DP |
492 |
|
|
493 |
|
SUBROUTINE MPI_ALLREDUCE_DP_1d(SENDBUF, RECVBUF, COUNT, DATATYPE, & |
494 |
< |
OP, COMM, IERROR) |
494 |
> |
OP, COMM, IERROR) |
495 |
|
REAL(kind=dp),dimension(:) :: SENDBUF, RECVBUF |
496 |
|
INTEGER COUNT, DATATYPE, OP, COMM, IERROR |
497 |
|
EXTERNAL MPI_ALLREDUCE |
498 |
|
CALL MPI_ALLREDUCE(SENDBUF, RECVBUF, COUNT, DATATYPE, OP, & |
499 |
< |
COMM, IERROR) |
499 |
> |
COMM, IERROR) |
500 |
|
END SUBROUTINE MPI_ALLREDUCE_DP_1D |
501 |
|
|
502 |
|
SUBROUTINE MPI_ALLREDUCE_DP_2D(SENDBUF, RECVBUF, COUNT, DATATYPE, & |
503 |
< |
OP, COMM, IERROR) |
503 |
> |
OP, COMM, IERROR) |
504 |
|
real(kind=dp),dimension(:,:) :: SENDBUF, RECVBUF |
505 |
|
INTEGER COUNT, DATATYPE, OP, COMM, IERROR |
506 |
|
EXTERNAL MPI_ALLREDUCE |
507 |
|
CALL MPI_ALLREDUCE(SENDBUF, RECVBUF, COUNT, DATATYPE, OP, & |
508 |
< |
COMM, IERROR) |
508 |
> |
COMM, IERROR) |
509 |
|
END SUBROUTINE MPI_ALLREDUCE_DP_2D |
510 |
< |
!-----------------END MPI_ALLREDUCE--------------------------> |
510 |
> |
!-----------------END MPI_ALLREDUCE--------------------------> |
511 |
|
|
512 |
< |
!----------------BEGIN MPI_REDUCE_SCATTER |
512 |
> |
!----------------BEGIN MPI_REDUCE_SCATTER |
513 |
|
SUBROUTINE MPI_REDUCE_SCATTER_DP(SENDBUF, RECVBUF, RECVCOUNTS, & |
514 |
|
DATATYPE, OP, COMM, IERROR) |
515 |
|
real(kind=dp) :: SENDBUF, RECVBUF |
564 |
|
DATATYPE, OP, COMM, IERROR) |
565 |
|
END SUBROUTINE MPI_REDUCE_SCATTER_INT_2D |
566 |
|
|
567 |
< |
!end ---------------------MPI_REDUCE_SCATTER-----------------> |
567 |
> |
!end ---------------------MPI_REDUCE_SCATTER-----------------> |
568 |
|
|
569 |
< |
!BEGIN------------------- MPI_ALLGATHERV---------------------> |
569 |
> |
!BEGIN------------------- MPI_ALLGATHERV---------------------> |
570 |
|
SUBROUTINE MPI_ALLGATHERV_INT(SENDBUF, SENDCOUNT, SENDTYPE, & |
571 |
|
RECVBUF, RECVCOUNTS, DISPLS, RECVTYPE, COMM, IERROR) |
572 |
|
INTEGER :: SENDBUF |
598 |
|
RECVCOUNTS, DISPLS, RECVTYPE, COMM, IERROR) |
599 |
|
END SUBROUTINE MPI_ALLGATHERV_INT_2D |
600 |
|
|
601 |
< |
SUBROUTINE MPI_ALLGATHERV_DP(SENDBUF, SENDCOUNT, SENDTYPE, & |
601 |
> |
SUBROUTINE MPI_ALLGATHERV_DP(SENDBUF, SENDCOUNT, SENDTYPE, & |
602 |
|
RECVBUF, RECVCOUNTS, DISPLS, RECVTYPE, COMM, IERROR) |
603 |
|
real(kind=dp) :: SENDBUF |
604 |
|
real(kind=dp),dimension(:) :: RECVBUF |
628 |
|
CALL MPI_ALLGATHERV(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, & |
629 |
|
RECVCOUNTS, DISPLS, RECVTYPE, COMM, IERROR) |
630 |
|
END SUBROUTINE MPI_ALLGATHERV_DP_2D |
631 |
< |
!--------------------------end MPI_ALLGATHERV-----------------------> |
631 |
> |
!--------------------------end MPI_ALLGATHERV-----------------------> |
632 |
|
|
633 |
|
SUBROUTINE MPI_ALLGATHER_DP(SENDBUF, SENDCOUNT, SENDTYPE, & |
634 |
< |
RECVBUF, RECVCOUNT, RECVTYPE, COMM, IERROR) |
634 |
> |
RECVBUF, RECVCOUNT, RECVTYPE, COMM, IERROR) |
635 |
|
real(kind=dp) :: SENDBUF |
636 |
|
real(kind=dp), dimension(:) :: RECVBUF |
637 |
|
INTEGER SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, COMM, IERROR |
641 |
|
END SUBROUTINE MPI_ALLGATHER_DP |
642 |
|
|
643 |
|
SUBROUTINE MPI_ALLGATHER_DP_1D(SENDBUF, SENDCOUNT, SENDTYPE, & |
644 |
< |
RECVBUF, RECVCOUNT, RECVTYPE, COMM, IERROR) |
644 |
> |
RECVBUF, RECVCOUNT, RECVTYPE, COMM, IERROR) |
645 |
|
real(kind=dp),dimension(:) :: SENDBUF, RECVBUF |
646 |
|
INTEGER SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, COMM, IERROR |
647 |
|
EXTERNAL MPI_ALLGATHER |
650 |
|
END SUBROUTINE MPI_ALLGATHER_DP_1D |
651 |
|
|
652 |
|
SUBROUTINE MPI_ALLGATHER_DP_2D(SENDBUF, SENDCOUNT, SENDTYPE, & |
653 |
< |
RECVBUF, RECVCOUNT, RECVTYPE, COMM, IERROR) |
653 |
> |
RECVBUF, RECVCOUNT, RECVTYPE, COMM, IERROR) |
654 |
|
real(kind=dp),dimension(:,:) :: SENDBUF, RECVBUF |
655 |
|
INTEGER SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, COMM, IERROR |
656 |
|
EXTERNAL MPI_ALLGATHER |
659 |
|
END SUBROUTINE MPI_ALLGATHER_DP_2D |
660 |
|
|
661 |
|
SUBROUTINE MPI_ALLGATHER_INT(SENDBUF, SENDCOUNT, SENDTYPE, & |
662 |
< |
RECVBUF, RECVCOUNT, RECVTYPE, COMM, IERROR) |
662 |
> |
RECVBUF, RECVCOUNT, RECVTYPE, COMM, IERROR) |
663 |
|
integer :: SENDBUF |
664 |
|
integer,dimension(:) :: RECVBUF |
665 |
|
INTEGER SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, COMM, IERROR |
669 |
|
END SUBROUTINE MPI_ALLGATHER_INT |
670 |
|
|
671 |
|
SUBROUTINE MPI_ALLGATHER_INT_1D(SENDBUF, SENDCOUNT, SENDTYPE, & |
672 |
< |
RECVBUF, RECVCOUNT, RECVTYPE, COMM, IERROR) |
672 |
> |
RECVBUF, RECVCOUNT, RECVTYPE, COMM, IERROR) |
673 |
|
integer,dimension(:) :: SENDBUF, RECVBUF |
674 |
|
INTEGER SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, COMM, IERROR |
675 |
|
EXTERNAL MPI_ALLGATHER |
678 |
|
END SUBROUTINE MPI_ALLGATHER_INT_1D |
679 |
|
|
680 |
|
SUBROUTINE MPI_ALLGATHER_INT_2D(SENDBUF, SENDCOUNT, SENDTYPE, & |
681 |
< |
RECVBUF, RECVCOUNT, RECVTYPE, COMM, IERROR) |
681 |
> |
RECVBUF, RECVCOUNT, RECVTYPE, COMM, IERROR) |
682 |
|
integer,dimension(:,:) :: SENDBUF, RECVBUF |
683 |
|
INTEGER SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, COMM, IERROR |
684 |
|
EXTERNAL MPI_ALLGATHER |
685 |
|
CALL MPI_ALLGATHER(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, & |
686 |
|
RECVCOUNT, RECVTYPE, COMM, IERROR) |
687 |
|
END SUBROUTINE MPI_ALLGATHER_INT_2D |
688 |
< |
!-----------------------END MPI_ALLGATHER--------------------------- |
688 |
> |
!-----------------------END MPI_ALLGATHER--------------------------- |
689 |
|
|
690 |
|
#endif |
691 |
|
end module oopseMPI |