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

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

Adding compiled files

File size: 4.9 KB
Line 
1.\"Copyright 2006-2008 Sun Microsystems, Inc.
2.\" Copyright (c) 1996 Thinking Machines Corporation
3.TH MPI_Alltoall 3 "Dec 08, 2009" "1.4" "Open MPI"
4
5.SH NAME
6\fBMPI_Alltoall\fP \- All processes send data to all processes
7
8.SH SYNTAX
9.ft R
10
11.SH C Syntax
12.nf
13#include <mpi.h>
14int MPI_Alltoall(void *\fIsendbuf\fP, int \fIsendcount\fP,
15        MPI_Datatype \fIsendtype\fP, void *\fIrecvbuf\fP, int \fIrecvcount\fP,
16        MPI_Datatype \fIrecvtype\fP, MPI_Comm \fIcomm\fP)
17
18.SH Fortran Syntax
19.nf
20INCLUDE 'mpif.h'
21MPI_ALLTOALL(\fISENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT,
22        RECVTYPE, COMM, IERROR\fP)
23
24        <type>  \fISENDBUF(*), RECVBUF(*)\fP
25        INTEGER \fISENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE\fP
26        INTEGER \fICOMM, IERROR\fP
27
28.SH C++ Syntax
29.nf
30#include <mpi.h>
31void MPI::Comm::Alltoall(const void* \fIsendbuf\fP, int \fIsendcount\fP,
32        const MPI::Datatype& \fIsendtype\fP, void* \fIrecvbuf\fP,
33        int \fIrecvcount\fP, const MPI::Datatype& \fIrecvtype\fP)
34
35.SH INPUT PARAMETERS
36.ft R
37.TP 1.2i
38sendbuf
39Starting address of send buffer (choice).
40.TP 1.2i
41sendcount
42Number of elements to send to each process (integer).
43.TP 1.2i
44sendtype
45Datatype of send buffer elements (handle).
46.TP 1.2i
47recvcount
48Number of elements to receive from each process (integer).
49.TP 1.2i
50recvtype
51Datatype of receive buffer elements (handle).
52.TP 1.2i
53comm
54Communicator over which data is to be exchanged (handle).
55
56.SH OUTPUT PARAMETERS
57.ft R
58.TP 1.2i
59recvbuf
60Starting address of receive buffer (choice).
61.ft R
62.TP 1.2i
63IERROR
64Fortran only: Error status (integer).
65
66.SH DESCRIPTION
67.ft R
68MPI_Alltoall is a collective operation in which all processes send the same amount of data to each other, and receive the same amount of data from each other. The operation of this routine can be represented as follows, where each process performs 2n (n being the number of processes in communicator \fIcomm\fP) independent point-to-point communications (including communication with itself).
69.sp
70.nf
71        MPI_Comm_size(\fIcomm\fP, &n);
72        for (i = 0, i < n; i++)
73            MPI_Send(\fIsendbuf\fP + i * \fIsendcount\fP * extent(\fIsendtype\fP),
74                \fIsendcount\fP, \fIsendtype\fP, i, ..., \fIcomm\fP);
75        for (i = 0, i < n; i++)
76            MPI_Recv(\fIrecvbuf\fP + i * \fIrecvcount\fP * extent(\fIrecvtype\fP),
77                \fIrecvcount\fP, \fIrecvtype\fP, i, ..., \fIcomm\fP);
78.fi
79.sp
80Each process breaks up its local \fIsendbuf\fP into n blocks \- each
81containing \fIsendcount\fP elements of type \fIsendtype\fP \- and
82divides its \fIrecvbuf\fP similarly according to \fIrecvcount\fP and
83\fIrecvtype\fP. Process j sends the k-th block of its local
84\fIsendbuf\fP to process k, which places the data in the j-th block of
85its local \fIrecvbuf\fP. The amount of data sent must be equal to the
86amount of data received, pairwise, between every pair of processes.
87
88WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR
89.sp
90When the communicator is an inter-communicator, the gather operation occurs in two phases.  The data is gathered from all the members of the first group and received by all the members of the second group.  Then the data is gathered from all the members of the second group and received by all the members of the first.  The operation exhibits a symmetric, full-duplex behavior. 
91.sp
92The first group defines the root process.  The root process uses MPI_ROOT as the value of \fIroot\fR.  All other processes in the first group use MPI_PROC_NULL as the value of \fIroot\fR.  All processes in the second group use the rank of the root process in the first group as the value of \fIroot\fR.
93.sp
94When the communicator is an intra-communicator, these groups are the same, and the operation occurs in a single phase.
95.sp 
96.SH NOTES
97.ft R
98The MPI_IN_PLACE option is not available for this function.
99.sp
100All arguments on all processes are significant. The \fIcomm\fP argument,
101in particular, must describe the same communicator on all processes.
102.sp
103There are two MPI library functions that are more general than
104MPI_Alltoall. MPI_Alltoallv allows all-to-all communication to and
105from buffers that need not be contiguous; different processes may
106send and receive different amounts of data. MPI_Alltoallw expands
107MPI_Alltoallv's functionality to allow the exchange of data with
108different datatypes.
109
110.SH ERRORS
111.ft R
112Almost all MPI routines return an error value; C routines as
113the value of the function and Fortran routines in the last argument. C++
114functions do not return errors. If the default error handler is set to
115MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism
116will be used to throw an MPI:Exception object.
117.sp
118Before the error value is returned, the current MPI error handler is
119called. By default, this error handler aborts the MPI job, except for
120I/O function errors. The error handler may be changed with
121MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN
122may be used to cause error values to be returned. Note that MPI does not
123guarantee that an MPI program can continue past an error.
124
125.SH SEE ALSO
126.ft R
127.nf
128MPI_Alltoallv
129MPI_Alltoallw
130
Note: See TracBrowser for help on using the repository browser.