source: proiecte/hpl/openmpi_compiled/share/man/man3/MPI_Graph_create.3 @ 97

Last change on this file since 97 was 97, checked in by (none), 14 years ago

Adding compiled files

File size: 4.3 KB
Line 
1.\"Copyright 2006-2008 Sun Microsystems, Inc.
2.\" Copyright (c) 1996 Thinking Machines Corporation
3.TH MPI_Graph_create 3 "Dec 08, 2009" "1.4" "Open MPI"
4.SH NAME
5\fBMPI_Graph_create \fP \- Makes a new communicator to which topology information has been attached.
6
7.SH SYNTAX
8.ft R
9.SH C Syntax
10.nf
11#include <mpi.h>
12int MPI_Graph_create(MPI_Comm \fIcomm_old\fP, int\fI nnodes\fP, int\fI *index\fP,
13        int\fI *edges\fP, int\fI reorder\fP, MPI_Comm\fI *comm_graph\fP)
14
15.SH Fortran Syntax
16.nf
17INCLUDE 'mpif.h'
18MPI_GRAPH_CREATE(\fICOMM_OLD, NNODES, INDEX, EDGES, REORDER,
19                COMM_GRAPH, IERROR\fP)
20        INTEGER \fICOMM_OLD, NNODES, INDEX(*), EDGES(*)\fP
21        INTEGER \fICOMM_GRAPH, IERROR\fP
22        LOGICAL   \fIREORDER\fP
23
24.SH C++ Syntax
25.nf
26#include <mpi.h>
27Graphcomm Intracomm::Create_graph(int \fInnodes\fP, const int \fIindex\fP[],
28        const int \fIedges\fP[], bool \fIreorder\fP) const
29
30.SH INPUT PARAMETERS
31.ft R
32.TP 1i
33comm_old
34Input communicator without topology (handle).
35.TP 1i
36nnodes
37Number of nodes in graph (integer).
38.TP 1i
39index
40Array of integers describing node degrees (see below).
41.TP 1i
42edges
43Array of integers describing graph edges (see below).
44.TP 1i
45reorder
46Ranking may be reordered (true) or not (false) (logical).
47
48.SH OUTPUT PARAMETERS
49.ft R
50.TP 1i
51comm_graph
52Communicator with graph topology added (handle).
53.ft R
54.TP 1i
55IERROR
56Fortran only: Error status (integer).
57
58.SH DESCRIPTION
59.ft R
60MPI_Graph_create returns a handle to a new communicator to which the graph topology information is attached. If reorder = false then the rank of each process in the new group is identical to its rank in the old group. Otherwise, the function may reorder the processes. If the size, nnodes, of the graph is smaller than the size of the group of comm_old, then some processes are returned MPI_COMM_NULL, in analogy to MPI_Cart_create and MPI_Comm_split. The call is erroneous if it specifies a graph that is larger than the group size of the input communicator.
61.sp
62The three parameters nnodes, index, and edges define the graph structure. nnodes is the number of nodes of the graph. The nodes are numbered from 0 to nnodes-1. The ith entry of array index stores the total number of neighbors of the first i graph nodes. The lists of neighbors of nodes 0,\ 1,\ ..., nnodes-1 are stored in consecutive locations in array edges. The array edges is a flattened representation of the edge lists. The total number of entries in index is nnodes and the total number of entries in edges is equal to the number of graph edges.
63.sp
64The definitions of the arguments nnodes, index, and edges are illustrated with the following simple example.
65.sp
66\fBExample:\fP Assume there are four processes 0, 1, 2, 3 with the
67following adjacency matrix:
68.sp
69.nf
70    Process     Neighbors
71       0                   1, 3
72       1                   0
73       2                   3
74       3                   0, 2
75.fi
76.sp
77Then, the input arguments are:
78.nf
79    nnodes = 4
80    index  = 2, 3, 4, 6
81    edges  = 1, 3, 0, 3, 0, 2
82.fi
83.sp
84Thus, in C, index[0] is the degree of node zero, and index[i] - index[i-1]
85is the degree of node i, i=1, . . . , nnodes-1;  the list of neighbors of
86node zero is stored in edges[j], for 0 <= j <= index[0] - 1 and the list of
87neighbors of node i, i > 0 ,  is stored in edges[j], index[i-1] <= j <= index[i] - 1.
88.sp
89In Fortran, index(1) is the degree of node zero, and index(i+1) - index(i)
90is the degree of node i, i=1, . . . , nnodes-1;  the list of neighbors of
91node zero is stored in edges(j), for 1 <= j <= index(1) and the list of
92neighbors of node  i, i > 0, is stored in edges(j), index(i) + 1 <= j <= index(i + 1).
93
94.SH ERRORS
95Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI:Exception object.
96.sp
97Before the error value is returned, the current MPI error handler is
98called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. 
99
100.SH SEE ALSO
101.ft R
102.sp
103MPI_Graph_get
104.br
105MPI_Graphdims_get
106
Note: See TracBrowser for help on using the repository browser.