Re: [OMPI users] any deadlocks in this sets of MPI_send and MPI_recv ?

2013-09-15 Thread Huangwei
Thanks very much, have a nice weekend! best regards, Huangwei On 15 September 2013 11:29, Jeff Squyres (jsquyres) wrote: > On Sep 14, 2013, at 12:21 PM, Huangwei wrote: > > > do i=1, N-1 > > allocate (QRECS(A(i))) > > itag = i > > call mpi_recv(QRECS..

Re: [OMPI users] any deadlocks in this sets of MPI_send and MPI_recv ?

2013-09-15 Thread Jeff Squyres (jsquyres)
On Sep 14, 2013, at 12:21 PM, Huangwei wrote: > do i=1, N-1 > allocate (QRECS(A(i))) > itag = i > call mpi_recv(QRECS..., i, itag, .) > deallocate(QRECS) > enddo I assume you're doing more than just allocate/mpi_recv/deallocate

Re: [OMPI users] any deadlocks in this sets of MPI_send and MPI_recv ?

2013-09-14 Thread Huangwei
Hi Jeff, Thank you very much. About the QRECS, it is an allocatable array, and it is introduced like: if(myrank .ne. 0) then itag = myrank call mpi_send(Q.., 0, itag, .) else do i=1, N-1 allocate (QRECS(A(i))) itag = i call m

Re: [OMPI users] any deadlocks in this sets of MPI_send and MPI_recv ?

2013-09-14 Thread Jeff Squyres (jsquyres)
At first glance, your code doesn't look problematic. First thing I'd check is ensure that QRECS is large enough to hold the incoming data (i.e., that you aren't overwriting the buffer and causing memory corruption, which can cause weird/unexplained faults like this). Also, you might well be ab

Re: [OMPI users] any deadlocks in this sets of MPI_send and MPI_recv ?

2013-09-13 Thread Huangwei
*The code I would like to post is like this:* * * if(myrank .ne. 0) then itag = myrank call mpi_send(Q.., 0, itag, .) else do i=1, N-1 itag = i call mpi_recv(QRECS..., i, itag, .) enddo endif call mpi_bcast(YVA

[OMPI users] any deadlocks in this sets of MPI_send and MPI_recv ?

2013-09-13 Thread Huangwei
Dear All, I have a question about using MPI_send and MPI_recv. *The object is as follows:* I would like to send an array Q from rank=1, N-1 to rank=0, and then rank 0 receives the Q from all other processors. Q will be put into a new array Y in rank 0. (of couse this is not realized by MPI). and