KronLinInv  0.3
Kronecker-product-based linear inversion

◆ para_srint()

subroutine parautil::para_srint ( integer, intent(in)  source,
integer, intent(in)  dest,
integer, intent(in)  tag,
integer, intent(in)  sint,
integer, intent(inout)  rint 
)

Definition at line 196 of file ompi_kronlininv.f08.

196  integer,intent(in) :: source,dest,tag
197  integer,intent(in) :: sint
198  integer,intent(inout) :: rint
199  integer :: nelem,mpierr
200  integer :: mpistat(mpi_status_size)
201 
202  if ((myrank==source) .and. (myrank==dest)) then
203  rint = sint
204  else
205  if (myrank==source) then
206  call mpi_send(sint, nelem, mpi_integer, dest, tag, &
207  mpi_comm_world, mpierr)
208  end if
209  if (myrank==dest) then
210  call mpi_recv(rint, nelem, mpi_integer, source, tag,&
211  mpi_comm_world, mpistat, mpierr)
212  end if
213  end if
214 
integer, public, protected myrank