<div>I have a lot of issues with my legal department on 3rd party code. I jumped through hoops to get approval starting at 1.0.4. Every litle change is the begining of endless paper works and reviews. The approval to use 106 was on conditions that I use only the enahncment and bug fixes in that version. So, I have to stay with what I am approved for.</div> <div> </div> <div>For now, I will just write some if..else in my code, and use an external flag to control it.</div> <div> </div> <div>tan</div> <div><BR><BR><B><I>Darius Buntinas <buntinas@mcs.anl.gov></I></B> wrote:</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR>Hmm. I can't see a way that an MPI implementation could (efficiently <BR>and reliably) check that two virtual addresses from different processes <BR>point to the same location in a shared memory region. An MPI <BR>implementation wouldn't have enough
information to do what you're asking.<BR><BR>Rusty Lusk mentioned to me that there was a message-passing library <BR>called p4 that would allow this kind of thing. You would allocate a <BR>message using p4_msg_alloc(), then fill the message and send it. The <BR>receiver can receive the message without specifying a destination <BR>buffer. In this case, on a shared memory machine, the receiver gets a <BR>pointer to the original buffer allocated by the sender using <BR>p4_msg_alloc(), and no copy is made.<BR><BR>-d<BR><BR>On 10/09/2007 11:53 AM, chong tan wrote:<BR>> Well, shared-mem and sending 0 byte does not work if the processes are <BR>> on differnt boxes. My thought is that since MPICH already make the <BR>> dicission on wheter to use shared memory. It is a nature fit that the <BR>> 'no copy' rule be applied in that domain.<BR>> <BR>> thanks<BR>> tan<BR>> <BR>> <BR>> */Darius Buntinas <BUNTINAS@MCS.ANL.GOV>/* wrote:<BR>> <BR>>
<BR>> <BR>> On 10/08/2007 01:38 PM, chong tan wrote:<BR>> > I am interested in the case that the send and recieve buffer are the<BR>> > same buffer allocated from shared-memory, in which case there is<BR>> no need<BR>> > for the data copying, send and recieve just only do the sync.<BR>> <BR>> In this case, why not use a zero-byte message? The sender fills in the<BR>> shared buffer, does a write barrier, then calls MPI_Send with a<BR>> zero-byte message. The receiver calls MPI_Recv, to receive zero bytes,<BR>> then when it returns, it does a read barrier and reads the data from<BR>> the<BR>> shared buffer.<BR>> <BR>> > A side question, when MPI_Send is called, does MPICH copy the<BR>> data into<BR>> > a intermediate global buffer ? and have the data copy from this same<BR>> > buffer on MPI_Recv call ?<BR>> <BR>> It depends on the channel and what you're sending. For non-contiguous<BR>> data,
the data may be packed into a contiguous buffer before sending<BR>> and<BR>> unpacked from a contiguous buffer when receiving. Otherwise, if a<BR>> channel uses sockets, an intermediate buffer is not used by MPICH2, but<BR>> the OS will perform intermediate copies. For a channel that uses a<BR>> high-performance network, an intermediate buffer is used for small<BR>> messages, but for large messages the data is transferred directly from<BR>> or into the user's buffer.<BR>> <BR>> -d<BR>> <BR>> > tan<BR>> ><BR>> ><BR>> > */Darius Buntinas /* wrote:<BR>> ><BR>> ><BR>> > Well, you specify one buffer in the call to MPI_Send and another<BR>> buffer<BR>> > in MPI_Recv, so there would have to be at least one copy. You<BR>> can't do<BR>> > it without any copies (otherwise, how would the data get from the<BR>> send<BR>> > buffer to the receive buffer?).<BR>> ><BR>> > MPICH2
does support communication over shared memory (as opposed to<BR>> > over<BR>> > a network) which improves performance for intranode communication.<BR>> > Configure with --with-device=ch3:ssm or --with-device=ch3:nemesis.<BR>> ><BR>> > Darius<BR>> ><BR>> ><BR>> > On 10/08/2007 12:22 PM, chong tan wrote:<BR>> > > If I the pointer passed to MPI_Send and MPI_Recieve are already<BR>> > shared<BR>> > > memory, and need not be copied at all ?<BR>> > ><BR>> > > If so, How ?<BR>> > ><BR>> > > thanks<BR>> > > tan<BR>> > ><BR>> > ><BR>> > ><BR>> ><BR>> ------------------------------------------------------------------------<BR>> > > Be a better Heartthrob. Get better relationship answers<BR>> > > from<BR>> > > someone who knows.<BR>> > > Yahoo! Answers - Check it out.<BR>> ><BR>>
><BR>> ><BR>> ------------------------------------------------------------------------<BR>> > Need a vacation? Get great deals to amazing places<BR>> > on<BR>> > Yahoo! Travel.<BR>> <BR>> <BR>> ------------------------------------------------------------------------<BR>> Boardwalk for $500? In 2007? Ha!<BR>> Play Monopoly Here and Now <BR>> <HTTP: evt="48223/*http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow" us.rd.yahoo.com><BR>> (it's updated for today's economy) at Yahoo! Games.<BR><BR></BLOCKQUOTE><BR><p> 
<hr size=1>Boardwalk for $500? In 2007? Ha! <br><a href="http://us.rd.yahoo.com/evt=48223/*http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow">Play Monopoly Here and Now</a> (it's updated for today's economy) at Yahoo! Games.