Page MenuHomec4science

MpiModule.html
No OneTemporary

File Metadata

Created
Sun, Jun 23, 01:31

MpiModule.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>the mpi module &mdash; pNbody v4 documentation</title>
<link rel="stylesheet" href="../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '4',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="top" title="pNbody v4 documentation" href="../index.html" />
<link rel="up" title="Reference" href="Reference.html" />
<link rel="next" title="the libutil module" href="LibutilModule.html" />
<link rel="prev" title="the ctes module" href="CtesModule.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../np-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="LibutilModule.html" title="the libutil module"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="CtesModule.html" title="the ctes module"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">pNbody v4 documentation</a> &raquo;</li>
<li><a href="Reference.html" accesskey="U">Reference</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="module-pNbody.mpi">
<span id="the-mpi-module"></span><h1>the mpi module<a class="headerlink" href="#module-pNbody.mpi" title="Permalink to this headline"></a></h1>
<dl class="function">
<dt id="pNbody.mpi.mpi_AllgatherAndConcatArray">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_AllgatherAndConcatArray</tt><big>(</big><em>vec</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_AllgatherAndConcatArray" title="Permalink to this definition"></a></dt>
<dd><p>AllGather array vec and concatenate it in a unique array
(concatenation order is reversed).</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_ExchangeFromTable">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_ExchangeFromTable</tt><big>(</big><em>T</em>, <em>procs</em>, <em>ids</em>, <em>vec</em>, <em>num</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_ExchangeFromTable" title="Permalink to this definition"></a></dt>
<dd><p>Exchange an array according to a transfer array T</p>
<p>T : exchange table</p>
<p>procs : list of processor (from Tree.GetExchanges())
ids : list of id (from Tree.GetExchanges())</p>
<p>vec : vector to exchange
num : id correspondings to particles</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_GatherAndWriteArray">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_GatherAndWriteArray</tt><big>(</big><em>f</em>, <em>data</em>, <em>byteorder='little'</em>, <em>npart=None</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_GatherAndWriteArray" title="Permalink to this definition"></a></dt>
<dd><p>Gather and array and write it in a binary block.</p>
<p>data = array</p>
<p>shape = tuple</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_GetExchangeTable">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_GetExchangeTable</tt><big>(</big><em>n_i</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_GetExchangeTable" title="Permalink to this definition"></a></dt>
<dd><p>This function returns the exchange table</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_OldGatherAndWriteArray">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_OldGatherAndWriteArray</tt><big>(</big><em>f</em>, <em>data</em>, <em>byteorder='little'</em>, <em>nlocal=None</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_OldGatherAndWriteArray" title="Permalink to this definition"></a></dt>
<dd><p>Gather and array and write it in a binary block.</p>
<p>data = array</p>
<p>shape = tuple</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_OldReadAndSendArray">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_OldReadAndSendArray</tt><big>(</big><em>f</em>, <em>data_type</em>, <em>shape=None</em>, <em>skip=None</em>, <em>byteorder='little'</em>, <em>nlocal=None</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_OldReadAndSendArray" title="Permalink to this definition"></a></dt>
<dd><p>Read and Brodcast a binary block assuming it contains an array.
The array is splitted acroding to the variable nlocal.</p>
<p>data_type = array type
shape = tuple</p>
<dl class="docutils">
<dt>nlocal <span class="classifier-delimiter">:</span> <span class="classifier">array NTask x Npart </span></dt>
<dd>array NTask</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_ReadAndSendArray">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_ReadAndSendArray</tt><big>(</big><em>f</em>, <em>data_type</em>, <em>shape=None</em>, <em>byteorder='little'</em>, <em>npart=None</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_ReadAndSendArray" title="Permalink to this definition"></a></dt>
<dd><p>Read and Brodcast a binary block assuming it contains an array.</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_ReadAndSendBlock">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_ReadAndSendBlock</tt><big>(</big><em>f</em>, <em>data_type</em>, <em>shape=None</em>, <em>byteorder='little'</em>, <em>split=None</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_ReadAndSendBlock" title="Permalink to this definition"></a></dt>
<dd><p>Read and brodcast a binary block.</p>
<p>data_type = int,float32,float
or
data_type = array</p>
<p>shape = tuple</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_allgather">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_allgather</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_allgather" title="Permalink to this definition"></a></dt>
<dd><p>Gather x from all to all.
Returns a list.</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_allreduce">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_allreduce</tt><big>(</big><em>x</em>, <em>op=&lt;mpi4py.MPI.Op object at 0x22be570&gt;</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_allreduce" title="Permalink to this definition"></a></dt>
<dd><p>Reduce x from all node for all nodes.
When there is only one is defined, the function return x.</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_arange">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_arange</tt><big>(</big><em>n</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_arange" title="Permalink to this definition"></a></dt>
<dd><p>Create an integer array containing elements from 0 to n
spreaded over all nodes.</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_argmax">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_argmax</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_argmax" title="Permalink to this definition"></a></dt>
<dd><p>Find the arument of the amximum value in x.</p>
<p>idx = (p,i) : where i = index in proc p</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_argmin">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_argmin</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_argmin" title="Permalink to this definition"></a></dt>
<dd><p>Find the arument of the maximum value in x.
idx = (p,i) : where i = index in proc p</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_bcast">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_bcast</tt><big>(</big><em>x</em>, <em>root=0</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_bcast" title="Permalink to this definition"></a></dt>
<dd><p>Broadcast from node root the variable x.
When there is only one is defined, it simplay returns x.</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_find_a_toTask">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_find_a_toTask</tt><big>(</big><em>begTask</em>, <em>fromTask</em>, <em>ex_table</em>, <em>delta_n</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_find_a_toTask" title="Permalink to this definition"></a></dt>
<dd><p>This function is used to find recursively an exange table</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_gather">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_gather</tt><big>(</big><em>x</em>, <em>root=0</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_gather" title="Permalink to this definition"></a></dt>
<dd><p>Gather x from all nodes to node dest.
Returns a list.</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_getval">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_getval</tt><big>(</big><em>x</em>, <em>idx</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_getval" title="Permalink to this definition"></a></dt>
<dd><p>Return the value of array x corresponding to the index idx.</p>
<p>idx = (p,i) : where i = index in proc p
equivalent to x[i] from proc p</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_histogram">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_histogram</tt><big>(</big><em>x</em>, <em>bins</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_histogram" title="Permalink to this definition"></a></dt>
<dd><p>Return an histogram of vector x binned using binx.</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_iprint">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_iprint</tt><big>(</big><em>msg</em>, <em>mode=None</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_iprint" title="Permalink to this definition"></a></dt>
<dd><p>Synchronized print, including info on node.</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_len">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_len</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_len" title="Permalink to this definition"></a></dt>
<dd><p>Lenght of array x.</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_max">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_max</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_max" title="Permalink to this definition"></a></dt>
<dd><p>Maximum element of array x.</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_mean">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_mean</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_mean" title="Permalink to this definition"></a></dt>
<dd><p>Mean of elements of array x.</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_min">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_min</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_min" title="Permalink to this definition"></a></dt>
<dd><p>Minimum element of array x.</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_pprint">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_pprint</tt><big>(</big><em>msg</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_pprint" title="Permalink to this definition"></a></dt>
<dd><p>Synchronized print.</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_recv">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_recv</tt><big>(</big><em>source</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_recv" title="Permalink to this definition"></a></dt>
<dd><p>Return a variable sent by node ar{source}.
When there is only one is defined, it does nothing.</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_reduce">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_reduce</tt><big>(</big><em>x</em>, <em>root=0</em>, <em>op=&lt;mpi4py.MPI.Op object at 0x22be570&gt;</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_reduce" title="Permalink to this definition"></a></dt>
<dd><p>Reduce x from all node only for root.
When there is only one is defined, the function return x.</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_rprint">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_rprint</tt><big>(</big><em>msg</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_rprint" title="Permalink to this definition"></a></dt>
<dd><p>Rooted print.</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_sarange">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_sarange</tt><big>(</big><em>npart_all</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_sarange" title="Permalink to this definition"></a></dt>
<dd><p>Create an integer array containing elements from 0 to n,
spreaded over all nodes. The repartition of elements and
type of elements over nodes is given by the array npart_all</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_send">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_send</tt><big>(</big><em>x</em>, <em>dest</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_send" title="Permalink to this definition"></a></dt>
<dd><p>Send x to node dest.
When there is only one is defined, it does nothing.</p>
</dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_sendrecv">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_sendrecv</tt><big>(</big><em>x</em>, <em>dest</em>, <em>source</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_sendrecv" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="pNbody.mpi.mpi_sum">
<tt class="descclassname">pNbody.mpi.</tt><tt class="descname">mpi_sum</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#pNbody.mpi.mpi_sum" title="Permalink to this definition"></a></dt>
<dd><p>Sum elements of array x.</p>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/icon-small.jpg" alt="Logo"/>
</a></p>
<h4>Previous topic</h4>
<p class="topless"><a href="CtesModule.html"
title="previous chapter">the ctes module</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="LibutilModule.html"
title="next chapter">the libutil module</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/rst/MpiModule.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" size="18" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="../np-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="LibutilModule.html" title="the libutil module"
>next</a> |</li>
<li class="right" >
<a href="CtesModule.html" title="the ctes module"
>previous</a> |</li>
<li><a href="../index.html">pNbody v4 documentation</a> &raquo;</li>
<li><a href="Reference.html" >Reference</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2011, Yves Revaz.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4.
</div>
</body>
</html>

Event Timeline