📄 62.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" xml:lang="en" lang="en"><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> body { font-family: Verdana, Arial, Helvetica, sans-serif;} a.at-term { font-style: italic; } </style> <title>Creating a Cartesian Virtual Topology</title> <meta name="Generator" content="ATutor"> <meta name="Keywords" content=""></head><body> <p class="codelang">
C:</p>
<pre><code>int MPI_Cart_create(MPI_Comm comm_old, int ndims, int *dims, int *periods, int reorder, MPI_Comm *comm_cart)</code></pre>
<p class="codelang">
Fortran:</p>
<pre><code>CALL MPI_CART_CREATE(COMM_OLD, NDIMS, DIMS, PERIODS, REORDER, COMM_CART, IERROR)
INTEGER COMM_OLD, NDIMS, DIMS(*), COMM_CART, IERROR
LOGICAL PERIODS(*), REORDER</code></pre>
<h3>Arguments</h3>
<table class="info" >
<tr>
<td>comm_old
<br> </td>
<td>existing communicator
<br> </td>
</tr>
<tr>
<td>ndims
<br> </td>
<td>number of dimensions
<br> </td>
</tr>
<tr>
<td>periods
<br> </td>
<td>logical array indicating whether a dimension is cyclic
<br> (TRUE=> cyclic boundary conditions)
<br> </td>
</tr>
<tr>
<td>reorder
<br> </td>
<td>logical
<br> (FALSE=> rank preserved)
<br> (TRUE=> possible rank reordering)
<br> </td>
</tr>
<tr>
<td>comm_cart</td>
<td>new cartesian communicator</td>
</tr>
</table>
<h3>Cartesian Example</h3>
<img SRC="taurus2d.gif" height=330 width=475>
<h3>Code:</h3>
<pre><code>MPI_Comm vu;
int dim[2], period[2], reorder;
dim[0]=4; dim[1]=3;
period[0]=TRUE; period[1]=FALSE;
reorder=TRUE;
MPI_Cart_create(MPI_COMM_WORLD,2,dim,period,reorder,&vu); </code></pre></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -