MPI communication between partitions

Numerical methods and mathematical models of Elmer
Post Reply
lionel
Posts: 27
Joined: 26 Jan 2010, 12:32

MPI communication between partitions

Post by lionel »

Hi Elmer,

The code lines written below aim at sending and receiving informations between partitions. The problem is it seems that I receive only half of the information I send. In the case below, only the first 500 ranks of "quadx_tot" are treated and received and written in "quadx_tot_recv"
I programmed this like what I saw in the module "SParIterComm" (around line 2400 for example)

! "quadx_tot_recv" is an allocated array, its size is higher than 1000
! "quadx_tot" is an allocated array, with some informations. I need only the first 1000 ranks
! "neigh(ii)" is an array with the neighbours identity inside
! "nei" is the size of neigh(ii)

ALLOCATE( requests(2*nei) )
CALL CheckBuffer( 10000 )

! send and receive informations about arrays
DO ii=1,nei
CALL MPI_IRECV( quadx_tot_recv , 1000 , MPI_REAL , neigh(ii) , 700 , MPI_COMM_WORLD , requests(2*(ii-1)+1) , ierr )
END DO
DO ii=1,nei
CALL MPI_ISEND( quadx_tot , 1000 , MPI_REAL , neigh(ii) , 700 , MPI_COMM_WORLD , requests(2*ii) , ierr )
END DO
CALL MPI_WAITALL( 2*nei , requests , MPI_STATUSES_IGNORE, ierr )

Thanks for helping
Lionel
Post Reply