Files
MPIonCell/documentation/developer/html/d1/dd1/group__comm__mgt.html
T
2017-10-26 19:57:24 +02:00

243 lines
14 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): Communicator Management</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>Communicator Management<br>
<small>
[<a class="el" href="../../d1/df0/group__comm__main.html">Groups, Context and Communicators</a>]</small>
</h1>
<p>
<div class="dynheader">
Collaboration diagram for Communicator Management:</div>
<div class="dynsection">
<center><table><tr><td><img src="../../d1/dd1/group__comm__mgt.png" border="0" alt="" usemap="#dc/d90/d1_2dd1_2group____comm____mgt_map">
<map name="dc/d90/d1_2dd1_2group____comm____mgt_map">
<area shape="rect" href="../../d1/df0/group__comm__main.html" title="The MOC communicator specifies a group of processes inside which a communication..." alt="" coords="7,5,241,32"></map></td></tr></table></center>
</div>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Funktions for managing communicators.
<p>
Because of reasons already stated (see <a class="el" href="../../d1/df0/group__comm__main.html">Groups, Context and Communicators</a>) there is no support for user-defined communicators. So this section is limited to functions which return the size of a specific communicator or the rank of the calling process.
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/dd1/group__comm__mgt.html#gcae012270d1813b9153b8cbc78a5c84d">MOC_COMM_NULL</a>&nbsp;&nbsp;&nbsp;0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specifies a null communicator. <a href="#gcae012270d1813b9153b8cbc78a5c84d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/dd1/group__comm__mgt.html#g14e1cb53b99b5e239d4cc6a8d370ad94">MOC_COMM_WORLD</a>&nbsp;&nbsp;&nbsp;1</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specifies a constant that contains all of the processes. <a href="#g14e1cb53b99b5e239d4cc6a8d370ad94"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/dd1/group__comm__mgt.html#gf8c5dfb6bb79027948fe63f4cf6504eb">MOC_COMM_SELF</a>&nbsp;&nbsp;&nbsp;2</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specifies a constant that contains only the calling process. <a href="#gf8c5dfb6bb79027948fe63f4cf6504eb"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767">MOC_Comm</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Communicator-Handle. <a href="#g3d2b8a9af65bff5f79d02bda13616767"></a><br></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="../../d1/dd1/group__comm__mgt.html#gbadd556e16667ac8ee86af72299e4915">MOC_Comm_rank</a> (<a class="el" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767">MOC_Comm</a> comm, int *rank)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines the rank of the calling process in the communicator. <a href="#gbadd556e16667ac8ee86af72299e4915"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/dd1/group__comm__mgt.html#g36ac8a2d969216d52418aedd77a5829e">MOC_Comm_size</a> (<a class="el" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767">MOC_Comm</a> comm, int *size)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines the size of the group associated with a communictor. <a href="#g36ac8a2d969216d52418aedd77a5829e"></a><br></td></tr>
</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="gcae012270d1813b9153b8cbc78a5c84d"></a><!-- doxytag: member="moc.h::MOC_COMM_NULL" ref="gcae012270d1813b9153b8cbc78a5c84d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MOC_COMM_NULL&nbsp;&nbsp;&nbsp;0 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Specifies a null communicator.
<p>
<p>Definition at line <a class="el" href="../../d7/de1/moc_8h-source.html#l00291">291</a> of file <a class="el" href="../../d7/de1/moc_8h-source.html">moc.h</a>.</p>
</div>
</div><p>
<a class="anchor" name="gf8c5dfb6bb79027948fe63f4cf6504eb"></a><!-- doxytag: member="moc.h::MOC_COMM_SELF" ref="gf8c5dfb6bb79027948fe63f4cf6504eb" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MOC_COMM_SELF&nbsp;&nbsp;&nbsp;2 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Specifies a constant that contains only the calling process.
<p>
<p>Definition at line <a class="el" href="../../d7/de1/moc_8h-source.html#l00301">301</a> of file <a class="el" href="../../d7/de1/moc_8h-source.html">moc.h</a>.</p>
<p>Referenced by <a class="el" href="../../dc/d5d/moc__barrier__ppu_8c-source.html#l00011">MOC_Barrier()</a>, <a class="el" href="../../da/d19/moc__bcast_8c-source.html#l00009">MOC_Bcast()</a>, <a class="el" href="../../d9/dd3/moc__comm__rank_8c-source.html#l00008">MOC_Comm_rank()</a>, and <a class="el" href="../../d8/d65/moc__comm__size_8c-source.html#l00008">MOC_Comm_size()</a>.</p>
</div>
</div><p>
<a class="anchor" name="g14e1cb53b99b5e239d4cc6a8d370ad94"></a><!-- doxytag: member="moc.h::MOC_COMM_WORLD" ref="g14e1cb53b99b5e239d4cc6a8d370ad94" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MOC_COMM_WORLD&nbsp;&nbsp;&nbsp;1 </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Specifies a constant that contains all of the processes.
<p>
<p>Definition at line <a class="el" href="../../d7/de1/moc_8h-source.html#l00296">296</a> of file <a class="el" href="../../d7/de1/moc_8h-source.html">moc.h</a>.</p>
<p>Referenced by <a class="el" href="../../dc/d5d/moc__barrier__ppu_8c-source.html#l00011">MOC_Barrier()</a>, <a class="el" href="../../d9/dd3/moc__comm__rank_8c-source.html#l00008">MOC_Comm_rank()</a>, and <a class="el" href="../../d8/d65/moc__comm__size_8c-source.html#l00008">MOC_Comm_size()</a>.</p>
</div>
</div><p>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="g3d2b8a9af65bff5f79d02bda13616767"></a><!-- doxytag: member="moc.h::MOC_Comm" ref="g3d2b8a9af65bff5f79d02bda13616767" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef int <a class="el" href="../../d1/dd1/group__comm__mgt.html#g3d2b8a9af65bff5f79d02bda13616767">MOC_Comm</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Communicator-Handle.
<p>
Masks the actual type which is used to encode the communicator. Char is used and therefore the maximum number of possible communicators is limited to 256. But because there are three predefined communicators (MPI_COMM_NULL, MPI_COMM_WORLD and MPI_COMM_SELF) only 253 user-defined communicators are possible.
<p>Definition at line <a class="el" href="../../d7/de1/moc_8h-source.html#l00286">286</a> of file <a class="el" href="../../d7/de1/moc_8h-source.html">moc.h</a>.</p>
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="gbadd556e16667ac8ee86af72299e4915"></a><!-- doxytag: member="moc.h::MOC_Comm_rank" ref="gbadd556e16667ac8ee86af72299e4915" args="(MOC_Comm comm, int *rank)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int MOC_Comm_rank </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>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&nbsp;</td>
<td class="paramname"> <em>rank</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Determines the rank of the calling process in the communicator.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>comm</em>&nbsp;</td><td><b>in</b> commicator-handle </td></tr>
<tr><td valign="top"></td><td valign="top"><em>rank</em>&nbsp;</td><td><b>out</b> rank of the calling process in group of comm </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>MOC_ERR_COMM</em>&nbsp;</td><td>Invalid communicator. A common error is to use a null communicator in a call. </td></tr>
</table>
</dl>
<p>Definition at line <a class="el" href="../../d9/dd3/moc__comm__rank_8c-source.html#l00008">8</a> of file <a class="el" href="../../d9/dd3/moc__comm__rank_8c-source.html">moc_comm_rank.c</a>.</p>
<p>References <a class="el" href="../../d7/de1/moc_8h-source.html#l00301">MOC_COMM_SELF</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00296">MOC_COMM_WORLD</a>, <a class="el" href="../../d3/d95/moc__error__codes_8h-source.html#l00035">MOC_ERR_COMM</a>, <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00052">node_handle</a>, and <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00032">moc_node_handle_ppu_struct::rank</a>.</p>
</div>
</div><p>
<a class="anchor" name="g36ac8a2d969216d52418aedd77a5829e"></a><!-- doxytag: member="moc.h::MOC_Comm_size" ref="g36ac8a2d969216d52418aedd77a5829e" args="(MOC_Comm comm, int *size)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int MOC_Comm_size </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>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&nbsp;</td>
<td class="paramname"> <em>size</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Determines the size of the group associated with a communictor.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>comm</em>&nbsp;</td><td><b>in</b> commicator-handle </td></tr>
<tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td><b>out</b> number of processes in the group of comm </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>MOC_ERR_COMM</em>&nbsp;</td><td>Invalid communicator. A common error is to use a null communicator in a call. </td></tr>
</table>
</dl>
<p>Definition at line <a class="el" href="../../d8/d65/moc__comm__size_8c-source.html#l00008">8</a> of file <a class="el" href="../../d8/d65/moc__comm__size_8c-source.html">moc_comm_size.c</a>.</p>
<p>References <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00033">moc_node_handle_ppu_struct::comm_size</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00301">MOC_COMM_SELF</a>, <a class="el" href="../../d7/de1/moc_8h-source.html#l00296">MOC_COMM_WORLD</a>, <a class="el" href="../../d3/d95/moc__error__codes_8h-source.html#l00035">MOC_ERR_COMM</a>, and <a class="el" href="../../db/d45/imoc__core__ppu_8h-source.html#l00052">node_handle</a>.</p>
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 12 13:51:02 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>