21 use ctlblk_mod
, only: num_procs, jend, iup, jsta, idn, mpi_comm_comp, im,&
28 real,
intent(inout) :: a ( im,jsta_2l:jend_2u )
29 integer status(mpi_status_size)
30 integer ierr, jstam1, jendp1
35 if ( num_procs <= 1 )
return
37 jstam1 = max(jsta_2l,jsta-1)
38 call mpi_sendrecv(a(1,jend),im,mpi_real,iup,1, &
39 & a(1,jstam1),im,mpi_real,idn,1, &
40 & mpi_comm_comp,status,ierr)
43 print *,
' problem with first sendrecv in exch, ierr = ',ierr
46 jendp1 = min(jend+1,jend_2u)
47 call mpi_sendrecv(a(1,jsta),im,mpi_real,idn,1, &
48 & a(1,jendp1),im,mpi_real,iup,1, &
49 & mpi_comm_comp,status,ierr)
52 print *,
' problem with second sendrecv in exch, ierr = ',ierr
67 use ctlblk_mod
, only: num_procs, jend, iup, jsta, idn, &
68 & mpi_comm_comp, im, jsta_2l, jend_2u
74 real,
intent(inout) :: a ( im,jsta_2l:jend_2u )
75 integer status(mpi_status_size)
76 integer ierr, jstam1, jendp1
78 if ( num_procs == 1 )
return
80 jstam1 = max(jsta_2l,jsta-1)
81 call mpi_sendrecv(a(1,jend),im,mpi_real,iup,1, &
82 & a(1,jstam1),im,mpi_real,idn,1, &
83 & mpi_comm_comp,status,ierr)
85 print *,
' problem with first sendrecv in exch, ierr = ',ierr
88 jendp1=min(jend+1,jend_2u)
89 call mpi_sendrecv(a(1,jsta),im,mpi_real,idn,1, &
90 & a(1,jendp1),im,mpi_real,iup,1, &
91 & mpi_comm_comp,status,ierr)
93 print *,
' problem with second sendrecv in exch, ierr = ',ierr