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..
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
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
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
*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
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