UPP  11.0.0
 All Data Structures Files Functions Variables Pages
COLLECT.f
Go to the documentation of this file.
1 
15  SUBROUTINE collect (A, B)
16 
17 
18  use ctlblk_mod, only: num_procs, jsta, icnt, idsp, mpi_comm_comp, im, jm, me
19 !- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
20 !
21  implicit none
22 !
23  include 'mpif.h'
24 !
25  real,intent(in) :: a ( im, jm )
26  real,intent(out) :: b ( im, jm )
27 ! integer i, j
28  integer ierr
29 !
30  if ( num_procs <= 1 ) then
31  b = a
32  else
33  call mpi_gatherv(a(1,jsta),icnt(me),mpi_real, &
34  & b,icnt,idsp,mpi_real,0,mpi_comm_comp,ierr)
35  end if
36  end