Files
2017-10-26 19:57:24 +02:00

146 lines
12 KiB
HTML
Executable File

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>MPI On Cell (Documentation): Buffered Communication</title>
<link href="../../doxygen.css" rel="stylesheet" type="text/css">
<link href="../../tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="../../main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="../../modules.html"><span>Modules</span></a></li>
<li><a href="../../annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="../../files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>Buffered Communication<br>
<small>
[<a class="el" href="../../d0/d64/group__p2p__main.html">Point-to-Point Communication</a>]</small>
</h1>
<p>
<div class="dynheader">
Collaboration diagram for Buffered Communication:</div>
<div class="dynsection">
<center><table><tr><td><img src="../../de/d84/group__p2p__buffered.png" border="0" alt="" usemap="#d0/dd5/de_2d84_2group____p2p____buffered_map">
<map name="d0/dd5/de_2d84_2group____p2p____buffered_map">
<area shape="rect" href="../../d0/d64/group__p2p__main.html" title="Sending and receiving of messages by processes is the basic MPI communication mechanism..." alt="" coords="5,5,200,32"></map></td></tr></table></center>
</div>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Blocking sending of messages with the use of an intermediate buffer.
<p>
The blocking buffered send-operation returns if the send-buffer can be safely reused (after the data has been copied into the intermediate buffer).
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d84/group__p2p__buffered.html#g307bf844e1416c7c021e4a3468209d0b">MOC_Bsend</a> (void *buf, int count, <a class="el" href="../../dc/d6e/group__p2p__datatype.html#gb4e45f15c08578bd3fc97c0cca2a509a">MOC_Datatype</a> datatype, int dest, int tag, <a class="el" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767">MOC_Comm</a> comm)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Performs a blocking buffered mode send operation. <a href="#g307bf844e1416c7c021e4a3468209d0b"></a><br></td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g307bf844e1416c7c021e4a3468209d0b"></a><!-- doxytag: member="moc.h::MOC_Bsend" ref="g307bf844e1416c7c021e4a3468209d0b" args="(void *buf, int count, MOC_Datatype datatype, int dest, int tag, MOC_Comm comm)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int MOC_Bsend </td>
<td>(</td>
<td class="paramtype">void *&nbsp;</td>
<td class="paramname"> <em>buf</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>count</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../dc/d6e/group__p2p__datatype.html#gb4e45f15c08578bd3fc97c0cca2a509a">MOC_Datatype</a>&nbsp;</td>
<td class="paramname"> <em>datatype</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>dest</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&nbsp;</td>
<td class="paramname"> <em>tag</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767">MOC_Comm</a>&nbsp;</td>
<td class="paramname"> <em>comm</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Performs a blocking buffered mode send operation.
<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>This routine blocks until the send-buffer is free.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td><b>in</b> Pointer to buffer where data is stored </td></tr>
<tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td><b>in</b> Number of elements to be send (not equal to actual byte-value) </td></tr>
<tr><td valign="top"></td><td valign="top"><em>datatype</em>&nbsp;</td><td><b>in</b> Type of elements to be send </td></tr>
<tr><td valign="top"></td><td valign="top"><em>dest</em>&nbsp;</td><td><b>in</b> Rank of receiving process </td></tr>
<tr><td valign="top"></td><td valign="top"><em>tag</em>&nbsp;</td><td><b>in</b> Tag of message </td></tr>
<tr><td valign="top"></td><td valign="top"><em>comm</em>&nbsp;</td><td><b>in</b> communicator of message </td></tr>
</table>
</dl>
<dl compact><dt><b>Return values:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>MOC_SUCCESS</em>&nbsp;</td><td>No error; MPI routine completed successfully. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>...</em>&nbsp;</td><td>error-code </td></tr>
</table>
</dl>
<p>Definition at line <a class="el" href="../../d2/db6/moc__bsend__ppu_8c-source.html#l00010">10</a> of file <a class="el" href="../../d2/db6/moc__bsend__ppu_8c-source.html">moc_bsend_ppu.c</a>.</p>
<p>References <a class="el" href="../../d7/d1f/imoc__buffer__malloc_8c-source.html#l00056">__attribute__()</a>, <a class="el" href="../../dd/df5/structmoc__message__status__struct.html#c0bdc214525521d58f12c72874de0512">moc_message_status_struct::bits</a>, <a class="el" href="../../dd/df5/structmoc__message__status__struct.html#086c0d449d25774d43512b6f7fdab8ed">moc_message_status_struct::flags</a>, <a class="el" href="../../d7/d1f/imoc__buffer__malloc_8c-source.html#l00085">IMOC_bmalloc()</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00019">IMOC_EA_REMOTE_QUEUE</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00034">IMOC_EA_REMOTE_QUEUE_ENTRY</a>, <a class="el" href="../../d1/d2a/imoc__get__free__entry_8c-source.html#l00009">IMOC_getFreeEntry()</a>, <a class="el" href="../../dd/d18/imoc__get__free__mid_8c-source.html#l00009">IMOC_getFreeMID()</a>, <a class="el" href="../../db/db7/imoc__macros__ppu_8h-source.html#l00025">IMOC_LS_REMOTE_QUEUE</a>, <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00108">IMOC_MESSAGE_CHANNEL_DMA</a>, <a class="el" href="../../d6/d2c/imoc__core_8h-source.html#l00116">IMOC_MESSAGE_CHANNEL_ENV</a>, <a class="el" href="../../db/db1/imoc__dma-put__ppu_8c-source.html#l00009">IMOC_put_data()</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00135">IMOC_TEST_ALIGNMENT</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00116">IMOC_TEST_BUFFER</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00109">IMOC_TEST_BYTECOUNT</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00067">IMOC_TEST_COMM_SEND</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00122">IMOC_TEST_PROC_NULL</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00128">IMOC_TEST_PROC_SELF</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00095">IMOC_TEST_RANK</a>, <a class="el" href="../../d0/d87/imoc__macros_8h-source.html#l00081">IMOC_TEST_TAG_SEND</a>, <a class="el" href="../../d4/d9b/imoc_8h-source.html#l00049">MEMCPY_GET_TRESHOLD</a>, <a class="el" href="../../d3/d95/moc__error__codes_8h-source.html#l00047">MOC_ERR_INTERN</a>, <a class="el" href="../../d3/d95/moc__error__codes_8h-source.html#l00064">MOC_ERR_NO_BUFFER</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00106">moc_ppu_thread_count</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00123">moc_spu_thread_list</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00052">node_handle</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00034">moc_node_handle_ppu_struct::queue_size</a>, and <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00036">moc_node_handle_ppu_struct::status_array_base</a>.</p>
<p>Referenced by <a class="el" href="../../d5/d4e/moc__isend_8c-source.html#l00018">MOC_ISend()</a>, and <a class="el" href="../../dd/d4a/moc__send_8c-source.html#l00019">MOC_Send()</a>.</p>
<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
<p><center><img src="../../de/d84/group__p2p__buffered_g307bf844e1416c7c021e4a3468209d0b_cgraph.png" border="0" usemap="#de/d84/group__p2p__buffered_g307bf844e1416c7c021e4a3468209d0b_cgraph_map" alt=""></center>
<map name="de/d84/group__p2p__buffered_g307bf844e1416c7c021e4a3468209d0b_cgraph_map">
<area shape="rect" href="../../d3/dd3/group__internal__p2p__bmalloc.html#gad8750c7ba3d6da9c137c2c462d2c531" title="void bmalloc_print_nodes() { if (!bmalloc_first_node) printf(&quot;No nodes in list\\n&quot;);..." alt="" coords="169,5,265,32"><area shape="rect" href="../../d3/dd3/group__internal__p2p__bmalloc.html#g5295b372d853993b2e6cfb6912a0ee41" title="Allocate buffer&#45;space." alt="" coords="164,56,271,83"><area shape="rect" href="../../d8/d88/group__internal__p2p__main.html#g2a948cdecce651ae6cc1b0c0ddb1b750" title="Get next free entry in message&#45;queue (a local copy of the message&#45;queue has to be..." alt="" coords="149,107,285,133"><area shape="rect" href="../../d8/d88/group__internal__p2p__main.html#g409bdbea503611cf04829413d15830df" title="Get free message&#45;ID." alt="" coords="153,157,281,184"><area shape="rect" href="../../d2/de2/group__internal__p2p__dma.html#gb48c58191a7cf4d3e502d1c7a6c0ab9c" title="Internal wrapper&#45;function for a blocking DMA&#45;put operation." alt="" coords="161,208,273,235"></map>
</div>
<p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dynsection">
<p><center><img src="../../de/d84/group__p2p__buffered_g307bf844e1416c7c021e4a3468209d0b_icgraph.png" border="0" usemap="#de/d84/group__p2p__buffered_g307bf844e1416c7c021e4a3468209d0b_icgraph_map" alt=""></center>
<map name="de/d84/group__p2p__buffered_g307bf844e1416c7c021e4a3468209d0b_icgraph_map">
<area shape="rect" href="../../d7/d62/group__p2p__imm.html#gd88773e68570adfad9f99159c69502af" title="Performs a non&#45;blocking standard mode send operation." alt="" coords="151,5,241,32"><area shape="rect" href="../../d0/d64/group__p2p__main.html#g23e0afbe55bc4c86cb738c3361623a4c" title="Performs a blocking standard mode send operation." alt="" coords="152,56,240,83"><area shape="rect" href="../../db/dc2/group__broadcast.html#gfd25e9a19a1ad4032fdf3703531167d6" title="Broadcasts a message from the process with rank &quot;root&quot; to all other processes..." alt="" coords="325,5,416,32"><area shape="rect" href="../../d2/ded/group__p2p__sendrecv.html#g70885aadac98497e169267e74abee516" title="Execute a blocking send and receive operation." alt="" coords="315,56,427,83"><area shape="rect" href="../../d2/ded/group__p2p__sendrecv.html#g1e5b32eaefd61f863f89778dcbbb70a2" title="Execute a blocking send and receive." alt="" coords="291,107,451,133"></map>
</div>
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:50:52 2009 for MPI On Cell (Documentation) by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="../../doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>