Re: [OMPI users] Is there an "flush()"-like function in MPI?

2009-09-27 Thread Ashley Pittman

There are tools available to allow you to see the "message queues" of a
process, this might help you identify why you aren't seeing the messages
that you are waiting on complete.  One such tool is linked to in my
signature, you could also look into TotalView or DDT as well.

I would also suggest that as you are seeing random hangs and crashes
running your code under Valgrind might be advantageous.

Ashley Pittman.

On Sun, 2009-09-27 at 02:05 +0800, guosong wrote:
> Yes, I know there should be a bug. But I do not know where and why.
> The strange thing was sometimes it worked but at this time there will
> be a segmentation fault. If it did not work, some process must sit
> there waiting for the message. There are many iterations in my
> program(using a loop). It would after a few iterations the "bug" would
> appear, which means the previous a few iterations the communication
> worked. I am quite comfused now.


-- 

Ashley Pittman, Bath, UK.

Padb - A open source job inspection tool for parallel computing
http://padb.pittman.org.uk



Re: [OMPI users] Is there an "flush()"-like function in MPI?

2009-09-26 Thread guosong

Yes, I know there should be a bug. But I do not know where and why. The strange 
thing was sometimes it worked but at this time there will be a segmentation 
fault. If it did not work, some process must sit there waiting for the message. 
There are many iterations in my program(using a loop). It would after a few 
iterations the "bug" would appear, which means the previous a few iterations 
the communication worked. I am quite comfused now.



List-Post: users@lists.open-mpi.org
Date: Sat, 26 Sep 2009 11:00:33 -0700
From: eugene@sun.com
To: us...@open-mpi.org
Subject: Re: [OMPI users] Is there an "flush()"-like function in MPI?

guosong wrote: 


Thanks for reply. One more thing I would like to know is that since the message 
has already left the sender, how to make sure that the receiver side receives 
this message? From the output of my program, it seems that the receiver side is 
waiting for the message(MPI_Recv).  
You mean how the sender can be sure to push the message all the way over to the 
receiver?  In practical terms, if the sender completes its send, the receiver 
should be able to poll and (in short order) see the message.  Sounds like you 
have a bug.

_
Messenger安全保护中心,免费修复系统漏洞,保护Messenger安全!
http://im.live.cn/safe/

Re: [OMPI users] Is there an "flush()"-like function in MPI?

2009-09-26 Thread Eugene Loh




guosong wrote:

  Thanks
for reply. One more thing I would like to know is that since the
message has already left the sender, how to make sure that the receiver
side receives this message? From the output of my program, it seems
that the receiver side is waiting for the message(MPI_Recv).  

You mean how the sender can be sure to push the message all the way
over to the receiver?  In practical terms, if the sender completes its
send, the receiver should be able to poll and (in short order) see the
message.  Sounds like you have a bug.




Re: [OMPI users] Is there an "flush()"-like function in MPI?

2009-09-26 Thread guosong

Thanks for reply. One more thing I would like to know is that since the message 
has already left the sender, how to make sure that the receiver side receives 
this message? From the output of my program, it seems that the receiver side is 
waiting for the message(MPI_Recv).  



List-Post: users@lists.open-mpi.org
Date: Sat, 26 Sep 2009 08:42:35 -0700
From: eugene@sun.com
To: us...@open-mpi.org
Subject: Re: [OMPI users] Is there an "flush()"-like function in MPI?

guosong wrote: 


Hi all,
I am wondering if there is an flush()-like function in MPI. I saw the output of 
my program. One sent something but some other process did not receive it, just 
sitting there waiting. I used MPI_Isend for sending and MPI_Recv for receiving. 
Is it possible the message was lost or the message was not flushed out and was 
still in the I/O buffer. Thanks.
If you send with MPI_Isend, the send operation is started.  In order to 
complete the send, you need a corresponding MPI_Wait (or MPI_Test or variant 
like MPI_Waitall, etc.).

Even then, it is possible for the MPI implementation to buffer the message 
internally.  That is, the completion of the send operation only means that the 
message has left the user's send buffer -- not that the message has been 
received at the other end.

There are also synchronous sends such as MPI_Ssend (or the non-blocking variant 
MPI_Issend).  This guarantees that the send completes not only once the message 
has left the user's send buffer but only only once the receiver has posted a 
matching receive.  It does not, however, guarantee that the full message has 
arrived at or been received by the receiver.

I think once you've completed the send (e.g., adding an MPI_Wait to your 
MPI_Isend), there is nothing more to do on the sender's side to push the 
message along.

_
Messenger安全保护中心,免费修复系统漏洞,保护Messenger安全!
http://im.live.cn/safe/

Re: [OMPI users] Is there an "flush()"-like function in MPI?

2009-09-26 Thread Eugene Loh




guosong wrote:

  Hi
all,
I am wondering if there is an flush()-like function in MPI. I saw
the output of my program. One sent something but some other process did
not receive it, just sitting there waiting. I used MPI_Isend for
sending and MPI_Recv for receiving. Is it possible the message was lost
or the message was not flushed out and was still in the I/O buffer.
Thanks.

If you send with MPI_Isend, the send operation is started.  In order to
complete the send, you need a corresponding MPI_Wait (or MPI_Test or
variant like MPI_Waitall, etc.).

Even then, it is possible for the MPI implementation to buffer the
message internally.  That is, the completion of the send operation only
means that the message has left the user's send buffer -- not that the
message has been received at the other end.

There are also synchronous sends such as MPI_Ssend (or the non-blocking
variant MPI_Issend).  This guarantees that the send completes not only
once the message has left the user's send buffer but only only once the
receiver has posted a matching receive.  It does not, however,
guarantee that the full message has arrived at or been received by the
receiver.

I think once you've completed the send (e.g., adding an MPI_Wait to
your MPI_Isend), there is nothing more to do on the sender's side to
push the message along.




Re: [OMPI users] Is there an "flush()"-like function in MPI?

2009-09-26 Thread Attila Börcs
Hi!

Do you use MPI_Wait or MPI_Waitall functions in your code? Because if you
achieve to non-blocking sending in your code, you should wait for
non-blocking sendig to complete.

All the best,

Attila Borcs

2009/9/26 guosong 

>  Hi all,
> I am wondering if there is an flush()-like function in MPI. I saw
> the output of my program. One sent something but some other process did not
> receive it, just sitting there waiting. I used MPI_Isend for sending and
> MPI_Recv for receiving. Is it possible the message was lost or the
> message was not flushed out and was still in the I/O buffer. Thanks.
>
>
>
> --
> 立刻下载 MSN 保护盾,保障Messenger 安全稳定! 现在就下载! 
>
> ___
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>


[OMPI users] Is there an "flush()"-like function in MPI?

2009-09-26 Thread guosong

Hi all,

I am wondering if there is an flush()-like function in MPI. I saw the output of 
my program. One sent something but some other process did not receive it, just 
sitting there waiting. I used MPI_Isend for sending and MPI_Recv for receiving. 
Is it possible the message was lost or the message was not flushed out and was 
still in the I/O buffer. Thanks.





_
Messenger10年嘉年华,礼品大奖等你拿!
http://10.msn.com.cn